Linux – Partitioning advice for dual boot with Windows XP and two separate Linux installations

disk-imageimagelinuxpartitionwindows

Main goals is to have/being:

  • Windows XP
  • Main Linux installation
  • "Some other" Linux installation which I am currently experimenting with.
  • All three OS installations completely separate (at least to begin with). I won't share /home between my Linux installations, as it might be that some applications I'm using are of different versions and thus have different config files in my $HOME.
  • Able to wipe the current Windows XP installation and install a previous image of it later on, to enjoy a fresh Windows system.
  • Able to change my experiment Linux installation into some other distribution.
  • Creating a sensible partitioning scheme for this which fits my 120.0 GB hard drive. Appended info: It's for a laptop with a relatively weak CPU and no hardware viritualization support, so adding a HDD isn't an option nor is running a full fledged OS in a VM.

Why:

  • I've not used Windows for maybe 10 months. I'm not about to start using it extensivly, but it might come in handy from time to time if I need to run some Windows only software.
  • My main Linux installation is Ubuntu, which I do like a lot. At the same time I do feel that some things could be improved (it contains an exceptionally old version of Awesome in it's latest LTS offering and I tend to think that a rolling release system would be more convenient to use). Due to this I would like to explore the other distributions which are out there…
  • My experiment Linux installation should just be for testing things out. I would like to try a couple of different distributions (my first is Arch Linux) and try to configure them. It's mostly for playing around and experimenting. If I find something I like it might replace my main Linux installation later on.

Questions and thoughts:

  • How would you suggest I partition my hard drive? My idea is having Windows XP and my experimental Linux installation on one partition each. And maybe spread out my main Linux installation over multiple partitions if there is a benefit to it. Will all Linux distributions be happy to live in a single partition?
  • Do you see any problem in writing over my current Windows XP with an older image later on? I guess it shouldn't mess up the partitioning table or the MBR, but I'd like a second opinion.
  • What about the installation of different distributions on the experimental part of my hard drive? (The part I saved for experimental installs of Linux.) Any problems you foresee?
  • I was thinking of using Clonezilla for the imaging. I need to image individual partitions as that's what I need to restore as well. I'm sending/receiving the images from my home server, so they need not be stored on the 120 GB hard disk. Any comments on this? Will I have to make a note of the partitioning scheme on paper in case the partition table accidentally should be damaged to be able to restore the partitions?
  • What else should I think about when planning this setup?

Best Answer

Having done (almost) exactly this for several years on my laptop (I never replaced my Windows install with a fresh one, though), here are some comments I have:

  1. This should work just fine.
  2. Linux has no problem living on a single partition, I did it all the time with my small experimental install which in my case was Ubuntu as I run a Redhat Enterprise clone (Scientific Linux) as my primary OS. For your main install you may want to break it up into a few different partitions (e.g. /boot, /, /home, /usr/local) according to your preferences.
  3. The partitions I used were 25GB for Windows, 10GB for my "experimental" Linux, and the remaining disk for my main Linux (I have a 120GM hard drive as well). Depending on the size of your existing Windows installation and what you want for your experimental partition you can adjust these as needed. You might want a little more in the experimental Linux partition if you want to install a bunch of stuff to play with.
  4. The main issues you'll run into is every time you want to install a new OS on one of the partitions, it will want to update the MBR so that the computer boots from the newly installed OS. I worked around this by first installing Windows, then installing my primary Linux OS. Next I saved the MBR to disk and thumbdrive (i.e. dd if=/dev/sda of=orig.mbr -bs 512 -count 1) Then, whenever you install the secondary Linux you just rewrite the MBR back to the disk and update the menu.txt in the /boot/grub directory to include the reference to your new partition.
  5. I'm not sure about what the exact procedure is for installing a previous image of the windows partition. If you can just write to the disk without going through the install process, there shouldn't be any issue. If you have to reinstall and Windows overwrites the MBR you'll need a boot disk to get back into Linux (and LiveCD would work) and rewrite the MBR that you saved to restore you dual boot capability.
  6. You can share swap partitions between the two Linux installs.

The laptop in question for me was Intel Core Duo 2GHz with 2GB RAM and 120GB HD. Here is the exact partition table I used but the details aren't that important, it's just to give you an idea:

  • Dell utility partition (90MB)
  • Windows Partition (25GB)
  • /boot (100MB)
  • Logical partition (rest of the disk) containing
    • / (10 GB)
    • /usr/local (8 GB)
    • swap partition (4 GB)
    • /home (~55 GB)
    • experimental partition (10 GB)

It may not have been the best (most optimal) partitioning scheme and opinions vary widely on what partitions to create, but it worked just fine for me.