DietPi VM UEFI Installers

Can you compare /boot/grub/grub.cfg (on the final DietPi image, not the Clonezilla one) and maybe the content of /boot/grub/i386-pc in both cases?

Grub Comparison.txt (11.8 KB)

The relevant difference seems to be in Debian:

                set root='hd0,gpt2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  cb77fdbf-db46-46b9-80af-f34fe575ad0f
                else
                  search --no-floppy --fs-uuid --set=root cb77fdbf-db46-46b9-80af-f34fe575ad0f
                fi

while in DietPi

                search --no-floppy --fs-uuid --set=root b05bc48c-ada7-4634-8927-face55570ae0

It only makes a difference if feature_platform_search_hint us NOT set, as then the GRUB config adds possible device names as hints for BIOS and EFI. I checked where it is coming from:

In /etc/grub.d/00_header it is generated by the prepare_grub_to_access_device function, defined in /usr/share/grub/grub-mkconfig_lib:

  # If there's a filesystem UUID that GRUB is capable of identifying, use it;
  # otherwise set root as per value in device.map.
  fs_hint="`"${grub_probe}" --device $@ --target=compatibility_hint`"
  if [ "x$fs_hint" != x ]; then
    echo "set root='$fs_hint'"
  fi
  if [ "x${GRUB_DISABLE_UUID}" != "xtrue" ] && fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then
    hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints=
    if [ "x$hints" != x ]; then
      echo "if [ x\$feature_platform_search_hint = xy ]; then"
      echo "  search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
      echo "else"
      echo "  search --no-floppy --fs-uuid --set=root ${fs_uuid}"
      echo "fi"
    else
      echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
    fi
  fi
  IFS="$old_ifs"

So that hint conditionals are only added, if on GRUB generation/update, the UUID is not identified by GRUB probe. Can you run update-grub on the Debian system and check whether this conditional block with feature_platform_search_hint is still present?

It looks like, when Clonezilla is updating GRUB (I think it does), its GRUB probe does identify the UUID. On a Bookworm VirtualBox VM here, it btw also has this block, so it is not something uncommon. Probably it is something common in VMs, and uncommon in physical machines. In that case, we’d need to find out how to force Clonezilla to add that block somehow. But first I’ll check whether it is already like that in the embedded DietPi image, before Clonezilla flashes it. If so, we can probably just edit it, before running the imager.

1 Like

Updated Grub.txt (6.7 KB)

1 Like

So it keeps adding this part, probably on all VMs. Oh …I think I know where the problem is … I think I did not add the ARM EFI GRUB package to the installer yet :sweat_smile:. Let me add those and create new images.
EDIT: Scrape that, I guess I was too tired when answering this, and had something different in mind :sweat_smile:.

@oturn
Can you try whether using initramfs-tools (instead of tiny-initramfs) helps with the display issues?

apt install initramfs-tools

Says it’s already installed.