#Boot failed, stuck in emergency mode with root user locked [SOLVED]

134 messages · Page 1 of 1 (latest)

jade scarab
#

After a power outage I had to set my EFI boot stub

Used efibootmgr right (omitting these comments like so with parenthesis),

efibootmgr --create --disk /dev/nvme0n1 --part 1 (for nvme0n1p1 /boot) --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=(exact blkid for root) rw initrd=\initramfs-linux.img'

opaque flume
#

I suspect that reinstalling the kernel and regenerating the initramfs would sort this out

#

You'll probably need your iso usb

heady surgeBOT
#

What

arctic mauve
#

@jade scarab

heady surgeBOT
#

What's wrong

arctic mauve
jade scarab
#

installed kernel and regenerated the initramfs and it didnt work

#

tried

heady surgeBOT
#

do you have a live usb

connnor ↩️

[Reply to:](#1397627514771472425 message) installed kernel and regenerated the initramfs and it didnt work

jade scarab
heady surgeBOT
#

boot into it

#

then mount your root filesystem and chroot into it

jade scarab
#

alright

heady surgeBOT
#

then do usermod -U root && passwd root

#

set a password, and regenerate the initramfs

opaque flume
#

If this is systemd-boot I think the root account needs activating in a config somewhere? I've not used it but I think I read that

#

journalctl -xb would be useful to look at, as it mentions

jade scarab
#

oh wait

#

i should prob fsck nvme0n1p1

jade scarab
compact bone
opaque flume
#

Yeah, I'm curious how you're regenerating the initramfs

jade scarab
#

mkinitcpio -P

opaque flume
#

Most complete way is to pacman -S <your kernel>

opaque flume
jade scarab
#

yeah

opaque flume
#

Well fiddlesticks

jade scarab
opaque flume
#

Does systemd-boot have a way of reinstalling it or regenerating its config?

jade scarab
#

no

#

im wrong

#

wait 💀

#

im all confused here

opaque flume
#

I can only go what I know of grub so please take it all with a grain of salt

#

I can only figure that bootloaders would work similarly

#

But for grub you run grub-install against the ESP to install grub there, and then grub-mkconfig to generate the grub config it will refer to to print all the boot entries when it starts

jade scarab
opaque flume
#

Assuming it has an equivalent.

jade scarab
#

systemd-boot is tied to systemd, it comes with as a package

#

it makes it more complicated

#

thats why i like using really anything that systemd supports because in theory it'd have no issue connecting the dots from systemd->systemd-boot but something's gotta be wrong

compact bone
#

btrfs?

#

Is that what you are using for filesystem?

jade scarab
#

ext4

jade scarab
opaque flume
#

We've not really seen an error yet, besides that fsck warning

#

hmm looking closer, this does look quite error-y

jade scarab
#

looked it up and ppl said they could run with it on, it's just bc the nvme firmware is "bad" like the cheap kinda bad

opaque flume
#

Actually, looking it up it is looking less error-y and more just a warning

jade scarab
#

modules literally load

cedar tiger
#

hi, what does journalctl -b -p 5 says?

#

are you chroot ing into the root drive?

opaque flume
jade scarab
cedar tiger
#

exactly what muesli said

heady surgeBOT
#

the error is that the initramfs fails to mount the rootfs and switch to the root

jade scarab
heady surgeBOT
#

no

#

journalctl reads from /var/log/journal

jade scarab
#

excuse my mistake, those are from the iso

cedar tiger
#

ok, so your kernel is tainted

#

you're prob using propietary stuff

heady surgeBOT
#

nvidia driver i saw

cedar tiger
#

and is dumping core

heady surgeBOT
#

that is not a problem

jade scarab
#

excuse that comment aswell im chrooted

heady surgeBOT
#

did you regenerate initramfs

jade scarab
#

yeah

heady surgeBOT
#

something is causing it to fail to mount the real root

jade scarab
#

when chrooting?

opaque flume
#

what kernel?

heady surgeBOT
#

here is the error

#

failed to mount sysroot

#

this is the error that causes your system to not boot

#

what did fsck result in

jade scarab
#

this, and a dirty bit (which i unset)

heady surgeBOT
#

oh oh oh oh oh oh that is not the problem

#

check /dev/nvme0n1p2

#

not nvme0n1p1

jade scarab
#

oh oh

opaque flume
#

Should the init not be fscking automagically? thonk

jade scarab
heady surgeBOT
#

it only does it periodically

muesli ↩️

[Reply to:](#1397627514771472425 message) Should the init not be fscking automagically? thonk

#

unless you create /.autorelabel which causes it to fsck on every boot

opaque flume
#

TIL. I figured it would do it every time

#

I wish that error was more descriptive

heady surgeBOT
#

it fsck's only when the time has arrived iirc

opaque flume
# jade scarab

looking at this entry, should it be root=UUID=blahblah?

cedar tiger
#

no, the fstab looks fine

opaque flume
#

Not in the fstab, in the boot entry

cedar tiger
#

root=UUID=ksdjfksdj applies to the kernel boot parameters

jade scarab
#

fixed arch.conf and rebooting

cedar tiger
opaque flume
#

In the 3rd pic of the three

#

If it is that I'm going to be upset on your behalf @jade scarab

jade scarab
#

still no, even after the fix sysroot is failing to mount the drive

cedar tiger
opaque flume
jade scarab
#

damn

#

still, same outcome

#

it's gotta be efibootmgr

#

i def did something wrong

#

but like ?? it's exactly the same UUID

opaque flume
#

including the UUID=?

jade scarab
#

yeah

opaque flume
#

can you show a pic of the efibootmgr output?

#

no args should show what's in your nvram

jade scarab
#

should i add UUID= from efibootmgr

#

root=UUID=

#

oh

#

ok

opaque flume
#

I think so

jade scarab
#

yea ur gonna be dissapointed on my behalf

#

NOOOO

#

it works

opaque flume
#

🎉

cedar tiger
#

nice

jade scarab
#

im writing this down in my "when my power goes out what to fix for arch breaking efi partitions" checklist

#

Boot failed, stuck in emergency mode with root user locked [SOLVED]

#

ugh

#

my bad guys LMAO

#

i usually get the efibootmgr right

opaque flume
#

If this is a single OS machine, may I suggest a unified kernel image? :D Dodge all this EFI/bootloader nonsense

#

"Hey compooter, run this"

jade scarab
#

unified kernel image sounds like something i need, because windows is the only boot manager that isn't fragile as my linux boot stub