From: Michael Prokop Date: Fri, 2 Feb 2024 15:14:08 +0000 (+0100) Subject: Release new version 0.6.1 X-Git-Tag: v0.6.1^0 X-Git-Url: http://git.grml.org/?p=grml-rescueboot.git;a=commitdiff_plain;h=refs%2Fheads%2Fmaster;hp=c2292f50f7d0fab1e88506fc313dff2f79ff038f Release new version 0.6.1 --- diff --git a/42_grml b/42_grml index 96e5e1f..7b96e6b 100755 --- a/42_grml +++ b/42_grml @@ -74,10 +74,17 @@ get_dependencies() { break done echo $dependencies - } - +get_iso_identifier() { + local iso="$1" + local id= + if isoinfo --version >/dev/null 2>&1 ; then + id=$(isoinfo -d -i "${iso}" | grep '^Volume id:' | sed -e 's/^[^:]*: *//') + [ -n "${id}" ] || id=$(isoinfo -d -i "${iso}" | grep '^Application id:' | sed -e 's/^[^:]*: *//') + fi + echo "${id}" +} iso_list="" for file in "${ISO_LOCATION}"/*.iso ; do @@ -86,6 +93,13 @@ for file in "${ISO_LOCATION}"/*.iso ; do fi done +indent=' ' +submenu_indent= +if [ -n "${GRUB_SUBMENU}" ] && [ -n "${iso_list}" ] ; then + echo "submenu \"${GRUB_SUBMENU}\" \$menuentry_id_option \"grml-rescueboot\" {" + submenu_indent="${indent}" +fi + for grmliso in $iso_list ; do rel_dirname="$(dirname $(make_system_path_relative_to_its_root $grmliso))" grml="$(basename $grmliso)" @@ -98,6 +112,11 @@ for grmliso in $iso_list ; do dependencies=$(get_dependencies ${device}) dep_string="" for dep in $dependencies $device ; do + case "$dep" in + /dev/md*) + md_name="$(mdadm --detail --export "$dep" | sed -ne 's/MD_NAME=//p')" + dep="/dev/md/$md_name" + esac dep_string="$dep_string,$dep" done dep_string=${dep_string#,} @@ -105,22 +124,39 @@ for grmliso in $iso_list ; do ;; esac - echo "Found Grml ISO image: $grmliso" >&2 - title="Grml Rescue System ($grml)" - grub_prep=$(prepare_grub_to_access_device "$device" | sed -e "s/^/ /") + echo "Found grml-rescueboot ISO image: ${grmliso}" >&2 + iso_id=$(get_iso_identifier "${grmliso}") + if [ -n "${iso_id}" ] ; then + title="${iso_id} (${grml})" + else + title="${grml}" + fi + grub_prep=$(prepare_grub_to_access_device "${device}" | sed -e "s/^/${indent}/") + grub_iso_path="${rel_dirname%/}/${grml}" - cat << EOF + sed -e "s/^/${submenu_indent}/" << EOF menuentry "${title}" { ${grub_prep} - iso_path="${rel_dirname%/}/${grml}" + iso_path="${grub_iso_path}" export iso_path kernelopts=" $CUSTOM_BOOTOPTIONS $additional_param " export kernelopts - loopback loop "${rel_dirname%/}/$grml" + # support booting recent GRUB versions on UEFI systems + # (see bugs.debian.org/959425) + rmmod tpm + loopback loop "\$iso_path" set root=(loop) configfile /boot/grub/loopback.cfg + unset root + loopback -d loop + unset iso_path + unset kernelopts } EOF done +if [ -n "${GRUB_SUBMENU}" ] && [ -n "${iso_list}" ] ; then + echo "} # end submenu \"${GRUB_SUBMENU}\"" +fi + ## END OF FILE ################################################################# diff --git a/debian/changelog b/debian/changelog index 44e612f..972a752 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,38 @@ +grml-rescueboot (0.6.1) unstable; urgency=medium + + [ Daniel Richard G ] + * [cbb6227] Minor tweaks to terminal output, variables, and GRUB stanza + + -- Michael Prokop Fri, 02 Feb 2024 16:13:55 +0100 + +grml-rescueboot (0.6.0) unstable; urgency=medium + + [ Daniel Richard G ] + * [2772778] Add new GRUB_SUBMENU functionality and config parameter + * [517bcbd] Try using isoinfo(1) to extract an ISO image identifier + + -- Michael Prokop Fri, 08 Sep 2023 11:34:54 +0200 + +grml-rescueboot (0.5.2) unstable; urgency=medium + + [ Allan Laal ] + * [135c83b] Fix encpasswd value is ignored + + [ sgf ] + * [35e968c] Fix booting from mdadm raid + * [df317ca] Fix '-f' option and getopts optstring (Closes: #1005935) + + -- Michael Prokop Mon, 21 Mar 2022 16:25:10 +0100 + +grml-rescueboot (0.5.1) unstable; urgency=medium + + * [81780ff] Fix minor typo (Sucessfully -> Successfully) + * [1f30a2c] Unload tpm module to support booting ISOs with GRUB 2.04 on + UEFI systems. Thanks to Vasek Opekar for the bug + report (Closes: #975835) + + -- Michael Prokop Wed, 23 Dec 2020 17:14:37 +0100 + grml-rescueboot (0.5.0) unstable; urgency=medium The "你好, first upload from debconf18 @ Taiwan" release diff --git a/debian/control b/debian/control index 402399f..d371e64 100644 --- a/debian/control +++ b/debian/control @@ -23,6 +23,7 @@ Depends: ${shlibs:Depends}, Recommends: debian-keyring, + genisoimage, gpgv, wget, Description: Integrates Grml ISO booting into GRUB diff --git a/etc/default/grml-rescueboot b/etc/default/grml-rescueboot index d2154de..4f4f80f 100644 --- a/etc/default/grml-rescueboot +++ b/etc/default/grml-rescueboot @@ -3,6 +3,10 @@ # Location of ISOs: # ISO_LOCATION="/boot/grml/" +# To place the rescue boot entries into a GRUB submenu, +# set this to the desired menu name: +# GRUB_SUBMENU='Grml Rescue Boot menu' + # To set any specific bootoptions for rescue images # present in /boot/grml just set and enable the following option: -# CUSTOM_BOOTOPTIONS="ssh=password lang=de" +# CUSTOM_BOOTOPTIONS='ssh=password lang=de' diff --git a/update-grml-rescueboot b/update-grml-rescueboot index 89200c3..f555034 100755 --- a/update-grml-rescueboot +++ b/update-grml-rescueboot @@ -34,7 +34,7 @@ usage() { echo "Usage: $(basename "$0") [-f] [-a <32|64|96>] [-t ]" } -while getopts ":a::t::f:h" opt ; do +while getopts ":a:t:fh" opt ; do case ${opt} in a) if [ "${OPTARG}" = 32 ] || [ "${OPTARG}" = 64 ] || [ "${OPTARG}" = 96 ] ; then @@ -150,4 +150,4 @@ fi echo "Invoking 'update-grub' now." update-grub -echo "Sucessfully finished grml-rescueboot integration." +echo "Successfully finished grml-rescueboot integration."