Migrating to Linux

From JimboWiki
Revision as of 16:59, 26 October 2007 by J (Talk | contribs)

Jump to: navigation, search

Want to start computing in Linux? Have a Windows system that you're not ready to give up? Hate the idea of dual-booting? Yeah, me too. Luckily for us, I think I've found a fairly nice solution.

NOTE: I haven't finished getting this to work yet - I started on 10/14/07. I'll document what I've done as I go with notes, and make a complete document when I'm done.

Summary

I have a laptop with an 80GB hard drive dedicated to Windows. I have purchased a new 200GB drive which I plan on installing both Windows and Ubuntu Linux 7.10 on. Sound like dual booting? Well, so far it is. Then through some trickery, I'm going to make it possible to be able to run Windows in a virtual machine (henceforth "VM"), but still make it possible to boot directly into Windows if the need arises. Using a VM makes sure that I can run any software designed for windows - not just the ones that work with a compatibility layer. Having dual-boot compatibility means that I can free up the resources used by the VM software and the host operating system if I want to.

After I get that working, I plan on looking into WINE, a Windows compatibility layer for Linux. Hopefully, I can use WINE to minimize the need for the VM. If I'm tricky enough, I might even be able to get it to use the same installation of Windows.

This is all very prone to accidental destruction of both operating systems, so I would suggest you not do this before backing up everything - say in a nice Notron Ghost image. No, I don't get a commission on plugging Ghost, it's just a nice tool.

Plan

Here's the overview of my plan:

  1. Take a Ghost image of the current Windows hard drive (Norton Ghost is not free, but it is a tool any computer geek should definitely have.)
  2. Install Windows on the new hard drive from the Ghost image
  3. Install Ubuntu 7.10 Gusty Gibbon (it's a beta now, but will be available as a full release by the end of the week)
  4. Set up VMWare Server (available for free)
  5. Set up Windows with hardware profiles to allow it to boot in both VM and standalone mode
  6. Check and make sure everything works
  7. Figure out if WINE can work somewhere in this system

The How-to

Like I mentioned earlier, I haven't actually finished this project yet. I have all the pieces, now I just need to put them together. Watch here for more details as the fun unfolds.

  1. Use your favorite imaging tool to image your Windows installation to the new drive, or install a fresh copy of Windows
    • Be sure that Windows is installed on the first partition of the primary drive
    • I used a copy of Acronis Disk Imager - which is not free. You can use any drive-to-drive imaging software to do this step.
      1. Install the old drive and the new drive into a computer. In my case, I used a desktop machine for this, because the laptop does not fit 2 drives (For laptop IDE drives, you can buy an adapter to make them work in towers - the adapters are about $5, and worth every penny. For laptop SATA drives, the connectors are the same as the desktop computer.)
      2. Boot into the imaging software (In my case, Acronis - I found that Norton Ghost does not do drive-drive copy in the bootable mode)
      3. Copy the drive (this took me about 35 minutes for an 80GB drive.)
    • If you want to do the imaging with the free "partimage" Linux tool, follow these steps:
      1. If Windows is installed on an NTFS partition (the default for Windows 2000/XP), defragment the Windows NTFS partition. This will help avoid issues in the imaging process
      2. If you're using a desktop machine and plan on using a new hard drive, install the new drive - this saves some work later
      3. Boot using the Ubuntu Live/Install CD
      4. Get it connected to the Internet
      5. Install "partimage" using apt-get
      6. Run partimage (from console) and create an image of the Windows partition to some external device (network share, removable hard drive, whatever you like)
      7. If you did not install the new hard drive, install it now. Boot the live CD again, get it back online, get partimage installed.
      8. Install "gparted" and "ntfstools" using apt-get
      9. Create a new NTFS partition of about the same size as the drive you just imaged (must be same or larger) on the new hard drive
      10. Use partimage to fill the new partition from the partimage image file
  2. Install Ubuntu using the "Install" shortcut on the desktop of the Live/Install CD
    • IMPORTANT! When asked to set up partitions, select the advanced mode.
      1. Do not alter the existing NTFS partition
      2. Add a partition of type ext2, size about 100MB, mounted at /boot. We have to separate out the boot partition so that when the bootloader runs in the VM, it doesn't conflict with the root filesystem of the host operating system.
      3. Add a swap partition - 512-1024MB depending on what you feel like.
      4. Add a partition of type ext3, filling the rest of the drive, mounted at /.
      5. For the remainder of the installation, default values are acceptable.
      6. The installer should detect Windows and add it to the Grub bootloader automatically. It may also ask you if you want to import settings from Windows. (That didn't work for me at all, but it's a nice idea)
  3. Boot and configure Ubuntu
  4. Boot Windows and set up hardware profile
  5. Install VMWare
  6. Set up users for disk access
  7. Create the VM
  8. Troubleshooting

Notes

  • tried to use partimage instead of Norton Ghost - it's free, and it runs in Linux. Seems to work pretty well with NTFS
    • needed to create an NTFS partition with gparted - had to install ntfstools to do that
  • Used Acronis bootable imaging tool to fill the new disk
  • Got Windows to boot, significant work due to hardware confilcts