Dualbooting with Xosl

This is an account of my experience of getting a computer (a Dell Inspiron 1720 laptop) to dualboot Vista and Windows 7 using Xosl - the Extensible Operating System Loader. This is a draft version of this document which will be padded out with more detail in due course. My Situation

I've been using Vista and wanted to try out Windows 7 Release Candidate before buying it. I wanted to dual boot my system and on recommendations from Multibooters decided to use Xosl to manage my dual boot setup.

I've been making backup images of my Vista partition using Acronis True Image Home and want to be able to use these backup images with the new dual boot system.

Read Multibooters for an indepth view of how Windows boots and how bootloaders work.

So I had Vista installed on some partition and could have just installed Windows 7 to another partition. In this scenario the Windows 7 installation puts some "extra code" onto my Vista partition so that when I boot up my computer, Vista offers me the opportunity to boot Vista or Windows 7. And this would be just fine if, and it's a big if, I did not want to use any backup images created prior to the dual boot set up.

This is because, restoring a Vista partition from a backup image, would wipe out that "extra code" just added and on rebooting after the restore I'd have access my Vista but not to Windows 7.

With Xosl you can have totally separate OS's that boot totally independently. And so you can make totally independent backup images of your separate OS's. My New Configuration

A hard drive can have up to 4 primary partitions. These primary partitions are referenced in the Master Boot Record of the hard drive and there are only 4 of them. It is possible to use one primary partition as an extended partition containing a number of logical partitions. The information on logical partitions is stored elsewhere. In general Vista and Windows 7 installations have to use a primary partition - although I have seem some references on the net to installing Windows on logical partitions I was unable to get that working despite lengthy trials. I also was not able to successfully multiboot Windows installed to primary partitions on my 2nd internal hard drive. Any info how to do this would be welcome.

The Dell Inspiron I have out of the box used 3 primary partitions - one for Vista, one for diagnostic software and one for a recovery partition. I deleted the recovery partition (as I make my own backups anyway) but decided to keep the diagnostic partition even though I've yet to use it. Xosl can be run from a logical partition as can some versions of Linux. So my partition scheme for a 250GB drive looked something like this: Dell diagnostics Primary partition 115MB Vista Primary partition 70GB Win7 Primary partition 70GB Extended partition Logical partition Xosl 32MB Logical partition Vista_data 70GB Logical partition Win7_data 70GB Backup Everything

You are effectively performing open heart surgery on your computer when you do any of this - so make sure you backup everything. I made images of all my Windows partitions to an external hard drive using Acronis True Image Home. I also backed up the Dell diagnostics partition - just in case. In addition to this you should backup your Master Boot Records. I used the Ultimate Boot CD to create my dual boot system.

A tool on UBCD, MBRTool, enables you to backup your MBRs. However the tool, originally designed to use with a floppy disk, writes the MBR onto the media from which it was run. Obviously if you had a CD this will not work as MBRTool can't write to the CD. However the UBCD can be run from a USB stick. I found it useful in some instances to use UBCD from a CD rather than a USB stick. This is because the USB stick is seen by most tools on UBCD as another hard drive. When using UBCD from a CD I can be certain about references to disks referring only to my 2 internal hard drives and not to the USB stick. To write data onto your source media you have to use a USB stick.

Detailed instructions on how to use MBRTool can be found at DIY Data Recovery. On turning on my Dell I can press F12 while the Bios is starting - this generates a prompt asking me if I want to boot from a hard drive, the cdrom or a USB stick. If your computer doesn't provide similar functionality you may be able to change the boot order of devices in your BIOS setup. So I can choose USB stick. This boots into UBCD and from here you can navigate to the MBRTool. It is important to note that MBRTool now sees 3 disks - DSK0/USB Stick, DSK1/main HDD, DSK2/second HDD. I used option 4 "Work with a MBR" and made backups of of the DSK1 and DSK2 MBRs. You have to choose a name for your MBR backups - say you choose the names MYDISK1 and MYDISK2 - the following files will be written to your USB stick - MYDISK1.129 and MYDISK2.130 respectively. When you exit the MBRTool you'll be presented with a drive letter and by typing DIR to list directory/folder contents you should see these files. Good you've now backed up everything. It's a good idea at this point to test your ability to be able to restore your new MBR backups Install Vista and Xosl

I repartitioned my main hard drive according to the partition scheme in the table above using Acronis Disk Director. Now we need to install Vista - I could either do a clean install of Vista (uncontaminated by the Windows bootloader - that is no attempt to install Windows 7 has been made using Windows default dual boot software) or restore one my Acronis True Image Home images (which are also uncontaminated by the Windows bootloader). Note that if the amount of space taken up on your Vista in your backup image is still less than the size of your new partition, Acronis True Image Home will still allow you to restore the image to this smaller partition.

Now that Vista is installed, let's get Xosl working with our single OS - Vista. Note that 4 bytes of the 256 byte MBR are called the Disk Signature. If the information in these bytes is incorrect Windows will not load. Unfortunately when Xosl is installed it overwrites the Disk Signature. So we need to take a copy of this disk signature before we install Xosl and we have to restore the disk signature after installing Xosl. This is a lot easier to do than it sounds. I used the UBCD CD to boot from and used the PTS Disk Editor to edit the MBR of my main hard drive. The 4 bytes of the disk signature reside at address #01B8 - #01BB (these numbers are in hexadecimal) inclusive. To give you some idea visually of the bytes you need to record see Multibooters). Write these numbers down.

Now reboot and install Xosl onto the small logical partition we created for it. Using the same process as just described, restore the disk signature. On booting your system, Xosl should start up.

You'll need to create an entry for each OS you add to your multiboot system in Xosl. So let's create one for Vista. You have to tell Xosl which partition has Vista on it. You can also tell Xosl which partitions to hide when you boot Vista. So we don't need to see the Dell diagnostics nor the Windows 7 partition. Once this entry is created you should be able to boot into Vista. Windows 7 and Xosl

Ordinarily if we install Windows 7 after Vista, some "extra code" is written on the Vista partition to allow Windows to dual boot using the Windows bootloader. We don't want this to happen. On doing a clean install of Windows 7, we don't want previously installed OS's (in our case Vista) from being found. We need to "hide" the Vista partition. I use Acronis Disk Director to manage my partitions - where we have an option to hide the Vista partition. Now just boot from the Windows 7 DVD and install it onto your partition allocated for Windows 7. Windows 7 will change the MBR affecting Xosl. However the disk signature remains the same - I checked.

The install of Windows 7 will have affected the MBR so we need to restore Xosl - boot from the UBCD CD, choose Xosl and use the restore option. Having restored Xosl we'll have to fix the disk signature as mentioned above. So use PTS Disk Editor as described above to restore the disk signature.

As for Vista, create an entry in Xosl for Windows 7. Make sure you hide relevant partitions from Vista and from Win7 and you'll have a dual boot system. You should now be able to make backup images of both your Vista and Win7 partitions, using Acronis True Home or other disk imaging software, separate from each other. Acronis True Image Home works just fine with this setup.

After setting up both Vista and Windows 7 you might want to change the drive letters so that, for example, the J drive letter refers to your external hard drive in both Vista and Windows 7. They might not be the same after the install.

You should backup your MBR again using instructions as above. I recommend making the backup twice onto 2 USB sticks in case one should fail or you overwrite the data accidentally. The ISO image of UBCD is 115MB - I imagine it should fit onto a 256MB USB stick

And there you go. Enjoy your two systems. Why not have a well deserved cuppa! validate xhtml validate css