Editing the boot menu

Paul Schmehl pauls at utdallas.edu
Wed Jun 8 20:24:57 GMT 2005

--On Wednesday, June 08, 2005 16:29:22 -0300 José de Paula Rodrigues 
<espinafre at gmail.com> wrote:

> On 6/8/05, Paul Schmehl <pauls at utdallas.edu> wrote:
>> When you use FreeBSD's boot manager, you get a menu like this at bootup:
>> F1 DOS
>> F2 FreeBSD
>> F3 Linux
>> F4 ??
>> F5 Drive 1
>> Default: F2
>> Is there a way to edit the list?  Or is that fixed when boot manager is
>> installed and not configurable?
>> By edit, I mean, for example, change F4 ?? to F4 MyOS.
> man boot0cfg
I *thought* it would go without saying that I had already read man boot0cfg.

Obviously, I missed the part where you edit the menu.  Wanna give me a hint?

uname -imr

boot0cfg -v /dev/ad4
#   flag     start chs   type       end chs       offset         size
1   0x00      0:  1: 1   0x07   1023:254:63           63    204796557
2   0x80   1023:255:63   0xa5   1023:254:63    204796620    283482990

version=1.0  drive=0x80  mask=0xf  ticks=182
default_selection=F2 (Slice 2)

 The options for boot0cfg are:

     -B      Install the `boot0' boot manager.  This option causes MBR code 
             be replaced, without affecting the embedded slice table.

I don't need to install it.

     -b boot0
             Specify which `boot0' image to use.  The default is /boot/boot0
             which will use the video card as output, alternatively
             /boot/boot0sio can be used for output to the COM1 port.  (Be
             aware that nothing will be output to the COM1 port unless the
             modem signals DSR and CTS are active.)

I don't need to specify the boot image.

     -d drive
             Specify the drive number used by the PC BIOS in referencing the
             drive which contains the specified disk.  Typically this will 
             0x80 for the first hard drive, 0x81 for the second hard drive,
             and so on; however any integer between 0 and 0xff is acceptable

I don't need to specify the drive.

     -f file
             Specify that a backup copy of the preexisting MBR should be 
             ten to file.  This file is created if it does not exist, and
             replaced if it does.

I don't need to make a backup copy.

     -m mask
             Specify slices to be enabled/disabled, where mask is an integer
             between 0 (no slices enabled) and 0xf (all four slices 

The correct slices are already enabled.  The system boots fine to either OS.

     -o options
             A comma-separated string of any of the following options may be
             specified (with ``no'' prepended as necessary):

The default options are being used, and I see no reason to change them.

             packet  Use the disk packet (BIOS INT 0x13 extensions) 
                     as opposed to the legacy (CHS) interface, when doing 
                     I/O.  This allows booting above cylinder 1023, but
                     requires specific BIOS support.  The default is

             setdrv  Forces the drive containing the disk to be referenced
                     using drive number definable by means of the -d option.
                     The default is `nosetdrv'.

             update  Allow the MBR to be updated by the boot manager.  (The

             update  Allow the MBR to be updated by the boot manager.  (The
                     MBR may be updated to flag slices as `active', and to
                     save slice selection information.)  This is the 
                     a `noupdate' option causes the MBR to be treated as 

     -s slice
             Set the default boot selection to slice.  Values between 1 and 
             refer to slices; a value of 5 refers to the option of booting
             from a second disk.

The default slice is determined by the last boot.  I see no reason to 
change that.

     -t ticks
             Set the timeout value to ticks.  (There are approximately 18.2
             ticks per second.)

The timeout is set to 10, and I see no reason to change that.

     -v      Verbose: display information about the slices defined, etc.


So where is the switch that I use to edit the menu?

Paul Schmehl (pauls at utdallas.edu)
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member

More information about the freebsd-questions mailing list