From f4f470fc86fa06a8fc57d406cf1156f60f171a9f Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 23 Dec 2020 17:15:10 +0100 Subject: [PATCH 01/10] Release new version 0.5.1 --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 44e612f..62d67c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +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 -- 2.1.4 From 135c83b9b0b3ec7400b762e76e5e5b6d3a35a058 Mon Sep 17 00:00:00 2001 From: Allan Laal Date: Sun, 18 Jul 2021 01:26:33 +0300 Subject: [PATCH 02/10] FIX encpasswd value is ignored when using double quotes, the contents are parsed. This will break any hashes for `encpasswd` that contain `$` when `42_grml` (grub-mkconfig helper script for Grml rescue systems) is executed --- etc/default/grml-rescueboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/default/grml-rescueboot b/etc/default/grml-rescueboot index d2154de..306f08e 100644 --- a/etc/default/grml-rescueboot +++ b/etc/default/grml-rescueboot @@ -5,4 +5,4 @@ # 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' -- 2.1.4 From 35e968ccac91c57e1f0353804621e048adbab5ee Mon Sep 17 00:00:00 2001 From: sgf Date: Fri, 17 Dec 2021 23:06:44 +0300 Subject: [PATCH 03/10] Fix booting from mdadm raid. Use full name ('hostname:name') of md array in 'live-media=', because initramfs starts with empty hostname and arrays are assembled with full name. --- 42_grml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/42_grml b/42_grml index 4a76432..b951465 100755 --- a/42_grml +++ b/42_grml @@ -98,6 +98,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#,} -- 2.1.4 From df317cac57ab93c0675d8ec5eda99d6c3b8ef5c0 Mon Sep 17 00:00:00 2001 From: sgf Date: Tue, 21 Dec 2021 20:55:10 +0300 Subject: [PATCH 04/10] Fix '-f' option and getopts optstring. Option '-f' does not need an argument. Also shell getopts does not support optional arguments (two colons in optstring). --- update-grml-rescueboot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-grml-rescueboot b/update-grml-rescueboot index 0dc97d5..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 -- 2.1.4 From 8c499f10caf12cba536520dd4f1f765cb4f1251f Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 21 Mar 2022 16:26:49 +0100 Subject: [PATCH 05/10] Release new version 0.5.2 --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 62d67c0..1dac8e7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +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) -- 2.1.4 From 27727786137e21043d24471a86673b9cb8294f1c Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Fri, 7 Apr 2023 00:22:50 -0400 Subject: [PATCH 06/10] Add new GRUB_SUBMENU functionality and config parameter --- 42_grml | 15 +++++++++++++-- etc/default/grml-rescueboot | 4 ++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/42_grml b/42_grml index b951465..7fc45ba 100755 --- a/42_grml +++ b/42_grml @@ -86,6 +86,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)" @@ -112,9 +119,9 @@ for grmliso in $iso_list ; do echo "Found Grml ISO image: $grmliso" >&2 title="Grml Rescue System ($grml)" - grub_prep=$(prepare_grub_to_access_device "$device" | sed -e "s/^/ /") + grub_prep=$(prepare_grub_to_access_device "${device}" | sed -e "s/^/${indent}/") - cat << EOF + sed -e "s/^/${submenu_indent}/" << EOF menuentry "${title}" { ${grub_prep} iso_path="${rel_dirname%/}/${grml}" @@ -130,4 +137,8 @@ ${grub_prep} EOF done +if [ -n "${GRUB_SUBMENU}" ] && [ -n "${iso_list}" ] ; then + echo "} # end submenu \"${GRUB_SUBMENU}\"" +fi + ## END OF FILE ################################################################# diff --git a/etc/default/grml-rescueboot b/etc/default/grml-rescueboot index 306f08e..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' -- 2.1.4 From 517bcbd5fe394c658e2b6539882535bcd711f146 Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Fri, 7 Apr 2023 00:07:46 -0400 Subject: [PATCH 07/10] Try using isoinfo(1) to extract an ISO image identifier --- 42_grml | 18 +++++++++++++++--- debian/control | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/42_grml b/42_grml index b951465..e8e8200 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 @@ -111,7 +118,12 @@ for grmliso in $iso_list ; do esac echo "Found Grml ISO image: $grmliso" >&2 - title="Grml Rescue System ($grml)" + iso_id=$(get_iso_identifier "${grmliso}") + if [ -n "${iso_id}" ] ; then + title="${iso_id} (${grml})" + else + title="Grml Rescue System (${grml})" + fi grub_prep=$(prepare_grub_to_access_device "$device" | sed -e "s/^/ /") cat << EOF 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 -- 2.1.4 From 39d3762704c36881c15af83692c1957f2eddf859 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 8 Sep 2023 11:35:13 +0200 Subject: [PATCH 08/10] Release new version 0.6.0 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1dac8e7..6276f89 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +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 ] -- 2.1.4 From cbb6227ade1de762001ff72d12c28c8da416a9eb Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Tue, 12 Sep 2023 23:19:53 -0400 Subject: [PATCH 09/10] Minor tweaks to terminal output, variables, and GRUB stanza * Print `Found grml-rescueboot ISO image:` instead of `Found Grml ISO image:` as the latter implies that the ISO image comes from Grml, whereas the former is more to the point of "grml-rescueboot found this image"; * Similarly, just print the ISO filename as the title, as "Grml Rescue System" implies that the ISO is the actual Grml rescue system; * Use the existing `${indent}` variable instead of another eight spaces; * Store `"${rel_dirname%/}/${grml}"` in a variable, as it is likely to be needed more than once; * Add Debian bug reference for the `tpm` issue, as it is difficult for the user to understand otherwise; * Use the existing GRUB variable to set the loopback path; * Perform cleanup after exiting the ISO loopback menu. --- 42_grml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/42_grml b/42_grml index d84d169..7b96e6b 100755 --- a/42_grml +++ b/42_grml @@ -124,27 +124,33 @@ for grmliso in $iso_list ; do ;; esac - echo "Found Grml ISO image: $grmliso" >&2 + 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 Rescue System (${grml})" + title="${grml}" fi - grub_prep=$(prepare_grub_to_access_device "$device" | sed -e "s/^/ /") + grub_prep=$(prepare_grub_to_access_device "${device}" | sed -e "s/^/${indent}/") + grub_iso_path="${rel_dirname%/}/${grml}" 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 # support booting recent GRUB versions on UEFI systems + # (see bugs.debian.org/959425) rmmod tpm - loopback loop "${rel_dirname%/}/$grml" + loopback loop "\$iso_path" set root=(loop) configfile /boot/grub/loopback.cfg + unset root + loopback -d loop + unset iso_path + unset kernelopts } EOF done -- 2.1.4 From c9fec0608ea679cd8a3051a81e2cb8850ffda01e Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 2 Feb 2024 16:14:08 +0100 Subject: [PATCH 10/10] Release new version 0.6.1 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6276f89..972a752 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +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 ] -- 2.1.4