Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2015 10:11:58 -0400
From:      Jerry McAllister <jerrymc@msu.edu>
To:        "Pokala, Ravi" <rpokala@panasas.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Quick question re: dual-booting
Message-ID:  <20150527141158.GB75037@jerrymc.net>
In-Reply-To: <D18BC1DA.1379A1%rpokala@panasas.com>
References:  <D18BC1DA.1379A1%rpokala@panasas.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150527141158.GB75037>