From 0339fd8b85321b55b665a26909f82db3c06f817b Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 4 Mar 2009 14:05:38 +0100 Subject: [PATCH] Rename --mbr-manager into --mbr-menu --- debian/changelog | 4 +++- grml2usb | 31 ++++++++++++++++++------------- grml2usb.8.txt | 25 ++++++++++++++----------- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1fe0c79..bfff270 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ grml2usb (0.9.3) UNRELEASED; urgency=low * Add zsh completion for grml2usb. * Drop some leftover 'lang=us' references. * Update mbr.S (thanks, Thorsten Glaser). + * Rename --mbr-manager into --mbr-menu (people seem to be confused + what this option does). Improve the according documentation. - -- Michael Prokop Wed, 04 Mar 2009 12:28:54 +0100 + -- Michael Prokop Wed, 04 Mar 2009 14:04:51 +0100 grml2usb (0.9.2) unstable; urgency=low diff --git a/grml2usb b/grml2usb index 32ba666..e8b0f1a 100755 --- a/grml2usb +++ b/grml2usb @@ -53,8 +53,8 @@ parser.add_option("--force", dest="force", action="store_true", # 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", @@ -703,21 +703,26 @@ def install_syslinux_mbr(device): 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") @@ -1477,10 +1482,10 @@ def handle_mbr(device): 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) diff --git a/grml2usb.8.txt b/grml2usb.8.txt index 8e8cce1..0a0ffb7 100644 --- a/grml2usb.8.txt +++ b/grml2usb.8.txt @@ -104,12 +104,15 @@ executable is taken. If there can not be find any lilo executable the 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*:: @@ -129,12 +132,12 @@ Install syslinux bootloader instead of the default (being grub). *--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 -<> 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 <> 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=*:: -- 2.1.4