Today I did a
pacman -Syu
and rebooted and I could no longer boot.
My first inclination was to downgrade the kernel, so I looked in my pacman cache and did
pacman -U linux-zen-6.9.2.zen1-1-x86_64.pkg.tar.zst linux-zen-headers-6.9.2.zen1-1-x86_64.pkg.tar.zst
That didn't work.
I noticed that for a split second during boot this message would flash:
EFI stub: ERROR: failed to read file
EFI stub: ERROR: failed to load initrd: 0x800000000000000a
EFI stub: ERROR: efi_stub_entry() failed!
I use an EFISTUB to boot and I'm pretty sure I hadn't changed it, but whatever, so I deleted all entries and recreated it, still no luck.
I don't get why it is talking about the initrd, here is what I have in /boot:
# ls /boot
initfamfs-linux-zen-fallback.img initramfs-linux-zen.img intel-ucode.img vmlinuz-linux-zen
Here are the various boot entries I have tried, none have worked (the difference is the :
efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Artix Linux Zen" --loader /vmlinuz-linux-zen --unicode 'cryptdevice=UUID=0290eade-0e29-40a1-bee6-17389bc36e5a:cryptlvm root=/dev/mapper/lvmSystem-root rw initrd=\intel-ucode.img initrd=\initramfs-linux-zen.img' --verbose
efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Artix Linux Zen" --loader /vmlinuz-linux-zen --unicode 'cryptdevice=UUID=0290eade-0e29-40a1-bee6-17389bc36e5a:cryptlvm root=/dev/lvmSystem/root rw initrd=\intel-ucode.img initrd=\initramfs-linux-zen.img' --verbose
efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Artix Linux Zen" --loader /vmlinuz-linux-zen --unicode 'cryptdevice=UUID=0290eade-0e29-40a1-bee6-17389bc36e5a:cryptlvm root=UUID=8dc0b7d3-d326-4c78-b13a-411b628750fd rw initrd=\intel-ucode.img initrd=\initramfs-linux-zen.img' --verbose
Just to be clear, to try to fix all this I am booting into live iso and running the following:
cryptsetup luksOpen /dev/nvme0n1p2 cryptlvm
vgchange -ay
mount /dev/mapper/lvmSystem-root /mnt
mount /dev/nvme0n1p1 /mnt/boot
artix-chroot /mnt
and then I mess around.
The output of lsblk:
# lsblk -o NAME,FSTYPE,LABEL,UUID,MOUNTPOINTS,PARTUUID # just the drives I'm working with
NAME FSTYPE LABEL UUID MOUNTPOINTS PARTUUID
nvme0n1
|-nvme0n1p1 vfat CD98-8606 /boot cd126f1e-2316-4471-9cc9-ea5ebe82ebdb
`-nvme0n1p2 crypto_LUKS 0290eade-0e29-40a1-bee6-17389bc36e5a b291cb9e-ffda-43c3-8606-aac558672ee8
`-cryptlvm LVM2_member G8SpbS-eHT1-sdPi-SVk3-uNfC-3phl-g290nH
|-lvmSystem-swap swap 20de1d03-c4c6-4b29-a46a-f2a894e3eb7b
`-lvmSystem-root ext4 8dc0b7d3-d326-4c78-b13a-411b628750fd /
Here's the relevant variables in /etc/mkinitcpio.conf
MODULES=(ext4)
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems fsck)
COMPRESSION="cat"
and lastly my /etc/fastab
# /dev/mapper/lvmSystem-root
UUID=8dc0b7d3-d326-4c78-b13a-411b628750fd / ext4 rw,relatime 0 1
# /dev/nvme0n1p1
UUID=CD98-8606 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
I'm not sure what is going on anymore.
I was more familiar with all this when I first set it up years ago but I admit I am a little fuzzy on it now, any help would be appreciated.
Is there anything else I should be checking?
maybe your EFI installation is broken and needs to be redone ?
your mkinitcpio.conf looks good, even with luks encryption, i have pretty much the same.
what does "
efibootmgr -v" tell you ?
also, in your /boot partition, there should be an "EFI" folder".
try to create it.
(i have the same partition type. a /boot in fat32, which contains the boot files and the EFI, then a 2nd luks encrypted partition)
and to make the EFI part normal again, you can try that (that's what i would do :) )
boot on a usb key, mount your partitions, proc/sys/dev, (just like you said you did), then let grub do the work for you
grub-install --target=x86_64-efi --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg
then exit the chroot, unmount everything, reboot and cross your fingers :)
efibootmgr -v
Output:
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0000,0001
Boot0000* Artix Linux Zen HD(1,GPT,cd126f1e-2316-4471-9cc9-ea5ebe82ebdb,0x800,0xff800)/\vmlinuz-linux-zenSOME_LONG_HEX_STRING
// ommitting the rest
Okay I did not have a /boot/EFI directory.....strange.
I should have mentioned that I never used grub and never installed it. I use an EFI stub.
If at all possible I would like to NOT use grub, not only because it will make my boot every so slightly longer, but because I have no idea how to set it up with luks and lvm and all that.
ok, i figured out that you dont use grub.
(which explains why you dont have an EFI directory)
you efibootmgr seems correct.
try the most simple one first, maybe in a script to be easier to use
efibootmgr -d /dev/nvme0n1 -p 1 -c -L "Artix Linux Zen" -l /vmlinuz-linux-zen -u "cryptdevice=UUID=${UUID}:${luksName} root=/dev/mapper/${vgname}-${lvName} rw initrd=/initramfs-linux-zen.img"
where
$UUID is the uuid of you 2nd partition (the luks one)
$luksName is is the name of your luks device
$vgName is the name of your VG
$lvName is the name of your LV rootfs
(so maybe the problem is the "intel-ucode" part ?)
btw, maybe you can use something like this to make it easy :)
https://github.com/eaut/efistub
(i've tried it in an arch vm, works great)
That was it! Thank you!
I was able to boot. I upgraded intel-ucode and my kernel and added the intel-ucode back to the EFISTUB.
good for you :)
(how crazy the intel ucode makes us...)