table of contents
INSTALL-MBR(8) | Linux Administrator's Manual | INSTALL-MBR(8) |
NAME¶
install-mbr - install a Master Boot Record manager
SYNOPSIS¶
install-mbr <target> [--force] [--install <path>] [--keep] [--list] [--no-act] [--offset <offset>] [--y2kbug[=utc|=local]] [--parameters <path>] [--reset] [--table <path>] [--verbose] [--version] [--help] [--drive <drive>] [--enable <options>] [--interrupt <keys>] [--partition <partition>] [--timeout <timeout>]
DESCRIPTION¶
install-mbr installs and configures a Master Boot Record manager on a device. The behaviour of the boot manager is determined by the options given on the command line. <target> is the path specifying the device (or file) that the boot manager should be installed onto.
MBR BEHAVIOUR¶
When the MBR is first loaded it waits for a configurable length of time (1 second by default), monitoring the keyboard for key presses. The types of key which cause the MBR to be interrupted can be configured through the -i option to install-mbr.
If the MBR is interrupted, it will display its prompt. Otherwise it will load the first sector of the default partition and execute it. If a disk error occurs or the boot signature is missing, the prompt will be displayed.
The boot prompt¶
The boot prompt looks something like this:
- 14FA:
This is the list of valid keys which may be pressed followed by a colon. Numeric keys indicate primary partitions on the disk beginning with partition 1 and 'F' indicates the floppy disk. Extended partitions cannot be booted. The 'A' means that 'advanced' mode may be entered, in which case any partition may be booted. The only other valid key which may be pressed is RETURN, which continues booting with the default partition.
The prompt for advanced mode looks like this and works just the same as the normal prompt.
- 1234F:
The list of valid partitions and the default partition can be configured through the -e and -p options to install-mbr.
OPTIONS¶
Installation options¶
These options change the way the installation program operates.
- --force, -f
- This option currently overrides a check to make sure the specified target is valid.
--install <path>, -I <path>
- --keep, -k
- This option instructs the installer to modify the parameters stored in the MBR without updating the code.
- --list, -l
- This option may be used to view the parameters being installed in the MBR. It implies the --no-act and --keep flags unless an option other than --offset, --verbose or --list is given. This allows the contents of the MBR to be examined.
- --no-act, -n
- This option ensures that the target is not modified, as it is opened in read-only mode.
--offset <offset>, -o <offset>
--parameters <path>, -P <path>
- --reset, -r
- This option is used to reset the boot parameters to the state found in the code being installed (or code which would be installed if --keep were not specified).
--table <path>, -T <path>
- --verbose, -v
- When invoked with this option, install-mbr will display some information about what it is doing.
- --version, -V
- This option will cause install-mbr to display it's version number and exit.
- --help, -h
- This option will cause install-mbr to display a help message and exit.
Parameter options¶
These options change the parameters stored within the Master Boot Record.
--drive <drive>, -d <drive>
--enable <option>, -e <option>
--interrupt <mode>, -i <mode>
-p <partn>, --partition <partn>
-t <timeout>, --timeout <timeout>
EXAMPLES¶
install-mbr /dev/fd0 -T /dev/hda
Install the default MBR image on /dev/fd0, taking the partition table from /dev/hda.
install-mbr -kr /dev/hda
Reset the parameters on /dev/hda without installing any new code.
install-mbr -I my-mbr -T /dev/hda -P my-parameters /dev/fd0
Install to /dev/fd0, taking code from my-mbr, partition table from /dev/hda and parameters from my-parameters.
install-mbr -l -o 128 hdimage
List the parameters stored at offset 128 in hdimage (may be a DOSEMU image).
install-mbr -d 0x81 -T /dev/hdb /dev/fd0
Install on /dev/fd0 to boot from BIOS drive 129 (0x81) with partition table copied from /dev/hdb.
install-mbr -e 13 /dev/hda
install-mbr -e 2 -e =13 /dev/hda
install-mbr -e1 -e3 /dev/hda
Enable booting from partitions 1 and 3 on /dev/hda. Other locations are disabled.
install-mbr -e +f-a -i sk /dev/hda
Enabled booting from the floppy drive, and disable advanced mode. Display the prompt if any shift, control or non shift-like key is pressed. Other settings are untouched.
DIAGNOSTICS¶
- Cannot handle MBR version n (backwards compatible to n)
-
This error means that the version of MBR which is being installed is not known about by this installer. Such files cannot have their parameters read or written. If such a newer version is installed, it can be downgraded by specifying the --reset option (without specifying --keep).
SEE ALSO¶
BUGS¶
The operation of --list may be confusing.
AUTHOR¶
install-mbr was written for the Debian project by Neil Turton <neilt+mbr@chiark.greenend.org.uk>.
16 April 2006 | Linux |