Monday, September 11, 2006

dual-boot Ubuntu/Windows

I have a new laptop from my boss! A Dell XPS M1710; it feels a bit like an SUV of laptops... it weighs more than I do, comes with an on-board fusion reactor, and emits a menacing red glow from around its edges. It's just chock-full of gigabytes and megahertz and stuff. I will never complain that my boss skimps on our hardware. I think I need a mule to carry it, though.

Anyway, since I'm torn between my love of Linux and my workplace's Windows mandate, I decided to make the machine mirror my split. I need a dual-boot Windows/Ubuntu machine. Since this is the first time I've done so, I'm really glad it was on a clean machine... it was not as smooth as vanilla Ubuntu.

Here's what I did. You should skip step 2.
  1. Found good documentation on the Ubuntu wiki
  2. Let standard Ubuntu installer attempt to shrink the main Windows (NTFS) partition, to give me room for Linux partitions. I ended up with partitons of type "unknown". Oops!
  3. Re-installed Windows from its CD, this time setting its NTFS partition up with about 1/3 the total disk space and leaving the rest uncommitted.
  4. Followed the instructions from the "Issues with Windows XP and NTFS" section of WindowsDualBoot: created a System Rescue CD, booted from it, and used run_qtparted to redo the partitioning.
  5. Created a single physical partition - the last one of the four I'm allowed.
  6. Within the final physical partition, created a linux-swap partition (4 GB for my 2 GB of memory). Divided the rest of the disk between an ext3 partition for Linux root and a FAT32 partition for data that Windows and Linux will be able to share.
  7. Started the Ubuntu installer again; chose "manually edit the partition table", and assigned the swap and ext3 partitions to Ubuntu.
Accepting the defaults, my FAT32 partition got labelled "sda5" under Ubuntu and "e:" under Windows. Sure enough, both OS's can access it OK.

Success! One dual boot laptop, hooray! (Yes, I know, if I'd been really bold, I would have used Xen to run both OS's virtually. Maybe next time.)

2 comments:

Anonymous said...

The slightly safer alternative to Xen is to use VMWare client and an image from EasyVMX.

Although I've tried it on my 512Mb machine at work and it can get a little slow at times ...

dan said...

I don't recommend doing dual boot, unless you spend a lot of time using Windows, unless you're a lot more responsible than me. (Which is very possible!)

The problem that seems to happen is that people don't use Windows much (for the, um, obvious reason), and then when they boot it once in a blue moon, they forget to install security updates. We have consistently had our dual-boot machines get hacked much more than the single-boot ones, or the ones where Windows runs in a VMWare box.