:: [DNG] How I (finally) installed gru…
Top Page
Delete this message
Reply to this message
Author: Joel Roth
Date:  
To: dng
Old-Topics: [DNG] Moving and booting devuan
Subject: [DNG] How I (finally) installed grub for UEFI (was: Re: Moving and booting devuan)
On Fri, Jan 30, 2026, Joel Roth via Dng wrote:
> Trying to get linux to boot on my new-used T14. This model
> has secure boot, came from Newegg with Windows installed.


Hi again,

I disabled secure boot for now, and copied my linux
partition to the T14 internal nvme drive.

I'm flying under UEFI conditions, so to boot my devuan
partition, I'll need to install the EFI version of grub. In
particular, grub needs to install some files in the disk's
/EFI partition.

Not having these files in /EFI is the reason no supergrub
or rescue disk could boot the devuan partition under the
EFI regime.

Most directions for UEFI grub installation require:
0. booting some utility linux from USB
1. chrooting to the linux partition
2. running grub-install

I booted antix, followed directions from here[1] to
chroot to my linux partition. The chroot
needs some special directories:

/dev /dev/pts /proc /sys /sys/firmware/efi/efivars

So you mount the partition on, say, /target, then
use mount -B (bind) to mount them under
/target, for example, mount -B /dev /target/dev.

After all that, the chroot environment is running. :-) :-)
Because of a signing issue (repository is unsigned) apt-get
update refused to update. However apt-get install
grub-efi-amd64 *did* work.

Am I home free??

Not quite, grub-install fails with

error: failed to get canonical path of /dev/nvme0np1

Hmmm, /dev wasn't bound to /target/dev

I'm not sure that was the only error. Ended up
manually creating /boot/grub/device.map
with the single line: (hd0) /dev/nvme0n1

After fixing that, grub-install succeeds. I recommend the -v option
for extra details.

Now I reboot.... and get a grub shell prompt. I forgot I
needed to run update-grub. And, manual booting from the grub
shell fails on loading the initrd because I forgot to run
update-initramfs.

Okay, I ran update-initramfs, which helped me find that
/etc/initramfs-tool/conf.d/resume needs the UUID of the swap
file, otherwise slow booting.

But no grub boot menu, so I chroot one more time and run
update-grub.

Viola!

I've been greatly helped by Ventoy, which lets me have
a bunch of ISO images on a USB stick, and choose
one of them to boot. Antix and supergrub have been
the most useful. In addition to a full live environment,
antix has some boot rescue options. The new damn small
linux (DSL) distribution is also based on antix, so
that's another good choice.

This would take little time if I were to do it again.
However, I'm unlikely to need to knowledge gained
through this trial-and-error exploration for some
time.

1. https://askubuntu.com/questions/831216/how-can-i-reinstall-grub-to-the-efi-partition
See the reply by Nicolás

--
Joel Roth