Saturday, September 08, 2007

F7 and S10 Dual Boot

Oops. Why is it that no good news ever starts with "oops"?
Oops. I accidentally deposited $10,000 to your account.
Oh well, I guess you can keep the money
No. Oops is always bad.

As per standard operating procedure, I loaded Solaris 10 in the PC. Turns out, S10 uses GRUB, so BIOS hands off to MBR, which handed off to GRUB in sda2. (I had left sda1 open for a Linux /boot partition. Once I Solaris stable, I loaded Fedora 7.

I loaded F7 with /boot on sda1, / (root) on sda3, and a swap partition on sda5. Unfortunately, Fedora did not recognize Solaris at install time, so it did not add a GRUB stanza. With the install complete, BIOS hands off to MBR, which hands off to GRUB on sda1. Solaris was non-bootable. A quick modification to grub.conf:
title Solaris 10
rootnoverify (hd0,1)
chainloader +1
Now, BIOS hands off to MBR, which hands off to GRUB on sda1, which chooses Solaris 10, which hands off to GRUB on sda2 (presenting a second GRUB screen!), which boots S10.

Here's the oops. I attempted to build an S10 VM in a dedicated partition: sda7 (sda6 was an LVM partition). What I did not realize was that when linux boots, it sees that sda2 is a type bf Solaris. It then looks inside the partition, and allocated partition numbers to the Solaris slices. This means that when I added a partition, sda7, it actually appear to Linux as sda11.

When I installed the VM, however, I specified sda7. This means the VM installed in the slice that was S10 root. Thus, S10 is no longer bootable.


Furthermore, on reboot, the partition that appeared as sda11, now appeared as sda7 (as expected) and sda10 was now the S10 /export/home slice.
# grep "sda.*>" /var/log/dmesg
sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sda2: < solaris: [s0] sda8 [s1] sda9 [s2] sda10 [s7] sda11 >
Now I have two problems:
1. Recover the S10 boot without loosing F7.
2. Rebuild the VM on the correct partition.

No comments:

Post a Comment