Hi,

* Holger Wansing [Tue Oct 27, 2026 at 09:07:57PM +0100]:
> Michael Prokop <[email protected]> wrote (Mon, 26 Oct 2026 12:27:33 +0100):
> > As a starting point, what's the output of the following commands
> > from your running Debian trixie system:
> > 
> >   dpkg -l | grep grub
> 
> ned@t520:~$ dpkg -l | grep grub
> ii  grub-common                                         2.12-9+deb13u2        
>                        amd64        GRand Unified Bootloader (common files)
> ii  grub-efi-amd64-bin                                  2.12-9+deb13u2        
>                        amd64        GRand Unified Bootloader, version 2 
> (EFI-AMD64 modules)
> ii  grub-efi-amd64-signed                               1+2.12+9+deb13u2      
>                        amd64        GRand Unified Bootloader, version 2 
> (amd64 UEFI signed by Debian)
> ii  grub-efi-amd64-unsigned                             2.12-9+deb13u2        
>                        amd64        GRand Unified Bootloader, version 2 
> (EFI-AMD64 images)
> ii  grub-pc                                             2.12-9+deb13u2        
>                        amd64        GRand Unified Bootloader, version 2 
> (PC/BIOS version)
> ii  grub-pc-bin                                         2.12-9+deb13u2        
>                        amd64        GRand Unified Bootloader, version 2 
> (PC/BIOS modules)
> ii  grub2-common                                        2.12-9+deb13u2        
>                        amd64        GRand Unified Bootloader (common files 
> for version 2)
> 
[...]

> But anyway, installing the 0.7.0 did not change anything: when selecting
> the grml grub entry, the grub menu disappears for some seconds (so only
> the graphical grub background is visible), and then the grub menu appears
> again as in a usual boot process, and after the timeout is over, the
> default entry (Debian Trixie) is booting.

[...]

Thanks, that was helpful. I managed to track down and reproduce your
issue. Turns out that this is a regression of
https://github.com/grml/grml-live/commit/5c048ce45afbe8ba61963828348780a20595b6d1
affecting the Grml 2026.09 ISOs.

Technical details: In the GRUB menu when selecting the Grml ISO,
$prefix points to (hd0,msdos1)/boot/grub. Now when furthermore
sourcing (loop)/boot/grub/grub.cfg (from the ISO), the file
/boot/grub/grml-theme/bios.txt can't be read, as it's expected to be
at (hd0,msdos1)/boot/grub (instead of (loop)/boot/grub/).

I managed to get a workaround within grml-rescueboot which addresses
this. If you place the attached `42_grml` file as
/etc/grub.d/42_grml and execute `update-grub`, you should get a
working setup.

This is a workaround only though, and I'd rather prefer if we manage
to get this fixed within the Grml ISOs (as module loading might fail
if GRUB from host and Grml ISO differ too much). This is what I'm
trying to tackle in https://github.com/grml/grml-live/pull/648

So, to get it working:

* use Grml ISOs <=2026.04 with grml-rescueboot (should just work OOTB)

* use attached `42_grml` as /etc/grub.d/42_grml for booting
  Grml ISOs version 2026.09

* wait for upcoming Grml daily ISOs/stable releases, which should
  hopefully work within grml-rescueboot without requiring any
  further changes

regards
-mika-
#!/bin/sh
# Filename:      42_grml
# Purpose:       grub-mkconfig helper script for Grml rescue systems
# Authors:       Grml team (grml.org), (c) Andreas Gredler <[email protected]>, 
Michael Prokop <[email protected]>
# License:       This file is licensed under the GPL v2+.
################################################################################
# shellcheck shell=dash

set -e

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

if [ -r "${libdir}/grub/grub-mkconfig_lib" ] ; then
  # shellcheck disable=SC1091
  . "${libdir}/grub/grub-mkconfig_lib"
elif [ -r /usr/share/grub/grub-mkconfig_lib ] ; then # fallback for e.g. Fedora
  # shellcheck disable=SC1091
  . /usr/share/grub/grub-mkconfig_lib
else
  echo "Could not locate file grub-mkconfig_lib, please report a bug." >&2
fi

# default unless configured otherwise:
ISO_LOCATION="/boot/grml"

if [ -r /etc/default/grml-rescueboot ] ; then
  # shellcheck disable=SC1091
  . /etc/default/grml-rescueboot
fi

resolve_dm_name() {
  retval="$1"
  base=${1##*/}
  for block in /sys/block /sys/class/block ; do
    [ ! -d "${block}/${base}/dm" ] && continue
    retval="/dev/mapper/$(cat "${block}/${base}/dm/name")"
    break
  done
  case "$retval" in
    /dev/dm-*)
    minor=${retval##*-}
   retval="/dev/mapper/$(dmsetup info -C --noheadings -o name -j 253 -m 
"$minor")"
    ;;
  esac

  echo "$retval"
}

get_dependencies() {
  device=${1}
  if [ -z "${device}" ] ; then
    return
  fi
  device=$(readlink -f "${device}")
  case "$device" in
    /dev/mapper/*)
    device="/dev/dm-$(dmsetup info -C --noheadings -o minor "$device")"
    ;;
  esac

  base=${device##*/}
  dependencies=""
  additional_dependencies=""
  for block in /sys/block /sys/class/block ; do
    [ ! -d "${block}/${base}/slaves" ] && continue
    for file in  "${block}/${base}"/slaves/* ; do
      dep_name="/dev/${file##*/}"
      dep_name=$(resolve_dm_name "${dep_name}")

      # resolve recursively all dependencies
      additional_dependencies=$(get_dependencies "${dep_name}")

      dependencies="$dependencies $additional_dependencies $dep_name"
    done
    break
  done
  echo "$dependencies"
}

get_iso_identifier() {
  local iso="$1"
  local id=
  local date=
  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/^[^:]*: *//')
    date=$(isoinfo -debug -d -i "${iso}" 2>/dev/null | awk '/^Creation Date:/ 
{print $3$4$5}')
  fi
  if [ -n "${id}" ] && [ -n "${date}" ]; then
    echo "${id} [${date}]"
  else
    echo "${id}"
  fi
}

iso_list=""
for file in "${ISO_LOCATION}"/*.iso ; do
     if grub_file_is_not_garbage "$file" ; then
       iso_list="$iso_list $file "
     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")"
  # shellcheck disable=SC2154 # grub_probe is defined by grub-mkconfig_lib
  device="$("${grub_probe}" -t device "${grmliso}")"

  additional_param=""

  case "$device" in
    /dev/mapper*|/dev/md*)
      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#,}
      additional_param="live-media=$dep_string"
    ;;
  esac

  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}"

  sed -e "s/^/${submenu_indent}/" << EOF
menuentry "${title}" {
${grub_prep}
        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 "\$iso_path"
        set root=(loop)
        # Grml >= 2026.09 resolves its config via \$prefix (grml-live 5c048ce),
        # so point it at the ISO; preload modules from the host GRUB first
        insmod regexp
        insmod linux
        insmod all_video
        insmod gfxterm
        insmod gfxmenu
        insmod png
        set grml_orig_prefix="\$prefix"
        set prefix=(loop)/boot/grub
        configfile /boot/grub/loopback.cfg
        set prefix="\$grml_orig_prefix"
        unset grml_orig_prefix
        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 #################################################################

Attachment: signature.asc
Description: PGP signature

Reply via email to