[SOLVED] How to get the UEFI to detect Debian 12 boot partition?

Alright, made a quick shell script:

#!/bin/sh

efibootmgr -q --bootnum 0000 -B

efibootmgr -q --bootnum 0000 --unicode \
--create --disk /dev/nvme0n1p1 \
--part 1 \
--label "Debian GNU/Linux 12 (bookworm)" \
--loader '\EFI\debian\shimx64.efi' \
--unicode 'root=UUID=<xxxx> rw initrd=\initrd.img'

efibootmgr --bootorder 0000,2001,2002,2003

There were leftover entries for Windows bootmgr that I removed.

The bootnums 2001,2002,2003 were already set for other things. When I checked cmdline I noticed /vmlinuz is a symlink for Debian-based distros, even though it showed /vmlinuz-6.10.11+bpo-amd64, and the initrd= line was also missing. Huh… But hopefully that all works as expected. Time to test!

  • EDIT: Okay, I was just blindly copy-pasting. I should have used --loader '\EFI\debian\shimx64.efi' instead of --loader /vmlinuz. When doing it that way, the UEFI does not annoyingly rename the entry to Linpus Lite anymore!

But I get a new error when booting that says: start_image(): Returned not found ...

But yet it continued to boot properly, so maybe it can be treated as a warning, or something I forgot to configure? I don’t know. Also, it changes rw to ro in the cmdline. Not sure why.

Also I realized BOOT_IMAGE= is the same thing as initrd= but for cmdline:blush: