Buy 2 blank boxes (2Gb RAM, Intel Core 2 Duo etc), install Intrepid plus everything I need, migrate lots of data, virtualise XP.
- I prefer using Ubuntu (esp Intrepid Ibex) to XP – the simple interface, the centralised updates, the security, the constant improvement, the community etc.
- I wanted to consolidate the family onto one OS to make support easier (and more enjoyable and worthwhile)
- I needed more storage in the form of a Terrabyte HDD so I was going to have to do some migration etc anyway.
- I wanted to virtualise XP and that is best done with a modern CPU.
- I wanted to set up a family LAN and Ubuntu provides a chance to learn the linux way of doing that.
- A newer PC would run database processes much faster (e.g. for one important task 1hr 46 mins dropped to 43 mins).
- I knew enough about scp, and IP addressing etc to run a migration.
- I wanted to make The Switch 😉
The steps described below were part of a process that took most of a long weekend. NB this particular job involved migrating across a lot of legacy data and systems across for two computers.
Inside Nautilus, ctrl-H displays all the hidden folders (they start with a dot e.g. .mozilla-thunderbird).
It is (very) good to have a long ethernet cable available (15m) to get an internet connection from your router. About NZ$19 and it saved at least that in time and hassle.
Basic Installation and Setup
Get DVDs and other multimedia etc working.
Medibuntu is your friend (media buntu). https://help.ubuntu.com/community/Medibuntu
sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
Add ability to view DVDs
sudo apt-get install libdvdcss2
Then grab all the other stuff you need:
sudo apt-get install w32codecs
Open www.youtube.com and you will be prompted to install flash. Use adobe’s for now.
Store all Files from Old PC onto New PC
I used rsync and an ethernet cable in each case. Plus setting each machine to have a static IP address.
scp -pr /media/disk1 username_on_dest@PC_IP:~/fromxp
If there is no ethernet port (as was the case on one PC) you can use a USB HDD as the intermediary. Copying onto this from a DOS prompt requires:
Assuming the drive letter assigned by Windows for the USB drive is G:
xcopy C:\*.* G:\fromxp /c /d /s /h /r
NB run this twice to be sure everything gets across. The second time will be much faster.
Lightning Calendar Migration
NB use Lightning from Synaptic, not your own download.
NB you must set a timezone for the calendar for it to work properly.
I had a Thunderbird Lightning calendar to migrate into Ubuntu from XP which should be been a straight drop-and-run operation. One problem though – Intrepid cannot currently use Lightning version 0.9, only 0.8. And the calendar database is incompatible. The solution is to go back into Windows, and export the 0.9 calendar as an ics file. Then import this ics into Ubuntu’s Thunderbird.
If you have a corrupted calendar database in Ubuntu from a failed calendar migration, close Thunderbird and then delete the storage.sdb file in your profile directory (~/.mozilla-thunderbird/xxxxxxxx.default/storage.sdb). Thunderbird will then create a new storage.sdb file when you next start it up http://e-volutiononline.com/blog/removing-damaged-sunbird-lightning-calendar.html.
Outlook Calendar Migration
I used Outport (http://outport.sourceforge.net/) to export events (as iCalendar) and tasks (special Outport variant of iCalendar). Unfortunately, the ics result for the events wouldn’t import into Thunderbird successfully. Then I noticed something in the error message which made me wonder about encoding. So I copied all the text in the ics and pasted it into a new Gedit tab (which asked me for an encoding and I chose UTF-8). That version of the ics imported easily :-).
[Update – finally found this – brilliant]
Initially had a problem getting the surround sound working with the Creative Audigy Value card. Lots of advice involved .asoundrc, ALSA, OSS etc. All were wrong ;-). The correct answer was at http://ubuntuforums.org/showthread.php?t=795525.
sudo gedit /etc/pulse/daemon.conf
then uncomment the line:
; default-sample-channels = 2
and set it to 6 (for 5.1)
default-sample-channels = 6
Then System > Preferences > Sound and set all the values to PulseAudio Sound Server.
Finally, double click on the speaker icon to get the volume control. For CA0106 (Alsa mixer) I set Preferences to show Analog Center/LFE, Analog Front, and Analog Rear. For Playback: ALSA PCM on surround51:0 (CA0106) (PulseAudio Mixer) it was Master that was needed. The main thing in my case was to set the LFE lower than the other sliders to prevent boominess.
For MoviePlayer, go Edit > Preferences > Audio and select 5.1-channel instead of stereo.
I needed to use the NVidia binary blobs which meant that the normal Gnome screen resolution etc didn’t work. Need to use System > Administration > NVIDIA X server settings. NB this won’t save your settings unless you temporarily give it access to the xorg.conf file.
sudo chmod 777 -R /etc/X11/
then save your settings, then
sudo chmod 755 -R /etc/X11/
Depending on which monitor is VGA and which is digital you may need to manually move the top and bottom panels across to the left monitor. Once there Lock Panel Position so everything is right when you reboot.
WINE and SQLyog
I knew this was supposed to work and … well it did :-). I copied everything directly from XP into ~/.wine/drive_c/Program Files”. The extra touch I added was to add an item to the main menu (System > Preferences > Main Menu) with wine “/home/username/.wine/drive_c/Program Files/sqlyog/SQLyogEnt.exe”. I even made a png version of the SQLyog dolphin icon for my menu item ;-).
I then reset the fonts to make them more pleasant. DejaVu Sans Mono is a good choice for Objects because it is fixed width (meaning everything lines up).
Favorites (US spelling!) is stored (possibly hidden) in “C:\Documents and Settings\username\Application Data\SQLyog\Favorites” and in wine you find it in “/home/g/.wine/drive_c/windows/profiles/g/Application Data/SQLyog”.
Connection details are in “C:\Documents and Settings\username\Application Data\SQLyog\sqlyog.ini” plus the ubuntu wine equivalent.
VirtualBox – Fantastic!
Aronzak’s blog contains an image which blew me away. It was definitely going to be worthwhile setting up virtualisation using VirtualBox: http://aronzak.wordpress.com/2008/08/28/black-meets-white-virtualbox-in-ubuntu-intrepid/. Firstly, I checked out come background: http://en.wikipedia.org/wiki/VirtualBox.
Out of my 2 Gbs of RAM I allocated virtual XP 1Gb and 60Gb HDD. I also set up a shared folder in Ubuntu called transfer.
Problem running Excel Virtualised
There was a strange error message of the form:
Run-time error '1004': Unable to set the x property of the PageSetup class
The answer was to install a printer to virtualised XP (see http://kbalertz.com/291298/Cannot-Setup-Property-Printers-Installed.aspx). I followed ashz’s instructions: http://forums.virtualbox.org/viewtopic.php?t=1465. NB I haven’t made it possible yet to actually print 😉 from XP (I get a page of code instead e.g. @PJL SET JOBATTR=”@IUCR=25″ which is presumably Printer Job Language (http://en.wikipedia.org/wiki/Printer_Job_Language) rather than a successful print out) but I don’t need that so it is not a high priority. XP is only for running a few MS Access-entangled programs (Python-MySQL-MS Access).
Problem opening VBA in Access
It was because Visual SourceSafe was not installed. The solution is:
(1) Open up a module of code to get into the VBA environment, and click through the error messages.
(2) Go to the add-ins menu and select “Add-In Manager”. This should pop up a dialog box.
(3) Find the entry labeled “VBA Source Code Control”. Select it. Uncheck both boxes: “Loaded/Unloaded”, and “Load on Startup”.
(4) Click OK. This should solve your problem.
Grab the sensors-applet from synaptic. NB log out and re-log in to be able to add it to the top panel.
Edit Main Menu preferences.
Increase height of top panel until icons jump one step in size.
Set screen saver.
See earlier post on PHP and Apache ( Apache and PHP on Ubuntu – Very Easy Installation ).
NB install mysql module for php from synaptic – php5-mysql and this includes both mysql and mysqli.
From the virtual XP MySQL, do a data dump ready to import into MySQL in Ubuntu.
Set up cron jobs. From synaptic install gnome schedule, then find it under Applications > System Tools > Scheduled jobs.
Maybe set up thunderbird to load automatically: http://harrycoal.co.uk/2008/07/28/run-thunderbird-in-tray-at-startup-on-linux-using-all-tray/.. No folder drag and drop within alltray! https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/180359.
Synaptic the music applet (and add itand set preferences on the top panel – great – now can pause easily when the phone rings etc).
Kompare for comparing versions of documents e.g. contracts (every word change can be identified so nothing is accidentally slipped through ;-)).
cups pdf printer via synaptic to allow printing to PDF.
From synaptic install libvisual-projectm and associated to enable extra visualisations in Rhythmbox etc. More on ProjectM http://projectm.sourceforge.net/.
MeasureIt and ColorZilla extensions for Firefox.
EasyTag for editing music collection after extraction.