You are not logged in.

#1 2023-07-08 00:50:29

jakanz
Member
Registered: 2023-07-08
Posts: 3

"Error preparing initrd: not found" despite existing initrd files

Currently writing from a phone, so I apologize if this seems unorthodox and weird to type.
Yesterday after rebooting, my GDM service just downright stopped working. I went on a 3-hour tirade trying to find a method to fix it and get it working again, but eventually after accidentally removing the intel-ucode package, which is required for the bootloader, it stopped working altogether and despite having installed intel-ucode now, keeps returning the error about preparing initrd.
Both the intel-ucode.img and initramfs-linux.img files are present when chrooting into my rootfs and running:

ls boot

I have used both the mkinitcpio -P and mkinitcpio -p linux commands (whatever the differences are) to regenerate the initramfs files to little avail. I've also run

genfstab -U /mnt >> /mnt/etc/fstab

to regenerate the fstab, but I have not seen if this works just yet. (I was initially having trouble chrooting into my rootfs since apparently some directories were missing, but it was eventually fixed, so I didn't have a chance to regenerate the fstab until just now.)
I'm posting this in hopes that people with technical knowhow may understand the underlying cause that the bootloader cannot read the initrd files to succeed booting. I have done much of searching throughout these forums and Google queries, even resorting to using ChatGPT to getting something working again xD.
I use the systemd-boot loader since I am on a UEFI system, so I suspect whatever issue lies within the failure to read initrd likely has to do with how the bootloader is reading the file or even if the file is there in the first place.
I'm very open to suggestions, I'm desperate at this point. I just wanted to play some silly games. :{

Offline

#2 2023-07-08 06:30:05

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: "Error preparing initrd: not found" despite existing initrd files

I don't use systemd-boot but perhaps your EFI entry in your NVRAM is not working. Check with bootctl if you have the right listing in your NVRAM. You might need to update the entry there. Also did you manually check your fstab and made sure the UUID's of your mount partitions are correct?

Offline

#3 2023-07-11 02:13:45

jakanz
Member
Registered: 2023-07-08
Posts: 3

Re: "Error preparing initrd: not found" despite existing initrd files

d_fajardo wrote:

I don't use systemd-boot but perhaps your EFI entry in your NVRAM is not working. Check with bootctl if you have the right listing in your NVRAM. You might need to update the entry there.

Running bootctl returns the following:

Firmware: UEFI 2.70 (American Megatrends 5.19)
Firmware Arch: x64
Secure Boot: disabled


Current Boot Loader:
Product: systemd-boot 253.2-1-arch
ESP: /dev/disk/by-partuuid/b0bf48e2-934e-4221-bca9-72dfa760d3fc
File: /EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI


Boot Loaders Listed in EFI Variables:
Title: UEFI OS
ID: 0x0007
Status: active, boot-order
Partition: /dev/disk/by-partuuid/b0bf48e2-934e-4221-bca9-72dfa760d3fc
File: /EFI/BOOT/BOOTX64.EFI

Title: Linux Boot Manager
ID: 0x0000
Status: active, boot-order
Partition: /dev/disk/by-partuuid/b0bf48e2-934e-4221-bca9-72dfa760d3fc
File: /EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI

some parts deemed unnecessary omitted


d_fajardo wrote:

Also did you manually check your fstab and made sure the UUID's of your mount partitions are correct?

Running cat /etc/fstab returns the following:

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb2
UUID=35daa709-2fbb-402b-b3b2-bc63dbe008cf  /    btrfs   rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/  0 0

some parts deemed unnecessary omitted


Not too sure bootctl should be reading "/dev/disk/by-partuuid/..." and I'm also not sure if the mismatch of the UUIDs in the fstab file and the bootctl command means anything. I'm open to any ideas though, I'm not too sure if this means anything.
If the problem lies within a corruption or a false bootloader at all, isn't it possible the bootloader could be reinstalled or at least repaired?

Offline

#4 2023-07-11 19:19:01

jakanz
Member
Registered: 2023-07-08
Posts: 3

Re: "Error preparing initrd: not found" despite existing initrd files

I finally understand why reinstalling systemd-boot didn't work when I was troubleshooting on my own. EFI systems partitioned in MBR do not support it. Yet, even under GPT, it fails by saying that by EFI partition is not a FAT ESP. Do I need to reformat this partition to FAT somehow in order for bootctl to reinstall my bootloader?

Offline

#5 2023-07-11 21:58:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: "Error preparing initrd: not found" despite existing initrd files

Most likely. FAT is the only specified filesystem:
https://wiki.archlinux.org/title/EFI_sy … _partition

Offline

Board footer

Powered by FluxBB