From 0deeae3373cffe3a007b8bf6c0b642830601c9b7 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 10 Jan 2013 14:00:18 +0100 Subject: [PATCH] Mention /lib/live/mount/medium for new live path + adjust ISO versions Debian's live-boot changed the path from /live/image to /lib/live/mount/medium, so adopt our code to support those new versions without breaking older ISOs. While at it raise ISO names from version 2009.10 to upcoming 2013.01. --- debian/control | 8 ++++---- grml2usb | 10 +++++----- grml2usb.8.txt | 34 +++++++++++++++++----------------- zsh/_grml2usb | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/debian/control b/debian/control index 9398edc..fd4ee47 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Package: grml2usb Architecture: i386 amd64 Depends: ${shlibs:Depends}, ${misc:Depends}, syslinux | grub-pc, python, rsync, mtools, realpath Recommends: syslinux, xorriso | genisoimage -Description: install grml system / ISO to usb device - This script installs a grml ISO to an USB device to be able - to boot from it. Make sure you have at least one grml ISO - or a running grml system (/live/image) available. +Description: install Grml system / ISO to usb device + This script installs a Grml ISO to an USB device to be able + to boot from it. Make sure you have at least one Grml ISO + or a running Grml system (/lib/live/mount/medium) available. diff --git a/grml2usb b/grml2usb index 6e74786..3ca38a5 100755 --- a/grml2usb +++ b/grml2usb @@ -60,10 +60,10 @@ def grub_option(option, opt, value, opt_parser): setattr(opt_parser.values, 'syslinux', False) # cmdline parsing -USAGE = "Usage: %prog [options] <[ISO[s] | /live/image]> \n\ +USAGE = "Usage: %prog [options] <[ISO[s] | /lib/live/mount/medium]> \n\ \n\ -%prog installs grml ISO[s] to an USB device to be able to boot from it.\n\ -Make sure you have at least one grml ISO or a running grml system (/live/image),\n\ +%prog installs Grml ISO[s] to an USB device to be able to boot from it.\n\ +Make sure you have at least one Grml ISO or a running Grml system (/lib/live/mount/medium),\n\ grub or syslinux and root access.\n\ \n\ Run %prog --help for usage hints, further information via: man grml2usb" @@ -1131,7 +1131,7 @@ def identify_grml_flavour(mountpath): version_files = search_file('grml-version', mountpath, lst_return=True) if not version_files: - if mountpath.startswith("/live/image"): + if mountpath.startswith("/lib/live/mount/medium"): logging.critical("Error: could not find grml-version file.") logging.critical("Looks like your system is running from RAM but required files are not available.") logging.critical("Please either boot without toram=... or use boot option toram instead of toram=...") @@ -1485,7 +1485,7 @@ def install(image, device): def install_grml(mountpoint, device): """Main logic for copying files of the currently running grml system. - @mountpoin: directory where currently running live system resides (usually /live/image) + @mountpoint: directory where currently running live system resides (usually /lib/live/mount/medium) @device: partition where the specified ISO should be installed to""" device_mountpoint = device diff --git a/grml2usb.8.txt b/grml2usb.8.txt index 3d89801..769f42e 100644 --- a/grml2usb.8.txt +++ b/grml2usb.8.txt @@ -36,7 +36,7 @@ Options ------- The ISO[s] should be the path to one or multiple grml-ISOs and/or the path to -the currently running live-system (being /live/image). +the currently running live-system (being /lib/live/mount/medium). The device either might be a device name like /dev/sdX1 or a directory. When specifying a device name the device is mounted automatically. When specifying a @@ -280,14 +280,14 @@ or: Finally create a filesystem and execute grml2usb as needed: # mkfs.vfat /dev/loop1 - # grml2usb --bootloader-only /grml/isos/grml-small_2009.10.iso /dev/loop1 + # grml2usb --bootloader-only /grml/isos/grml-small_2013.01.iso /dev/loop1 [[performance-tracing]] Performance tracing ~~~~~~~~~~~~~~~~~~~ # blktrace -d /dev/sdX -o - | blkparse -i - - # grml2usb grml_2009.10.iso /dev/sdX1 + # grml2usb grml_2013.01.iso /dev/sdX1 [[troubleshooting]] Troubleshooting and Pitfalls when booting @@ -395,7 +395,7 @@ This allows you to dd the Grml ISO to your USB device (use for example link:http://www.chrysocome.net/rawwrite[rawwrite] if you've just a Windows system available) running: - % dd if=grml_2009.10.iso of=/dev/sdX + % dd if=grml_2013.01.iso of=/dev/sdX where /dev/sdX is your USB device. Of course this doesn't provide such a flexible system like with grml2usb (no multi-ISO setup, no additional default @@ -561,29 +561,29 @@ of your grml2usb commandline (consider using the "\--verbose" option). Usage examples -------------- - # grml2usb /home/grml/grml_2009.10.iso /dev/sdX1 + # grml2usb /home/grml/grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1. - # grml2usb /home/grml/grml_2009.10.iso /home/grml/grml_small_2009.10.iso /dev/sdX1 + # grml2usb /home/grml/grml_2013.01.iso /home/grml/grml_small_2013.01.iso /dev/sdX1 Install specified ISOs on device /dev/sdX1 for multibooting ISOs. - # grml2usb /live/image /dev/sdX1 + # grml2usb /lib/live/mount/medium /dev/sdX1 -Install currently running grml live system on device /dev/sdX1. +Install currently running Grml live system on device /dev/sdX1. - # grml2usb /live/image /home/grml/grml_2009.10.iso /dev/sdX1 + # grml2usb /lib/live/mount/medium /home/grml/grml_2013.01.iso /dev/sdX1 -Install currently running grml live system and the specified +Install currently running Grml live system and the specified ISO on device /dev/sdX1 for multibooting. - # grml2usb --fat16 /home/grml/grml_2009.10.iso /dev/sdX1 + # grml2usb --fat16 /home/grml/grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1 and format partition /dev/sdX1 with FAT16 filesystem. - # grml2usb --grub --grub-mbr /home/grml/grml_2009.10.iso /dev/sdX1 + # grml2usb --grub --grub-mbr /home/grml/grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1 and use grub as bootloader (instead of syslinux being the default) and install a master boot record (MBR) to the MBR of @@ -591,26 +591,26 @@ syslinux being the default) and install a master boot record (MBR) to the MBR of /////////////////////////////////////////////////////////////////////////////////////// # grml2usb --kernel=/boot/vmlinuz-2.6.28-grml --initrd=/boot/initrd.img-2.6.28-grml \ - /home/grml/grml_2009.10.iso /dev/sdX1 + /home/grml/grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1 but use given kernel and initrd instead of the ones provided by the ISO. # grml2usb --squashfs=/grml/grml-live/grml_cd/live/grml.squashfs \ - /home/grml/grml_2009.10.iso /dev/sdX1 + /home/grml/grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1 but use given squashfs file instead of the one provided by the ISO. /////////////////////////////////////////////////////////////////////////////////////// - # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2009.10.iso /dev/sdX1 - # grml2usb --bootoptions="lang=de" --bootoptions="ssh=mysecret" grml_2009.10.iso /dev/sdX1 + # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2013.01.iso /dev/sdX1 + # grml2usb --bootoptions="lang=de" --bootoptions="ssh=mysecret" grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1 and use "lang=de ssh=mysecret" as default bootoptions. - # grml2usb --remove-bootoption="vga=791" --remove-bootoption="nomce" grml_2009.10.iso /dev/sdX1 + # grml2usb --remove-bootoption="vga=791" --remove-bootoption="nomce" grml_2013.01.iso /dev/sdX1 Install specified ISO on device /dev/sdX1 remove vga=791 and nomce from existing bootoptions. diff --git a/zsh/_grml2usb b/zsh/_grml2usb index d2b202d..403add6 100644 --- a/zsh/_grml2usb +++ b/zsh/_grml2usb @@ -21,7 +21,7 @@ done # TODO: # * handling of --bootoptions=BOOTOPTIONS # * $devices should also list directories as valid target -# * as output before :device:.... ISO files and/or /live/image should be suggested +# * as output before :device:.... ISO files and/or /lib/live/mount/medium should be suggested arguments=( '--help[display help message and exit]:' -- 2.1.4