Combining 2 drives and OS's

I have two removable hard drive bays that I can lock in the particular OS I want for that particular day or whatever.

On one hdd I have Suse and on the other hdd I have XP-Pro.

I’ve reached the point where I really enjoy Suse but would also like to be able to access some docs and files on XP.

I know I can just reload everything and make this a dual boot system.

If I can I’d like to just set the XP drive in slave mode and combine both drive spaces.

Can anybody give me step by step instructions on how to configure the boot section to make it do what I want?

Or in reality would it just be easier to save my docs and pictures and just re-do everything???

Thanks
Doug

Sorry if I’m being dense here . . .

As far as accessing XP files from SuSE, why would you not just mount the XP partition that is on the other drive? Does the machine only permit access to one drive at a time?

Are you saying that you have two OS installations that you can boot from individually but not use one to boot the other; what is it you want to do differently at boot?

Again, I have 2 separate hdd that are in their very own lockable bays.

When I want to use XP I shut down the system and lock in my xp hdd.
When I want to use Suse I shut down the system and unlock the XP drive and then lock in the Suse drive.

What I want to do is to combine these 3 separate hdd’s and boot up and have the choice if I want to boot Windows or Suse.

In other words I want to get rid of the drive bays and just have both hdd’s mounted inside the case and then have the choice of booting suse or Windows.

The reason I’ve separated these drives is that I was bouncing around using various Linux distro’s I didn’t want to take a chance on hosing XP since I use that for work.

Now that I’ve found I like Suse I feel comfortable with combining the 2 hdds and having a dual boot system

You ref 2 drives, the XP and the SuSE, but then say you want to combine these 3 drives; is there a 3rd in this equation?

If you are simply moving the 2 drives to internal slots connected to on-board IDE or SATA controllers (so not dealing with external controllers, PCI cards, etc - that adds complications), that is usually fairly straight forward.

The setup you probably have on the SuSE drive is the grub bootstrap installed in that drive’s MBR with a pointer to the partition where grub’s /boot/grub/stage2 loader resides. The typical dual-boot config is to set up this drive in the bios as the boot device. In /boot/grub/menu.lst you add a stanza which “chain loads” to the boot sector of the Windows system volume, which will run ntldr and load XP.

The only tricky aspect of this is giving grub the correct alignment between the boot device sequence vis-a-vis the disk drive order as seen by the OS. With Windows, these are always the same, because Windows will only boot from the first drive. But if SuSE is on the second drive, the alignment changes and (this is critical) when grub calls the XP boot sector, it has to be fooled into thinking it is the first boot drive. Grub handles all of this.

The starting point is the /boot/grub/device.map file, which tells grub the alignment. So, if XP is on /dev/sda and SuSE is on /dev/sdb, and you are booting from SuSE on /dev/sdb, device.map will be:

(hd0) /dev/sdb
(hd1) /dev/sda

The (hd) is grub’s unique numbering scheme, starting at zero. Then in /boot/grub/menu.lst a chain loading stanza is added, like this:

title Windows XP
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
chainloader (hd1,0)+1

That tells grub to make the XP sector think it just was called from the first drive MBR, and to load the sector which is always the first sector of the partition.

Your setup may be a bit different, but this is the most typical. Given you already have SuSE installed, and if the boot loading was set up as above, then before moving the drive you would want to change the device.map and menu.lst files. You will also need to make the necessary changes to the root= clause on the kernel line, and in /etc/fstab, because the drive identifier is changing. If you don’t do all this correctly and then switch the drive, grub may not work correctly and consequently the chainload to XP would fail.

If you run into difficult with the SuSE setup, simply changing the bios boot device back to the XP drive, will get you booting back into XP. Being a big believer in Murphy’s Law, I always have an XP boot floppy (or, if no floppy, boot CD). And I always make a copy of the Windows MBR. I forget the Windows command to do that; in linux the command is:

dd if=/dev/sda of=xpmbr.bin bs=512 count=1

Where “sda” is the name of the XP drive as shown by fdisk. That file will hold the Windows bootstrap code + the partition table.

You’re right. I did mean 2 drives. I have no idea how I got a 3 in there.

Thanks for the help. I’ll look at the items you describe and see what I can do in there.

Thanks again

Doug