Hi people,
I have the follwing problem:
Unfortunately I turned my laptop off during kernel upgrade and I’m not able to boot.
This happend to me before and I back then i sucessfully fixed it by using a EndeavourOS/Arch live usb, chrooting into the system and finishing the install process.
This time I still got an error message in grub, I can’t fully remember, but I think it was something like kernel/initramfs not found.
So I tried reinstalling grub via chroot with:
sudo grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=EndeavourOS
The install failed due to efivars not beeing available and this broke my grub completly. When I boot now I only get into the emergency shell.
Since I have installed EndeavourOS with btrfs filesystem, this is how I mount and chroot into my existing system:
sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot
sudo mount -o subvol=@home /dev/nvme0n1p2 /mnt/home
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /run /mnt/run
sudo mount -t efivarfs efivarfs /sys/firmware/efi/efivars
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt /bin/bash
sudo modprobe efivarfs
Chrooting works, I can install packages etc. (I downgraded kernel and kernel-headers to 6.5.9-arch2-1, since this is the version of the live usb I’m using)
The thing that drives me crazy is that I’m booting in UEFI mode and in the live envroinment the efivars are loaded sucessfully (effibootmgr, efivar -l and ls /sys/firmware/efi/efivars all print the efi variables/ expected output)
But inside of chroot the efivars are empty and it says EFI mode is not supported.
Output (inside chroot) of dmesg | grep efi:
[ 0.000000] efi: EFI v2.7 by American Megatrends
[ 0.000000] efi: ACPI=0xa7309000 ACPI 2.0=0xa7309014 SMBIOS=0xacc06000 SMBIOS 3.0=0xacc05000 MEMATTR=0xa62bc018 ESRT=0xa62b8718 INITRD=0xa62c5298 RNG=0xa72b5018
[ 0.000000] efi: Remove mem285: MMIO range=[0xf0000000-0xf7ffffff] (128MB) from e820 map
[ 0.000000] efi: Remove mem286: MMIO range=[0xfd000000-0xfedfffff] (30MB) from e820 map
[ 0.000000] efi: Not removing mem287: MMIO range=[0xfee00000-0xfee00fff] (4KB) from e820 map
[ 0.000000] efi: Remove mem288: MMIO range=[0xfee01000-0xffffffff] (17MB) from e820 map
[ 0.000000] efi: Remove mem290: MMIO range=[0x450000000-0x4701fffff] (514MB) from e820 map
[ 0.034384] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns
[ 0.814613] pci 0000:06:00.0: BAR 0: assigned to efifb
[ 0.830211] efivars: Registered efivars operations
[ 1.873705] tsc: Refined TSC clocksource calibration: 2994.373 MHz
[ 55.793009] systemd[1]: Starting Load Kernel Module efi_pstore...
[ 55.911087] systemd[1]: TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).
[ 56.162184] audit: type=1130 audit(1701428132.706:10): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@efi_pstore comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 56.162196] audit: type=1131 audit(1701428132.706:11): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=modprobe@efi_pstore comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Since there is no error regarding efi, at this point I don’t know what to try else and what the reason could be the efivars to not beeing successfully loaded in chroot.
I would be really happy if this is somehow fixable without complete reinstalling.
Since I feel like trying to go further with chroot might not be the best option, do you have any recommendations for other repair tools that could fix this issue?
Any tips would be highly appreciated
David