Windows to Linux migration
Note: ported from kaear.co.uk, written ~2002. This piece was really an online notebook of how I got from one place to another and some of the caveats I found on the way.
Preparing the HD
Backup backup backup and backup are the 4 key words to bear in mind when making an initial migration from Windows to Linux. If you have all your data already on some portable media (optical is probably best, due to the support of optical devices under linux) then you can go ahead and blank your drive, ready to start again - but otherwise, you'll need to start backing up the movable parts of your system so it's possible to write a new partition table to the disk.
I was lucky, I had a 160GB hard drive delivered to me a few days before it was due to go into someone elses machine. The steps were as follows:
HDA - 120GB permanent
HDB - 160GB temporary
- Image HDA onto HDB.
- Blank HDA.
- Partition HDA.
- Copy necessary data from HDA to HDB.
Desktop Environments
Coming from Windows, the term “Desktop Environment” probably won't mean much. Get used to the idea, however, because Linux (properly, GNU/Linux) is a pick & mix operating system. To bring you up to speed, a Linux desktop environment (also “window manager”, also that tends not to have all the nifty applications) is the equivalent of explorer.exe in Windows. That is to say, when you login to Windows and when you stare at a screen with a start menu and a desktop, that is a desktop environment.
I've relocated most of this section to another article, which I would of course advise you read, but the long and the short of it is:
- If you've got the horsepower to spare, start with KDE.
- If you want to use something different straight off the bat, then don't forget a lot of really cool programs that you will want to use are built for KDE/Gnome, so you'll have to install a lot of (if not all of) KDE and/or Gnome anyway.
- If you have really low power, start with Blackbox or a newer version of Fluxbox.
- If diskspace is an issue then start learning to use that command line.
Outlook Express
If you haven't ever tried to convert from Outlook Express to something sensible - be aware that it's most easily accomplished under Windows. There are tools to convert Outlook to mbox (plain-text “mailbox” files) under Linux, but I couldn't find anything that would do the trick. DbConv () will take the original dbx files (found under “C:\Documents & Settings\Local Settings\Identities\Microsoft\Outlook Express\” or similar on Windows 2000) and put them straight into mbox files, which are then useful.
See the section on email in the Applications section of AMD64 desktop install log for details of what exactly to do with these darn mbox files.
MS Access
I archive and database everything, so moving away from Access was actually quite a frightening prospect for me. There are many more database options than you could ever require, and a good many more than you'll ever use - but almost all of them are server-oriented, so get used to the concept of a client-server relationship with your new database.
I chose to migrate to MySQL, simply because I know at some point I will have to utilise it for the purposes of web development, again. PostgreSQL is another popular option: googling will provide you with more options.
Another progressive idea is the “light-weight stand-alone database”, similar in concept to MS Access. SQLite (name check, please) is a fantastic concept that may well provide the portable solution to databases to Linux.
MySQL is the server, MySQL Control-Center is the GUI front-end that'll allow you to work in a similar way to how you used to work with Access.
VBA (Visual Basic for Applications)
OpenOffice uses a macro language named “StarBasic”, developed by Sun Microsystems for their StarOffice. It's syntactically the same as VBA, but due to the underlying structure of OpenOffice porting VBA to StarBasic is usually a case of Find/Replace.
The documentation for OO is quite complete, if not spread very liberally around www.openoffice.org.
I advise a rewrite of any macros you have using a Find/Replace function, instead of trying to rerecord them. If you have very large recorded macros in VBA, I advise documenting them and then sifting through the StarBasic reference file for conversions.
ASP (Active Server Pages)
Mono is a project currently under development by Novell for running the .NET framework under *Nix systems. apache::asp is a free-developers project for running ASP under the Apache webserver.
Neither of those projects have native support for VBScript (understandably, it's a MS proprietry language). There are a few projects/applications around for running automated conversions from VBScript into Perl (for apache::asp) or similar - but these all require a rewrite of core source code from the initial files, something I'm not prepared to do just yet.
A solution is an inline VBScript Parser that converts ASP/VBScript into ASP/Perl for apache::asp on-the-fly. It's on my project list of things to do, but, not moved very far yet.
Disk Free Space
Disk space, you think you've got loads of it, and infact, you have.
Until you stop looking.
I found myself in an enormous pickle when I ran out of hard disk space - instinctively I reached for some kind of graphical view (Windows uses the pie charts) of my hard disk, and found nothing!
After far too much looking, and finding far too many KDE/Gnome native applications, xdiskfree was found, and it was good.
I couldn't get it to compile, so use the binary.
http://xdiskusage.sourceforge.net/
Edit (May 2005): instead of using a graphical viewer, it's very practical to use the commandline, too. xdiskusage is based on the command “du”:
# Lists all the folders and their sizes in your home directory. user@host:~$ du 804 ./.thumbnails/normal 808 ./.thumbnails 4 ./.audacity_temp 300 ./.mplayer/font 424 ./.mplayer 100 ./Choices/MIME-types 24 ./Choices/ROX-Filer 24 ./Choices/MIME-icons [snip]
Alternatively, you can specify what directory to look at:
# Returns the size of the directory given user@host:~$ du /etc/rc.d 160 /etc/rc.d
All of these commands can be given options, see “man du” for a complete list - but my two personal favourites:
# Returns the size of the directory given, in human readable form user@host:~$ du /etc/X11/ -h [snip] 116K /etc/X11/xkb/keycodes 2.8M /etc/X11/xkb 8.0K /etc/X11/xserver 8.0K /etc/X11/xsm 100K /etc/X11/xfce4 16K /etc/X11/imwheel 3.6M /etc/X11/ user@host:~$ du /etc/X11/ -hc [snip] 100K /etc/X11/xfce4 16K /etc/X11/imwheel 3.6M /etc/X11/ 3.6M total''
-h for human readable, and -c to display the total. In addition to this detailed view of things, the command “df” shows a more generalised model of your free space:
user@host:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 24027656 3522232 19284888 16% / /dev/sda1 46633 13319 30906 31% /boot /dev/sda4 167252152 77500568 81255612 49% /home
Again, -h can be used to render this into something more easily digested:
user@host:~$ df Filesystem Size Used Avail Use% Mounted on /dev/sda2 23G 3.4G 19G 16% / /dev/sda1 46M 14M 31M 31% /boot /dev/sda4 160G 74G 78G 49% /home
File Permissions
Something that people have obviously noticed, but no one seems to talk about, are the strange permissions that Windows files appear to gain when looking at them from Linux. I first noticed it when using Samba to view the shared portions of my laptop hard drive:
All the files had executable permissions.
I didn't think anything of it, and thought even less of it since I use my laptop mostly as a roaming terminal - not a desktop replacement or storage device. Until I came to move all the data from NTFS to Ext3, that is.
Suddenly when using directory browsers that were MIME-type enabled (I use Rox when i need ye olde GUI file lists) all the files were programs.
All of them!
It meant not being able to click a document, file, whatever, and get it to run in it's appropriate program anymore. Not an issue had it been only one or two files - but I had nearly 70 GB of stuff that needed changing!
So I tried changing them, on a small scale to begin with. My MP3 directory:
chmod 640 ~/Music/ -R
“chmod”: change permissions “640”: permission string (in this case, it means “rw- r– —”, which is user-group-global) ”~/Music/”: my music directory ”-R”: recursively change the permissions
The recurse, however, starts at the first point - ~/Music/. So, ~/Music/ gets the rw-r—– permissions set to it, and then the program attempts to recurse into Music/. Of course, it can't because Music/ no longer has “execute” permissions - which are required to be able to traverse into that directory!
To solve this problem, I wrote a rather amateurish looking shell script that did the job for me. It's been revised a few times since, to do the job somewhat more efficiently and be able to cope with various erroneous conditions - such as the empty directory issue.
I was so impressed with it, that I've given it it's own portion of page to wallow in. You'll find it under Scripts!
Conclusion
This was never written as a walkthrough, more a vague account of the problems associated with migrating from one OS to another.