Linux at Work
6th Dec 2005, 17:53:58
At home, I use a combination of Mac OS X, Ubuntu and Debian - this does me very nicely. At work however, I've been using Windows XP, and I'm pretty damn fed up with it. Here's what I did to remedy the situation...
I'd ordered some free CDs from Ubuntu's ShipIt service, which included a Live CD. I thought it would be prudent to use this to check that the computer could actually boot Ubuntu, happily it could. I was particularly pleased that (with the help of some extra packages) it was able to use my nvidia dual monitor setup.
For my next trick, I booted from a BartPE CD including Symantec Ghost, which I used to copy an image of my hard disk to an external disk. Once that was done, I booted from the Ubuntu install CD, erased the hard disk and installed Breezy Badger.
Breezy installed fine, but just like the live CD it only detected one of my monitors. I fixed that first:
# apt-get install nvidia-glx nvidia-settings linux-restricted-modules-2.6.12-10-386
# vi /etc/X11/xorg.conf
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Files"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/CID"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# paths to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection
Section "Module"
# Load "GLcore"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "gb"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection
Section "Device"
Identifier "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 0"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "MonitorLayout" "LFP, CRT"
Screen 0
EndSection
Section "Device"
Identifier "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 1"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "MonitorLayout" "LFP, CRT"
Screen 1
EndSection
Section "Monitor"
Identifier "monitor0"
Option "DPMS"
HorizSync 28-64
VertRefresh 43-60
EndSection
Section "Monitor"
Identifier "monitor1"
Option "DPMS"
HorizSync 28-64
VertRefresh 43-60
EndSection
Section "Screen"
Identifier "screen0"
Device "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 0"
Monitor "monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
Section "Screen"
Identifier "screen1"
Device "NVIDIA Corporation NV17GL [Quadro4 200/400 NVS] 1"
Monitor "monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "screen0"
Screen "screen1" RightOf "screen0"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
Option "xinerama" "on"
Option "clone" "off"
EndSection
Section "DRI"
Mode 0666
EndSection
Once I had that working, I upgraded the kernel to a version optimised for the Pentium 4, this quickly broke the dual monitor setup. If you upgrade the kernel, make sure that you have a linux-restricted-modules pacakage that matches the output of uname -r, in my case, # apt-get install linux-restricted-modules-2.6.12-10-686
Next, I tackled VMware. This doesn't play all that nicely with Ubuntu, but it does install. Need some packages:
# apt-get install linux-headers-2.6.12-10-686 build-essential gcc-3.4 g++-3.4
# ln -s /usr/src/linux-headers-2.6.12-10-686 /usr/src/linux
# export CC=/usr/bin/gcc-3.4
Use uname -r and cat /proc/version to determine the correct package versions.
Retreive the VMware tarball and extract it. Also, fetch the latest version of the VMware-any-any script and extract it.
# tar zxf VMware-workstation-5.0.0-13124.tar.gz
# tar zxf vmware-any-any-update94.tar.gz
# cd vmware-distrib
# ./vmware-install.pl
Don't run vmware-config.pl when it asks, instead:
# cd ../vmware-any-any-update94
# ./runme.pl
This time, do run vmware-config.pl. VMware is now in the panel - Applications, System Utilities.
I now used the BartPE disk again to restore the ghost image onto a virtual machine. I encountered a small problem - Ubuntu would detect and mount the USB external hard drive with my image on it, rather than handing it off to the virtual machine. I could probably have solved this, but instead I just attached the driver to another PC, shared it and restored it across the network. Once restored, the image booted OK in VMware, but XP required re-activating.
XP wouldn't re-activate over the internet, so I had to call Microsoft. After keying the 48-digit activation ID into the phone, I was told by an automated annoucement that it was not recognised. Grrr. So, I spoke to an activation humanoid, acted dumb and after 10 minutes or so it was re-activated. People say Linux isn't user-friendly?
I set up OpenVPN so that I could access my computer from home. It worked great, but I forgot to install sshd! Bugger. Fixed that the next day with apt-get install openssh-server
. I had left OpenVPN running on the Windows virtual machine, so fortunately I could still RDP to that.