You are not logged in.

#1 2023-09-14 23:01:19

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Error preparing initrd: Not found

I’ve had issues with /boot unmounting after kernel updates but this is new. I managed to fix my problem and logged in like normal. However, after restarting my PC, I now have an error coming up that says “Error preparing initrd: Not found.” The only change I made between the original fix and reboot was installing

kernel-modules-hook

I've been attempting to chroot into my Arch installation, but I'm also receiving an error saying

chroot: failed to run command /bin/bash: Permission denied

Last edited by Breeze1791 (2023-09-15 01:59:09)

Offline

#2 2023-09-15 06:43:09

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Error preparing initrd: Not found

chroot "how"?
As root? Using arch-chroot?

stat /mnt/bin/bash

Offline

#3 2023-09-15 07:27:40

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

seth wrote:

chroot "how"?
As root? Using arch-chroot?

stat /mnt/bin/bash

Yes, as root using arch-chroot.

When using stat

stat /mnt/bin/bash

I get this output:

File: /mnt/bin/bash
Size: 0           Blocks: 0           IO Block: 4096         directory
Device: 0,58        Inode: 264            Links: 1
Access: (0777/drwxrwxrwx)    Uid: (       0/      root)    Gid: (      0/      root)
Access: 2023-09-15 06:40:11.959940739 +0000
Modify: 2023-06-17 03:12:07.582182352 +0000
Change: 2023-09-15 06:40:11.959940739 +0000
 Birth:  2023-06-17 03:12:07.582182352 +0000

Offline

#4 2023-09-15 07:31:14

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Error preparing initrd: Not found

Size: 0           Blocks: 0           IO Block: 4096         directory

Let's see how bad it is.

LC_ALL=C pacman -root /mnt -Qkk | grep -v ', 0 altered files'

This is probably quite some text so maybe

LC_ALL=C pacman -root /mnt -Qkk | grep -v ', 0 altered files' | tee /tmp/brokeness.txt
cat /tmp/brokeness.txt | curl -F 'file=@-' 0x0.st

to redirect it into a file and then upload that.

Offline

#5 2023-09-15 07:40:55

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

seth wrote:

Size: 0           Blocks: 0           IO Block: 4096         directory

Let's see how bad it is.

LC_ALL=C pacman -root /mnt -Qkk | grep -v ', 0 altered files'

This is probably quite some text so maybe

LC_ALL=C pacman -root /mnt -Qkk | grep -v ', 0 altered files' | tee /tmp/brokeness.txt
cat /tmp/brokeness.txt | curl -F 'file=@-' 0x0.st

to redirect it into a file and then upload that.

Unfortunately, that just gives me an error saying

error: failed to initialize alpm library:
(root: oot, dbpath: oot/var/lib/pacman/)
could not find or read directory

Offline

#6 2023-09-15 07:44:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Error preparing initrd: Not found

"extremely bad"

https://wiki.archlinux.org/title/Solid_ … leshooting
https://wiki.archlinux.org/title/SMART
https://wiki.archlinux.org/title/Pacman … l_database

If there's any valuable data on that drive (private stuff, family pictures etc. - things you cannot download from the internet): SECURE THAT FIRST!

Offline

#7 2023-09-15 07:52:30

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

seth wrote:

"extremely bad"

https://wiki.archlinux.org/title/Solid_ … leshooting
https://wiki.archlinux.org/title/SMART
https://wiki.archlinux.org/title/Pacman … l_database

If there's any valuable data on that drive (private stuff, family pictures etc. - things you cannot download from the internet): SECURE THAT FIRST!

Are you saying it's an issue of drive failure? This is a relatively new NVMe drive. I just checked it in CrystalDiskInfo on my other NVMe that has Windows 10 installed and it has a S.M.A.R.T. status of 99% with no errors.

I assumed it was a boot issue since I've had /boot unmount multiple times.

Last edited by Breeze1791 (2023-09-15 07:56:57)

Offline

#8 2023-09-15 08:28:26

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Error preparing initrd: Not found

There's obviously some massive data corruption.
Might just be the APST, but we don't know the cause for now and since any interaction might be harmful, data rescue has thehighest priority.
Then check whether drive and ultimately OS are salvageable.

Edit: if you're using the windows nvme on the same system, see the 3rd link below!

Last edited by seth (2023-09-15 08:29:55)

Offline

#9 2023-09-15 08:38:46

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

seth wrote:

There's obviously some massive data corruption.
Might just be the APST, but we don't know the cause for now and since any interaction might be harmful, data rescue has thehighest priority.
Then check whether drive and ultimately OS are salvageable.

Edit: if you're using the windows nvme on the same system, see the 3rd link below!

Now that I think about it, these boot issues started after I updated my motherboard BIOS. It might have enabled secure boot since the settings were reset. I know that doesn't fix this issue, but it's possible that caused the initial problems.

Also, I just checked and the systemd UEFI menu that gives me the option of choosing Linux, Windows, or reboot into firmware interface is still there, meaning that not everything is gone. I'll keep working on it.

Offline

#10 2023-09-15 16:55:53

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

UPDATE: I believe I understand what caused the issue.

When /boot unmounted, it still let me decrypt the drive first with LUKS, but then when the list off the processes started, everything except /boot worked. I ended up just running

sudo pacman -S linux

and that fixed it.

However, this seems to have caused the initrd/vmlinuz files to be hidden. Is there a way to reveal or replace them?

Last edited by Breeze1791 (2023-09-15 17:00:27)

Offline

#11 2023-09-15 17:03:39

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

FURTHER UPDATE: Deleting the /mnt/bin directory and running pacstrap allowed me to arch-chroot into /mnt

Offline

#12 2023-09-15 19:00:34

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Error preparing initrd: Not found

Please don't multi-post, edit your previous post w/ updates if nobody has so far replied.

You do understand that while you're currently taking a rather unstructured approach to re-install the system, there's no explanation as to *why* you're in this situation to begin with and that your further interaction with the drive at worst jeopardizes valuable data it might contain and at, well, second worst will be futile if the corruption (eg. driven by APST) re-occurs?

Offline

#13 2023-09-15 19:39:05

Breeze1791
Member
Registered: 2023-09-14
Posts: 8

Re: Error preparing initrd: Not found

seth wrote:

Please don't multi-post, edit your previous post w/ updates if nobody has so far replied.

You do understand that while you're currently taking a rather unstructured approach to re-install the system, there's no explanation as to *why* you're in this situation to begin with and that your further interaction with the drive at worst jeopardizes valuable data it might contain and at, well, second worst will be futile if the corruption (eg. driven by APST) re-occurs?

There's nothing on the drive that isn't already backed up to multiple sources and I have a list of all packages both from the official repos and the AUR. My main concern is figuring out some of the configurations I have so I can set everything up again smoothly.

If I knew how this happened, I would have mentioned that by now. I'm just relaying the information I have since this all happened suddenly after a reboot.

Offline

#14 2023-09-15 22:18:22

dhzalol
Member
Registered: 2023-09-12
Posts: 9

Re: Error preparing initrd: Not found

try mounting again on archiso using
"mount /dev/sdx /mnt" and installing another bootloader

Offline

#15 2023-09-16 06:09:09

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Error preparing initrd: Not found

What do you assume this is going to achieve?
The OP faces a fundamental corruption of at least the system partition and basically needs to re-install the whole OS.
Whether using the scripts I linked in #6 can still achieve that at the current state is to be seen, otherwise he'll has to start from scratch.

Most important is however to understand why this has happend to prevent further occurrences.
nvme's tend to get screw up b/c of APST, ssd's in general because of too aggressive trimming strategies and the drive could also just be toast.

Offline

Board footer

Powered by FluxBB