MBR(8) | System Manager's Manual (x86) | MBR(8) |
mbr
, bootselect
—
The code present in the MBR will typically examine the partition table, find the partition that is marked active, and boot from it. Booting from a partition simply means loading the first sector in that partition, and executing the code in it, as is done for the MBR itself.
NetBSD supplies several versions of the MBR bootcode:
The rest of this manual page will discuss the bootselecting versions of the MBR. The configurable items of the bootselector are:
The bootselector will output a menu of the bootmenu names for each partition (as configured by fdisk(8)). The user can then select the partition or drive to boot from via the keyboard.
The numeric keys 1 upwards will initiate a startup from the corresponding partition.
Function keys F1 through F8 (keys a through h for the serial versions) will boot from hard disks 0 through 7 (BIOS numbers 0x80 through 0x87). Booting from a drive is simply done by reading the MBR of that drive and executing it, so the bootcode present in the MBR of the chosen drive determines which partition (if any) will be booted in the end.
The Enter key will cause the bootcode to find the active partition, and boot from it. If no key is pressed, the (configurable) default selection is picked.
Code | Text message | Explanation |
1 | No active partition | The MBR has a partition table without an active partition. |
2 | Disk read error | There was an error reading the bootsector for the partition or drive selected. |
3 | No operating system | The bootsector was loaded successfully, but it was not valid (i.e., the magic number check failed, or it contained no code). |
L | Invalid CHS read | The boot partition cannot be read using a CHS read and the system BIOS doesn't support LBA reads. |
? | Unknown key. |
The standard boot code will output the text message and stop. It may be necessary to reset to the system to continue.
The bootselect code will output 'Error <code>' and await further input.
The error messages are necessarily terse.
February 17, 2017 | NetBSD 9.4 |