BOOT0CFG(8)
π BOOT0CFG(8) π
okay so this is a page from the System Manager's Manual β yes bestie, we're in the big-girl section of the man pages, section 8, BOOT0CFG. Buckle up π
β¨ NAME β¨
boot0cfg β the boot manager installation/configuration utility, aka the lil tool that decides which slice your PC wakes up in the morning π¦
πΈ SYNOPSIS πΈ
boot0cfg [-Bv] [-b boot0] [-d drive] [-e bell character] [-f file]
[-i volume-id] [-m mask] [-o options] [-s slice] [-t ticks]
disk
π DESCRIPTION π
The FreeBSD boot0 boot manager lets the operator pick which disk and which slice an i386 machine (PC) boots from. iconic behaviour honestly π
Quick terminology check, because this trips everyone up: what we call βslicesβ here are usually called βpartitionsβ in non-BSD documentation about PCs. And typically, only non-removable disks are sliced. noted. π
The boot0cfg utility optionally installs the boot0 boot manager on the disk you specify, and also lets you configure a bunch of operational parameters. it's giving "two jobs, both slay" β¨
On PCs, a boot manager typically occupies sector 0 of a disk, which is known as the Master Boot Record (MBR). The MBR contains both:
- code β the stuff the PC BIOS passes control to
- data β an embedded table of defined slices
and here are the options, bestie π«Ά
π OPTIONS π
-Bβ Install theboot0boot manager. This option causes the MBR code to be replaced, without touching the embedded slice table. so the code gets a glow-up, the table stays exactly as it was π-bboot0 β Specify whichboot0image to use. The default is/boot/boot0, which will use the video card as output; alternatively/boot/boot0siocan be used for output to theCOM1port. (Be aware that nothing will be output to theCOM1port unless the modem signalsDSRandCTSare active. π like literally nothing. silence.)-ddrive β Specify the drive number used by the PC BIOS in referencing the drive which contains the specified disk. Typically this will be0x80for the first hard drive,0x81for the second hard drive, and so on; however any integer between0and0xffis acceptable here. any. integer. π-ebell character β Set the character to be printed in case of input error. your error sound, your choice π-ffile β Specify that a backup copy of the preexisting MBR should be written to file. This file is created if it does not exist, and replaced if it does. so if it's already there? gone. replaced. no warning π-ivolume-id β Specifies a volume-id (in the formXXXX-XXXX) to be saved at location0x1b8in the MBR. This information is sometimes used by NT, XP and Vista to identify the disk drive. The option is only compatible with version 2.00 of the 512-byte boot block. β οΈ only that version, fr fr-mmask β Specify slices to be enabled/disabled, where mask is an integer between0(no slices enabled) and0xf(all four slices enabled). Each mask bit enables the corresponding slice if set to1. The least significant bit of the mask corresponds to slice 1, the most significant bit of the mask corresponds to slice 4. bit math but make it cute π§-ooptions β A comma-separated string of any of the following options may be specified (with βnoβ prepended as necessary). the full menu, lowkey:packetβ Use the disk packet (BIOSINT 0x13extensions) interface, as opposed to the legacy (CHS) interface, when doing disk I/O. This allows booting above cylinder1023, but requires specific BIOS support. The default ispacket. πsetdrvβ Forces the drive containing the disk to be referenced using drive number definable by means of the-doption. The default isnosetdrv.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 default; anoupdateoption causes the MBR to be treated as read-only. π
-sslice β Set the default boot selection to slice. Values between1and4refer to slices; a value of5refers to the option of booting from a second disk. The special string βPXEβ or a value of6can be used to boot via PXE. network boot era π-tticks β Set the timeout value to ticks. (There are approximately18.2ticks per second.) do your own math bestie, there's like 18.2 of them per second π-vβ Verbose: display information about the slices defined, etc. she's chatty and we love her π£
π¦ FILES π¦
/boot/boot0β The defaultboot0image/boot/boot0sioβ Image for serial consoles (COM1,9600,8,N,1,MODEM)
β EXIT STATUS β
The boot0cfg utility exits 0 on success, and >0 if an error occurs. simple. clean. no notes π
π₯ EXAMPLES π₯
To boot slice 2 on the next boot:
boot0cfg -s 2 ada0
To enable just slices 1 and 3 in the menu:
boot0cfg -m 0x5 ada0
To go back to non-interactive booting, use gpart(8) to install the default MBR:
gpart bootcode -b /boot/mbr ada0
π SEE ALSO π
geom(4), boot(8), gpart(8) β go read those too, iykyk π«Ά
π AUTHORS π
Robert Nordier <rnordier@FreeBSD.org> β thank you legend π«‘
π BUGS π
- Use of the
packetoption may causeboot0to fail, depending on the nature of BIOS support. like it might just Not Work, depending on your BIOS π - Use of the
setdrvoption with an incorrect-doperand may cause theboot0code to write the MBR to the wrong disk, thus trashing its previous content. Be careful. π¨ no seriously, be careful β that's someone's whole boot record, bestie
π and that's the page!! this one's from Debian, dated October 1, 2013, filed under BOOT0CFG(8) β go forth and configure your boot manager responsibly, mwah πβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1999 Robert Nordier
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms