# help="install specified kernel instead of the default [TODO - not implemented yet]")
parser.add_option("--lilo-binary", dest="lilobin", action="store", type="string",
help="lilo executable to be used for installing MBR")
-parser.add_option("--mbr-manager", dest="mbrmgr", action="store_true",
- help="enable interactive boot manager menu in MBR")
+parser.add_option("--mbr-menu", dest="mbrmenu", action="store_true",
+ help="enable interactive boot menu in MBR")
parser.add_option("--quiet", dest="quiet", action="store_true",
help="do not output anything but just errors on console")
parser.add_option("--skip-addons", dest="skipaddons", action="store_true",
def install_mir_mbr(mbrtemplate, device, partition, ismirbsdmbr=True):
"""install 'mbr' master boot record (MBR) on a device
- Retrieve the partition table from "device", install an MBR from
- the "mbrtemplate" file, set the "partition" (0..3) active, and
- install the result back to "device".
+ Retrieve the partition table from "device", install an MBR from the
+ "mbrtemplate" file, set the "partition" (0..3) active, and install the
+ result back to "device".
@mbrtemplate: default MBR file
- @device: name of a file assumed to be a hard disc (or USB stick) image,
- or something like "/dev/sdb"
+ @device: name of a file assumed to be a hard disc (or USB stick) image, or
+ something like "/dev/sdb"
+
@partition: must be a number between 0 and 3, inclusive
- @mbrtemplate: must be a valid MBR file of at least 440 (or 439
- if ismirbsdmbr) bytes.
+ @mbrtemplate: must be a valid MBR file of at least 440 (or 439 if
+ ismirbsdmbr) bytes.
- @ismirbsdmbr: if set the partitions' active flags are not changed.
- Instead, the MBR's default value is set accordingly."""
+ @ismirbsdmbr: if true then ignore the active flag, set the mirbsdmbr
+ specific flag to 0/1/2/3 and set the MBR's default value accordingly. If
+ false then leave the mirbsdmbr specific flag set to FFh, set all
+ active flags to 0 and set the active flag of the partition to 80h. Note:
+ behaviour of mirbsdmbr: if flag = 0/1/2/3 then use it, otherwise search for
+ the active flag."""
logging.info("Installing default MBR")
if options.syslinuxmbr:
handle_syslinux_mbr(mbr_device)
else:
- if options.mbrmgr:
+ if options.mbrmenu:
install_mir_mbr('/usr/share/grml2usb/mbr/mbrmgr', mbr_device, partition_number, True)
else:
- install_mir_mbr('/usr/share/grml2usb/mbr/mbrldr', mbr_device, partition_number, True)
+ install_mir_mbr('/usr/share/grml2usb/mbr/mbrldr', mbr_device, partition_number, False)
except IOError, error:
logging.critical("Execution failed: %s", error)
sys.exit(1)
statically compiled version of the grml2usb Debian package (see
/usr/share/grml2usb/lilo/lilo.static.[amd64|i386]) is taken.
- *--mbr-manager=...*::
+ *--mbr-menu*::
-Install master boot record (MBR) with integrated boot manager, providing a
-simple selection for specifying the device for booting from. This options is
-available only when using the default MBR and won't work if using the
---syslinux-mbr option.
+Install master boot record (MBR) with integrated boot menu: interactively choose
+the partition to boot from, with a timeout to load the default partition, or
+boot from floppy. When NOT using the --mbr-menu option a MBR with LBA and large
+disc support but without an integrated boot menu is installed (so it's not
+visible at all but instead directly jumps to the bootloader - being grub or
+syslinux). Note: This options is available only when using the default MBR and
+won't have any effect if you're using the --syslinux-mbr option.
*--quiet*::
*--syslinux-mbr*::
-Install syslinux master boot record (MBR) instead of the default one. By
-default a very compatible MBR is installed, if you encounter any problems
-with it you can try using the syslinux MBR instead. If that works for you please
-<<X7,let us know>> so we can adjust our default MBR accordingly.
-Note: When using the --syslinux-mbr option lilo is executed before the MBR
-is installed so the according partitions are set active.
+Install syslinux' master boot record (MBR, which is booting from the partition
+with the "active" flag set) instead of the default one. If you encounter any
+problems with the default MBR you can try using the syslinux MBR instead. If
+that works for you please <<X7,let us know>> so we can adjust our default MBR
+accordingly. Note: When using the --syslinux-mbr option lilo is executed before
+the MBR is installed so the according partitions are set active.
//////////////////////////////////////////////////////////////////////////
*--squashfs=*::