grub-imageboot-0.6/0000755000000000000000000000000011506137537011160 5ustar grub-imageboot-0.6/bin/0000755000000000000000000000000011674737354011741 5ustar grub-imageboot-0.6/bin/60_grub-imageboot0000755000000000000000000000415311674737354015102 0ustar #!/bin/sh # (c) 2010 Alexander Wirt # # The general idea for this script got collected from several blog entrys # and the syslinux wiki. If you think you should get mentioned in the authors # or copyright file, please tell me :). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set -e IMAGES=/boot/images if [ -e "/etc/default/grub-imageboot" ] then . /etc/default/grub-imageboot fi . /usr/lib/grub/grub-mkconfig_lib imageboot_add() { local extension="$1" local options="$2" local message_txt="$3" local menu_txt="$4" echo "$message_txt: $image" >&2 cat << EOF menuentry "$menu_txt: $(basename "$IMAGEPATH" | sed -e "s/[.]$extension\$//")" { EOF prepare_grub_to_access_device "$($grub_probe -t device "$image")" | sed -e "s/^/\t/" cat << EOF linux16 $MEMDISKPATH $options initrd16 $IMAGEPATH } EOF } if test -e /boot/memdisk ; then MEMDISKPATH=$( make_system_path_relative_to_its_root "/boot/memdisk" ) echo "Found memdisk: $MEMDISKPATH" >&2 if [ ! -d "$IMAGES" ]; then echo "Imagepath $IMAGES not found" >&2 exit fi find "$IMAGES" -name '*.iso' -o -name '*.img' | sort | while read image ; do IMAGEPATH=$( make_system_path_relative_to_its_root "$image" ) case "$image" in *.iso) imageboot_add "iso" "${ISOOPTS:-iso}" "Found iso image" "Bootable ISO Image" ;; *.img) imageboot_add "img" "${IMAGEOPTS:-rawimg}" "Found floppy image" "Bootable Floppy Image" ;; esac done else echo "memdisk not found" >&2 echo "Please copy /usr/lib/syslinux/memdisk to /boot/memdisk" >&2 fi grub-imageboot-0.6/etc/0000755000000000000000000000000011506137630011725 5ustar grub-imageboot-0.6/etc/grub-imageboot0000644000000000000000000000034511506137537014563 0ustar # Where to find the iso/floppy images IMAGES="/boot/images" # You can override the boot options for iso/floppy images here # see http://syslinux.zytor.com/wiki/index.php/MEMDISK for details #IMAGEOPTS="rawimg" #ISOOPTS="iso" grub-imageboot-0.6/debian/0000755000000000000000000000000011674741343012404 5ustar grub-imageboot-0.6/debian/grub-imageboot.postinst0000644000000000000000000000237111506145150017103 0ustar #!/bin/sh # postinst script for grub-imageboot # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) if [ ! -e /boot/grub/memdisk ]; then echo "Copy syslinux memdisk to /boot/memdisk" if [ -e /usr/lib/syslinux/memdisk ]; then cp /usr/lib/syslinux/memdisk /boot/memdisk else echo "/boot/grub/memdisk and /usr/lib/syslinux/memdisk not found" exit 1 fi fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 grub-imageboot-0.6/debian/copyright0000644000000000000000000000220711674737626014351 0ustar This work was packaged for Debian by: Alexander Wirt on Thu, 29 Oct 2009 09:55:20 +0100 Upstream Author: Alexander Wirt Copyright: License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'. The Debian packaging is: Copyright (C) 2010 Alexander Wirt and is licensed under the GPL version 3, see above. grub-imageboot-0.6/debian/changelog0000644000000000000000000000306511674741343014262 0ustar grub-imageboot (0.6) unstable; urgency=low [ Michael Prokop ] * [2061b1c] Probe device where image is being stored using ${grub_probe} instead of using ${GRUB_DEVICE_BOOT}. [ Alexander Wirt ] * [4bf7773] Wrap README.Debian (Closes: #629834, #631654) * [5a3291e] Improve description in control file. Thanks to Carsten Hey (Closes: #631486) * [946106e] Refactor grub-imageboot. Thanks to Carsten Hey for the great patch (Closes: #631487) * [4378100] Remove trailing whitespace in controlfile * [7ffc35e] Allow grub-efi bootloaders as alternative for grub-pc * [b85a107] wrap-and-sort controlfile -- Alexander Wirt Fri, 23 Dec 2011 00:53:06 +0100 grub-imageboot (0.5) unstable; urgency=low * Update copyright * Depend on syslinux-common instead of syslinux * Explicitly use format 1.0 -- Alexander Wirt Mon, 10 Jan 2011 22:40:39 +0100 grub-imageboot (0.4) unstable; urgency=low * Fix copymessage of memdisk installation -- Alexander Wirt Mon, 27 Dec 2010 18:18:36 +0100 grub-imageboot (0.3) unstable; urgency=low * Drop suffix .conf from configfile * Don't normalize the imagepath in messageoutput -- Alexander Wirt Mon, 27 Dec 2010 17:33:36 +0100 grub-imageboot (0.2) unstable; urgency=low * Add support for configfile -- Alexander Wirt Fri, 26 Nov 2010 11:33:13 +0100 grub-imageboot (0.1) unstable; urgency=low * Initial Version -- Alexander Wirt Tue, 09 Nov 2010 11:14:15 +0100 grub-imageboot-0.6/debian/docs0000644000000000000000000000000011506137537013243 0ustar grub-imageboot-0.6/debian/grub-imageboot.install0000644000000000000000000000010211674737626016701 0ustar bin/60_grub-imageboot etc/grub.d/ etc/grub-imageboot etc/default/ grub-imageboot-0.6/debian/rules0000755000000000000000000000067211506137537013467 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ grub-imageboot-0.6/debian/control0000644000000000000000000000117511674737626014024 0ustar Source: grub-imageboot Section: admin Priority: extra Maintainer: Alexander Wirt Build-Depends: debhelper (>= 7) Standards-Version: 3.9.1 Package: grub-imageboot Architecture: all Depends: grub-pc | grub-efi-amd64 | grub-efi-ia32, syslinux-common (>= 4), ${misc:Depends}, ${shlibs:Depends} Description: boot iso, harddisk and floppy images with grub2 and syslinux memdisk This package installs a grub hook which integrates iso, harddisk and floppy images into the grub menu. . memdisk can't boot every image see http://syslinux.zytor.com/wiki/index.php/MEMDISK for its limitations. grub-imageboot-0.6/debian/README.Debian0000644000000000000000000000106211674737354014453 0ustar grub-imageboot -------------- If you want to use this script just place your floppy images (with suffix .img) or you iso files (with suffix.iso) to /boot/images and run update-grub2 afterwards. Booting isos and floppy images with memdisk has limitations - see http://syslinux.zytor.com/wiki/index.php/MEMDISK if you have booting problems. If you want to change the path were images are dropped adapt $IMAGES in /etc/default/grub-imageboot.conf. If you need special options to boot your images see $IMAGEOPTS and $ISOOPTS in /etc/default/grub-imageboot.conf. grub-imageboot-0.6/debian/source/0000755000000000000000000000000011606550522013674 5ustar grub-imageboot-0.6/debian/source/format0000644000000000000000000000000411606550522015101 0ustar 1.0 grub-imageboot-0.6/debian/compat0000644000000000000000000000000211506137537013600 0ustar 7