Release new version 0.6.1 master v0.6.1
authorMichael Prokop <mika@grml.org>
Fri, 2 Feb 2024 15:14:08 +0000 (16:14 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 2 Feb 2024 15:14:08 +0000 (16:14 +0100)
42_grml
debian/changelog
debian/control
etc/default/grml-rescueboot
update-grml-rescueboot

diff --git a/42_grml b/42_grml
index 96e5e1f..7b96e6b 100755 (executable)
--- 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 #################################################################
index 44e612f..972a752 100644 (file)
@@ -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 <mika@grml.org>  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 <mika@grml.org>  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 <mika@grml.org>  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 <opekar@eccam.com> for the bug
+    report (Closes: #975835)
+
+ -- Michael Prokop <mika@grml.org>  Wed, 23 Dec 2020 17:14:37 +0100
+
 grml-rescueboot (0.5.0) unstable; urgency=medium
 
   The "你好, first upload from debconf18 @ Taiwan" release
index 402399f..d371e64 100644 (file)
@@ -23,6 +23,7 @@ Depends:
  ${shlibs:Depends},
 Recommends:
  debian-keyring,
+ genisoimage,
  gpgv,
  wget,
 Description: Integrates Grml ISO booting into GRUB
index d2154de..4f4f80f 100644 (file)
@@ -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'
index 89200c3..f555034 100755 (executable)
@@ -34,7 +34,7 @@ usage() {
   echo "Usage: $(basename "$0") [-f] [-a <32|64|96>] [-t <small|full>]"
 }
 
-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."