From owner-freebsd-doc@FreeBSD.ORG Wed Sep 14 21:43:50 2005 Return-Path: X-Original-To: doc@freebsd.org Delivered-To: freebsd-doc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DFC9A16A41F; Wed, 14 Sep 2005 21:43:50 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from opusnet.com (mail.opusnet.com [209.210.200.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EFBA43D45; Wed, 14 Sep 2005 21:43:50 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from localhost.localhost [70.98.246.232] by opusnet.com with ESMTP (SMTPD32-8.05) id A97C4A700CC; Wed, 14 Sep 2005 14:43:24 -0700 Received: from localhost.localhost (localhost.localhost [127.0.0.1]) by localhost.localhost (8.13.3/8.13.3) with ESMTP id j8ELieLE064727; Wed, 14 Sep 2005 14:44:40 -0700 (PDT) (envelope-from garys@opusnet.com) Received: (from jojo@localhost) by localhost.localhost (8.13.3/8.13.3/Submit) id j8ELiUIT064726; Wed, 14 Sep 2005 14:44:30 -0700 (PDT) (envelope-from garys@opusnet.com) To: doc@freebsd.org From: garys@opusnet.com (Gary W. Swearingen) Date: Wed, 14 Sep 2005 14:44:30 -0700 Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Giorgos Keramidas , Kevin Oberman Subject: RFC: second try at improving Handbook's boot manager text X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2005 21:43:51 -0000 A couple of people didn't agree with my grammar and one had some other comments about the boot manager text of the Handbook (and my change). So here's another go at it, before I've committed it this time. There's considerably more to criticize now. :) I wasn't given much help with the "boot0ext" thing, so I'll leave that for others to add later. --- chapter.committed1.sgml Mon Sep 12 08:14:54 2005 +++ chapter.sgml Wed Sep 14 14:24:39 2005 @@ -71,32 +71,44 @@ load the operating system, which has become shortened to booting. + BIOS + + Basic Input/Output SystemBIOS + On x86 hardware the Basic Input/Output System (BIOS) is responsible for loading the operating system. To do this, the BIOS looks on the hard disk for the Master Boot Record (MBR), which must be located on a specific place on the disk. The BIOS has enough knowledge to load and run the MBR, and assumes that the MBR can then carry out the rest of the - tasks involved in loading the operating system. + tasks involved in loading the operating system, + possibly with the help the BIOS. + + Boot Manager + + Boot Loader - - BIOS - - - - Basic Input/Output System - BIOS - - - If you only have one operating system installed on your disks then - the standard MBR will suffice. This MBR searches for the first bootable - slice on the disk, and then runs the code on that slice to load the - remainder of the operating system. + The code within the MBR is usually referred to as a boot + manager, especially when it interacts with the user; in this case + the boot manager usually also has more code in the first + track of the disk or within some OS's file system. (A + boot manager is sometimes also called a boot loader, + but FreeBSD uses that term for a later stage of booting.) Popular boot + managers include boot0 (a.k.a. Boot + Easy, the standard &os; boot manager), + Grub, GAG, and + LILO. + (Only boot0 fits within the MBR.) + + If you have only one operating system installed on your disks then + a standard PC MBR will suffice. This MBR searches for the first bootable + (a.k.a. active) slice on the disk, and then runs the code on that slice to load the + remainder of the operating system. The MBR installed by &man.fdisk.8;, + by default, is such an MBR; it is based on /boot/mbr. If you have installed multiple operating systems on your disks then - you can install a different MBR, one that can display a list of + you can install a different boot manager, one that can display a list of different operating systems, and allows you to choose the one to boot - from. FreeBSD comes with one such MBR which can be installed, and other - operating system vendors also provide alternative MBRs. + from. Two of these are discussed in the next subsection. The remainder of the FreeBSD bootstrap system is divided into three stages. The first stage is run by the MBR, which knows just enough to @@ -122,29 +134,27 @@ - The MBR, and Boot Stages One, Two, and Three + The Boot Manager and Boot Stages - MBR, <filename>/boot/boot0</filename> + The Boot Manager Master Boot Record (MBR) - The MBR installed by FreeBSD's installer and by boot0cfg(8) - are based on /boot/boot0. The MBR is the first - sector of a disk, outside slices. (The MBR installed by fdisk(8), - by default, is based on /boot/mbr; it is - similar to the PC-DOS MBR and it boots the slice marked - active without prompting the user as the - FreeBSD MBR does.) - - boot0 is very simple, since the - program in the MBR can only be 512 bytes in - size. - (Actually, it can only be 446 bytes because of the slice - table and the 0x55AA identifier at the end of the MBR). - If you have installed the FreeBSD MBR and have installed - multiple operating systems on your hard disks then you will see a - display similar to this one at boot time: - + The code in the MBR or boot manager is sometimes referred to as + stage zero of the boot process. This subsection + discusses two of the boot managers previously mentioned: + boot0 and LILO. + + The <application>boot0</application> Boot Manager: + The MBR installed by FreeBSD's installer or &man.boot0cfg.8;, by + default, is based on /boot/boot0. + (The boot0 program is very simple, since the + program in the MBR can only be 446 bytes long because of the slice + table and 0x55AA identifier at the end of the MBR.) + If you have installed boot0 and + multiple operating systems on your hard disks, then you will see a + display similar to this one at boot time: + <filename>boot0</filename> Screenshot @@ -164,21 +174,23 @@ &prompt.root; fdisk -B -b /boot/boot0 device - Where device is the device that you + where device is the device that you boot from, such as ad0 for the first IDE disk, ad2 for the first IDE disk on a second IDE controller, da0 for the first SCSI disk, - and so on. + and so on. Or, if you want a custom configuration of the MBR, + use &man.boot0cfg.8;. - If you are a Linux user, however, and prefer that - LILO control the boot process, you can - edit the /etc/lilo.conf file for FreeBSD, or - select - during the FreeBSD installation process. If you have installed the - FreeBSD boot manager, you can boot back into Linux and modify the - LILO configuration file - /etc/lilo.conf and add the following - option: + The LILO Boot Manager: + If you are a Linux user and prefer that + LILO control the boot process, you can + edit the /etc/lilo.conf file for FreeBSD, or + select + during the FreeBSD installation process. If you have installed the + FreeBSD boot manager, you can boot back into Linux and modify the + LILO configuration file + /etc/lilo.conf and add the following + option: other=/dev/hdXY table=/dev/hdb @@ -192,10 +204,10 @@ will want to change /dev/hdXY to read something similar to /dev/sdXY, which again uses the XY syntax. The - can be omitted if you have + line can be omitted if you have both operating systems on the same drive. You can now run /sbin/lilo -v to commit your new changes to the - system, this should be verified with screen messages. + system; this should be verified by its screen messages. @@ -205,17 +217,18 @@ Conceptually the first and second stages are part of the same program, on the same area of the disk. Because of space constraints they have been split into two, but you would always install them - together. - - They are found on the boot sector of - the boot slice, which is where boot0, or any other program on the - MBR expects to find the program to run to - continue the boot process. The files in the - /boot directory are copies of the real files, - which are stored outside of the FreeBSD file system. + together and they are copied from the combined file + /boot/boot by the installer or + disklabel (see below). + + They are found outside any file system, in the first track of + the boot slice, starting with the first sector, which is where boot0, or any other boot manager, + expects to find a program to run which will + continue the boot process. The number of sectors used is easily + determined from the size of /boot/boot. - boot1 is very simple, since it too + boot1 is very simple, since it can only be 512 bytes in size, and knows just enough about the FreeBSD disklabel, which stores information