I have a computer with several operating-systems installed on different partitions:
- Extended Partition
- / -partition for Linux-Mint
- Swap for Linux-Mint
- /home for Linux-Mint
- / -partition (and everything) for Linux CentOS
My main OS is Linux-Mint, an Ubuntu derivitive.
I have GRUB2 installed in MBR, and it (GRUB) uses data from the Linux-Mint installation (/boot/grub etc.).
FreeBSD and PC-BSD each has their own 2nd stage boot-loader in their partition. Solaris has it's own GRUB-installation in it's partition (which act as a 2nd stage boot-loader, enabling me to select between different Solaris-kernels). Linux-Mint and CentOS are booted by the GRUB in MBR.
My problem is FreeBSD and PC-BSD -- they just won't play nice with eachother! Even though I've specified different root-partitions etc. in the GRUB-entries for the two BSD-installation; the same one (either FreeBSD or PC-BSD) is booted, no matter if I selected FreeBSD or PC-BSD from the GRUB-menu.
Booting *BSD appears to be a three stage process: The MBR-loader (1st stage), loads a 2nd stage in the BSD-partitions, which finally loads the actual kernel (3rd stage).
Finally lowering myself to RTFM about booting in *BSD, I discovered the following tidbit about the 2nd stage BSD-bootloader (which has been installed in both of my BSD-partitions):
- If no BSD-partition is marked as the active one (the bootable) in the partition-table, then the loader will commence 3rd stage loading of the BSD-kernel loacated in the 1st BSD-partition on the disk -- no matter from which BSD-partition the 2nd stage was loaded. In my case, it'll always load FreeBSD (since it's first).
- If on the other hand a BSD-partition is marked as active (bootable), this will be the BSD-kernel that will be loaded as 3rd stage. In my case, I'll either always get FreeBSD or always get PC-BSD.
Surely there must be some way around this?! Perhaps somehow skipping the 2nd stage, and let GRUB load the 3rd stage kernel directly -- and then different kernels depending on my choice... Or perhaps some special arguments or configurations for the 2nd stage -- or maybe an alternative 2nd stage loader? Has someone here come across a similar problem and solved it?
PS: The installation of GRUB in the MBR, overwrote the 1st stage boot-loader installed by FreeBSD (and PC-BSD). I howver doubt using the FreeBSD 1st stage would've solved my problem, since the problem is (AFAIK) the 2nd stage loader.