From owner-freebsd-hackers@FreeBSD.ORG Thu May 28 02:32:42 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B81D98 for ; Thu, 28 May 2015 02:32:42 +0000 (UTC) (envelope-from jerrymc@jerrymc.net) Received: from jerrymc.net (jerrymc.net [75.75.214.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF5EE30 for ; Thu, 28 May 2015 02:32:41 +0000 (UTC) (envelope-from jerrymc@jerrymc.net) Received: from jerrymc.net (localhost [127.0.0.1]) by jerrymc.net (8.14.5/8.14.5) with ESMTP id t4REBw1D075153; Wed, 27 May 2015 10:11:58 -0400 (EDT) (envelope-from jerrymc@jerrymc.net) Received: (from jerrymc@localhost) by jerrymc.net (8.14.5/8.14.5/Submit) id t4REBwS2075152; Wed, 27 May 2015 10:11:58 -0400 (EDT) (envelope-from jerrymc) Date: Wed, 27 May 2015 10:11:58 -0400 From: Jerry McAllister To: "Pokala, Ravi" Cc: "freebsd-hackers@freebsd.org" Subject: Re: Quick question re: dual-booting Message-ID: <20150527141158.GB75037@jerrymc.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2015 02:32:42 -0000 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"