From 8c499f10caf12cba536520dd4f1f765cb4f1251f Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 21 Mar 2022 16:26:49 +0100 Subject: [PATCH 1/6] 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 2/6] 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 3/6] 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 4/6] 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 5/6] 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 6/6] 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