Wednesday, February 22, 2012

How to do a smooth upgrade for Sogo with Thunderbird 3.x to 10.x

With the new thunderbird esr versions out now, we also got full support for the sogo extensions.
For giving the users a smooth upgrade experience look here:

http://wiki.sogo.nu/TB-upgrade-3-to-10



Friday, February 17, 2012

SQL Anywhere: Why SQL Server Sucks: ISNULL

One (of the many) reaoson why MS SQL Server sucks:

SQL Anywhere: Why SQL Server Sucks: ISNULL

There are plenty others, but this one is just brain dead....

Thursday, February 16, 2012

Changing keyboard layout when netbooting linux mint (And other debian variants)

When you boot the Linux Mint live cd to have a live recovery system (described here), then you have the default english/us keyboard active.
That's inconvinient when your keyboard has a different layout.

You can change it to the one you use by adding this to the APPEND statement in your boot configuration:

 locale=de_CH console-setup/layoutcode=ch

With these two setting, you receive most messages in german and the keyboard is set to swiss german.
The layout is correct in the X-Window system and in the terminals inside X.
On the console (Switch with CTRL+ALT+F1..F6) you will still have the us keyboard, if anyone has a tip...

Wednesday, February 15, 2012

Installing .net framework 3.5 via ADS GPO

Deploying .net framework 3.5 via group policy is not as easy as it should be.
No idea why microsoft did create packages which can't be used by microsoft products....

To get installable .msi packages you can do the following steps:

Deployment of Microsoft .NET Framework 3.5 SP1 x86 using Active Directory.

Microsoft Windows Installer 3.1 must already be deployed.

1. Download dotnetfx35.exe from http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe

2. Run dotnetfx35.exe /x to extract the files

3. Move wcu\dotNetFramework\dotNetFX20 and wcu\dotNetFramework\dotNetFX30 into the root, eg to D:\dotNetFX20 and D:\dotNetFX30

4. To create Microsoft .NET Framework 2.0 SP2 admin install (a prerequisit) run
msiexec /a Netfx20a_x86.msi /update D:\dotNetFX20\ASPNET.msp;D:\dotNetFX20\clr.msp;D:\dotNetFX20\crt.msp;D:\dotNetFX20\dw.msp;D:\dotNetFX20\NetFX_CA.msp;D:\dotNetFX20\NetFX_Core.msp;D:\dotNetFX20\NetFX_Other.msp;D:\dotNetFX20\prexp.msp;D:\dotNetFX20\winforms.msp USING_EXUIH=1 REBOOT=ReallySuppress /log D:\dotNetFX20\netfx20a_x86.txt TARGETDIR=D:\dotNetFX20admin
then copy D:\dotNetFX20\Netfx20a_x86.msi to D:\dotNetFX20admin and move D:\dotNetFX20admin to network share.

5. To create Microsoft .NET Framework 3.0 SP2 admin install (a prerequisit) run
msiexec /a netfx30a_x86.msi /update D:\dotNetFX30\WCF.msp;D:\dotNetFX30\WCS.msp;D:\dotNetFX30\WF.msp;D:\dotNetFX30\WPF1.msp;D:\dotNetFX30\WPF2.msp;D:\dotNetFX30\WPF_Other.msp;D:\dotNetFX30\XPS.msp;D:\dotNetFX30\WF_32.msp;D:\dotNetFX30\WPF2_32.msp;D:\dotNetFX30\WPF_Other_32.msp USING_EXUIH=1 REBOOT=ReallySuppress /log D:\dotNetFX30\netfx30a_x86.txt TARGETDIR=D:\dotNetFX30admin
then copy D:\dotNetFX30\Netfx30a_x86.msi to D:\dotNetFX30admin and move D:\dotNetFX30admin to network share.

6. To create Microsoft .NET Framework 3.5 SP1 admin install run
wcu\dotNetFramework\dotNetFX35\x86\netfx35_x86.exe /x and move vs_setup.msi and vs_setup.cab to network share.

7. Add Netfx20a_x86.msi, Netfx30a_x86.msi and vs_setup.msi in order to an Active Directory GPO.

An x64 version can also be created and deployed using this method.

Wednesday, February 8, 2012

Setting dbremote mail replication options via isql in SQL Anywhere

When you extract databases from a SQL Anywhere server you can then enter the mail settings on first run of dbremote.

When you are running dbremote as a service (under either linux or windows) then you will not see the dialog asking for the mail settings.

To prevent this you can enter the parameters via normal sql commands.
Here a example on how to configure the mail replication (smtp+pop3)


set remote smtp option smtp_host='smtp.domain.com'
set remote smtp option pop3_host='pop.domain.com'
set remote smtp option pop3_userid='mailaccount@domain.com'
set remote smtp option pop3_password='password'

Monday, January 30, 2012

Upgrading EOL Ubuntu versions

Upgrading older ubuntu versions is straight forward.

Just upgrade all packages

sudo aptitude update && sudo aptitude safe-upgrade

and the (after a reboot) do a 

sudo do-release-upgrade
 

This works fine, as long as the origin version is not EOL.
When your server is having a EOL version installed, then you must dig somewhat deeper:

You have to change the source repositories to old-releases (instead of achives as mentioned in many posts/sites)

So you do change sources.list to:

deb http://old-releases.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse 
  
Then you can do the normal steps as mentioned above.
If the do-release-upgrade command is unknown, then you have to install it:

install update-manager-core

If by change you had the profile "ubuntu-desktop" installed, then first remove that one from your installation.

Modified /usr/lib/
python2.4/site-packages/UpdateManagerCore/DistUpgradeFetcherCore.py

#near line 28, add:
import time
# near the line 101-102, just after "tar.close()", add
    print "----- IT IS TIME NOW !-----"
 time.sleep(60)
# Note that you can adjust the time (60) by the value in seconds of your choice...
Theses lines should be like :
          tar.close()
          # Wait about 1 minute (time to modify update script)
          print "----- IT IS TIME NOW !-----"
          time.sleep(60)
          return True
# Note that you must keep the text idented


Run sudo do-release-upgrade

When the script sleeps, you have just 60 seconds to do the next step:
-- Modified /tmp/tmpXXXXXX/prerequists-sources.list and prerequists-sources.dapper.list and changed them to "old-releases" as well.

Then  wait until the script continues running and asks:
"Do you want to modify the sources list?"

Make sure you don't press enter along the way or it skips that question by assuming a "no".) It will say: "WARNING: Failed to read mirror file."

Go fix /etc/apt/sources.list back to the way it used to be now. With "us.archive" instead of "old-releases" (except for the security lines, that should just be "security.ubuntu.com".

Return to the update and say Yes.
The updater will modify /etc/apt/sources.list and replace all the dapper entries with hardy entries and continue updating using the servers.

Thursday, January 26, 2012

Boot Linux Mint via PXE and NFS

Linux Mint is a linux distribution based on Ubuntu, which in turn is based on Debian.

Linux Mint does not use Unity as desktop manager, but instead uses a extended Gnome3 desktop manager with many additions, so it can be used by most peoples.

Naked Unity and Gnome3 desktops are somewhat confusing for normal and experienced users (At least this is how we did see reactions of users)

When you wish to netboot Linux Mint via PXE and NFS you need the following components:

1. A DHCP server which assigns the correct boot options
2. A TFTP server for loading the pxe environment and loading kernel and initrd
3. A NFS server to deliver the normal Mint squashfs

The setup is identical as for net booting ubuntu, you only have to make sure you specify the correct paths.
A typical pxelinux.cfg entry for mint looks like this:

LABEL Linux Mint 12 64-Bit
    kernel mint12-amd64/vmlinuz
    APPEND boot=casper netboot=nfs nfsroot=192.168.1.200:/srv/nfs/mint/12-amd64 initrd=mint12-amd64/initrd.lz --

In this case we have:
- On the tftp server we make a subdirectory called linux12-amd64
- In that directory we put the vmlinux and initrd.lz from the ISO image /casper/ directory
- On the NFS server we just expand the content of the mint iso file into /srv/nfs/mint/12-amd64

It should then work just fine