From owner-freebsd-questions@FreeBSD.ORG Sun Jun 11 02:33:11 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC5AA16A418 for ; Sun, 11 Jun 2006 02:33:10 +0000 (UTC) (envelope-from beech@alaskaparadise.com) Received: from stargate.alaskaparadise.com (114-103-74-65.gci.net [65.74.103.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06AA543D45 for ; Sun, 11 Jun 2006 02:33:04 +0000 (GMT) (envelope-from beech@alaskaparadise.com) Received: by stargate.alaskaparadise.com (Postfix, from userid 0) id 4ABC03FEE; Sat, 10 Jun 2006 18:32:58 -0800 (AKDT) From: Beech Rintoul Organization: Alaska Paradise To: freebsd-questions@freebsd.org Date: Sat, 10 Jun 2006 18:32:40 -0800 User-Agent: KMail/1.9.1 References: <200606110211.k5B2BTYD014987@clunix.cl.msu.edu> In-Reply-To: <200606110211.k5B2BTYD014987@clunix.cl.msu.edu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2545291.yRSvUrSMHg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606101832.56687.beech@alaskaparadise.com> Cc: Jerry McAllister , jekillen Subject: Re: dual boot; Linux, FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jun 2006 02:33:11 -0000 --nextPart2545291.yRSvUrSMHg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 10 June 2006 18:11, Jerry McAllister wrote: > > On Jun 10, 2006, at 8:00 AM, Jerry McAllister wrote: > > >> Hello; > > >> If I want to set up a dual boot of either Linux or FreeBSD, what is > > >> the > > >> best way to go about it? > > >> Use Lilo, grub, or does FreeBSD have a boot loader that it likes > > >> better > > >> and Linux won't object to? > > > > > > Mabye you are using the term 'boot loader' for what I am used to seei= ng > > > called the 'MBR'. The boot loader I am familiar comes later in the > > > process and is unique to each OS. > > > > Thank you for correcting me on the terminology; and the info and advice. > > So MBR is Master Boot Record? I remember when installing FreeBSD and > > slicing and partitioning it asks if the slice should contain and MBR. I > > assumed > > that that was the part of the os that was os specific because the file > > systems > > are different, but I may have something to learn correctly. > > Particularly the difference > > between slices and labeling/partitioning. But this confusion hasn't > > prevented me from installing successfully. > > OK. Just a little more on MBR vs boot sector vs boot loader. > > The slice doesn't contain the MBR. That is in sector 0 of the disk devic= e. > Then 'below' that, each slice contains a boot sector. > > In FreeBSd world, a slice is the primary division of the disk. It is > generally referred to as a primary partition in Microsloth land. But > that is the same. Each slice (primary partition) can be bootable. > > To be bootable, a slice must be marked as bootable and have a boot > record in its first sector. Note that this is not the first sector on > the disk device (eg sector 0) but the boot sector of the slice. That > boot record is unique to the particular OS living in that slice. > > In FreeBSD (as with most UNIXen) each slice can be further divided > in to partitions. In FreeBSD, the 'a' partition on the slice is > generally assumed to be the system partition and is called 'root' and > gets mounted as '/'. > > The sequence of events is essentially: > The system starts up, find and runs the BIOS. > The BIOS does some hardware checks, including the boot order. > A typical boot order can be: floppy, CD, Hard disk. > The BIOS searches through its boot device list for one that has an MBR > The BIOS loads the first MBR it finds in its list and transfers control. > The MBR looks at its slice table and offers a choice of those that > are marked as bootable and have a recognizable boot record in its > boot sector. All MBRs have some way of choosing a slice to boot by > default if you don't make any other choice. > The MBR loads up that boot sector and transfers control to it. > The boot sector code does some more checking and generally runs a boot > loader that is able to read up some sort of script that tells what > features you want to be part of the system. > The boot record then finishes the boot and hands over control to the > newly booted system, usually to a program called 'init' in UNIX world. So= me > more services might still be started after init begins to run. In FreeBSD > that is controlled by the rc.xxx scripts. All that stuff that the boot > loader looks at and the init program that is given control are normally > somewhere in the root (/) partition, which is part of the slice being > booted, which is a primary division of the disk device being booted. > > So, in a sense, there is a hierarchy: BIOS, disk device, slice then > partition Each has some part of the boot and tha is used in order. > > If there are bootable slices on more than one disk device, then each disk > that has a bootable slice that you intend to use that way, must have an > MBR. Each bootable slice on each bootable disk must have a boot record in > the boot sector. After that, it is up the the OS what comes next. > The BIOS only deals with the first device in its boot list that has a > proper MBR and hands control to it. If there is more than one device > to choose from, that MBR has to figure it out and give you that choice. > > Although it would be possible for that first MBR to read up all the > slices that are marked as bootable on all disk devices and offer them > all as choices right off the bat. But, at least the FreeBSD MBR starts > with the its own bootable slices and then just the other disks that > have MBRs If you want one of the other disks, you first select that > disk (generally identified as choice 5 or F5) and then its MBR will > put up its list of choices for you. I haven't tried it with 3 disks > with bootable slices. I guess it will just continue on. > > Anyway, this all works just fine. The MBR and initial boot record in > the boot sector of each slice (or primary partition if you must degrade > to MS terminology) have just enough standardization that the FreeBSD MBR > or most any of the other more fancy ones, can initiate the boot for any > of the OS-en commonly available to run on these machines. Since the OS > specific stuff really comes after it gets in to the slice boot record > code in the boot sector, then generally any of them can boot any of them. > The exception is MS MBRs. I have heard that some more recent ones play > better, but any I have had so far will not boot any slice except one > for a MS OS. I don't know what they screw up, but find it not surprisin= g. > > So, there is the tome. > All newbies, careful what you ask. Someone may answer thusly with more > than you every wanted to know. > > ////jerry Maybe this ought to be included in the handbook. I've seen this question or= =20 one like it 100's of times on these lists. That was the best answer I've=20 seen. Just my $.02 Beech > > > > All of those you name will work as an MBR. > > > I just stick with the FreeBSD MBR but I don't have any need for fancy > > > features or display formatting that the others give you. > > > The FreeBSD MBR should be able to start any of them. FreeBSD can be > > > started from any of those MBRs. It is more an aesthetic thing. > > > Advocates > > > of each tend to get rabidly partisan. But, the really meaningful > > > differences > > > are small. > > > > > > Past the MBR stage, use the boot sector and boot loader stuff that > > > comes > > > with the OS you put on each bootable slice. > > > > > > One thing you need to do is put the MBR on each disk if you are putti= ng > > > each OS on a separate disk. The Bios will start the first one and > > > the MBR should then give you a choice of any bootable slices on the > > > first > > > drive and also the choice of going to the second drive MBR. If you > > > then chose the second MBR, that one will give you the choice of all > > > the bootable slices on that drive. Probably you will make only one > > > bootable slice on each drive, but could make up to 4. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" =2D-=20 =2D------------------------------------------------------------------------= =2D------------- Beech Rintoul - Sys. Administrator - beech@alaskaparadise.com /"\ ASCII Ribbon Campaign | Alaska Paradise \ / - NO HTML/RTF in e-mail | 201 East 9Th Avenue Ste.310 X - NO Word docs in e-mail | Anchorage, AK 99501 / \ - Please visit Alaska Paradise - http://www.alaskaparadise.com =2D------------------------------------------------------------------------= =2D------------- --nextPart2545291.yRSvUrSMHg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQBEi4DYp5D0B1NlT4URAkH5AJ94Yj0Yn4WBtu/2Z/Jr9jhUMZL0pgCaA/9I SnEOiEk17C+itx2nS4mE0Cs= =P4sj -----END PGP SIGNATURE----- --nextPart2545291.yRSvUrSMHg--