Quick question re: dual-booting
Jerry McAllister
jerrymc at msu.edu
Thu May 28 02:32:42 UTC 2015
On Thu, May 28, 2015 at 01:47:55AM +0000, Pokala, Ravi wrote:
> Hi folks,
>
> For doing some apples-to-apples comparisons on a piece of hardware, we
> want to be able to easily flip back and forth between FreeBSD (10.1,
> amd64, traditional non-UEFI bootstrap w/ GPT) and Linux. To minimize the
> chance of an installer going wrong and nuking something, we're installing
> one drive, installing FreeBSD on it, then swapping in another drive and
> installing Linux on it. Then we'll install both drives, and let the
> bootloader control which one gets booted.
>
> The question is: how do we tell the bootloader which OS to boot? If we can
> do it using loader, great! If we have to use something like grub, that's
> fine too. But either way, I need some guidance.
It has been so long since I last did this, I cannot remember the
correct names of things. But, basically
- the BIOS boot code loads the MBR on the first found drive based on
the boot order you set in the BIOS (the default might be OK, but if
not, you interrupt the boot and at the configuration menu you choose
your desired boot order.
- The MBR makes up a list of all of the blocks marked as bootable on that
first drive - can be up to 4 - and, if there is an MBR on the next drive
in will also list that.
- You can select one of the boot blocks or the MBR of the next drive.
- If you select a boot block, it goes ahead and loads it and jumps to it
to complete booting.
- If you select the next drive MBR (if there is one) then execution
continues there.
- That MBR makes a list of the boot blocks on that drive plus the next
drives MBR from which you can select.
If there is only one bootable drive configured in the BIOS boot order
then you do not absolutely need an MBR. It will just boot the only
drive. But, I always suggest people just have it. It doesn't hurt
anything and might possibly save some hassles if you try to do something
weird later. There can also be other devices in the boot order list such
as CD or Floppy, etc.
There are other boot managers such as Grub. They do about the same
stuff except they use some space that the default boot manager leaves
untouched to make much more complete labeling of boot blocks and some
allow the drive to be divided in to more than 4 bootable blocks. But
otherwise they accomplish the same thing.
Work has been done on how drives are divided and the way file systems
are layed out since the last times I was dipping in to this, so many
details be changed. But, I think the basic overall action is similar.
Have fun,
////jerry
>
> Thoughts?
>
> Thanks,
>
> Ravi
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-hackers
mailing list