You are not logged in.

#1 2024-12-23 13:43:19

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

[SOLVED] systemd-udevd 257 doesn't find root partition

After doing a full system update, booting to arch, systemd won't find the root partition, but the UUID is correct in the fstab and in the efibootmgr. I've tried to arch-chroot from a live usb and doing mkinitcpio -P but nothing, no errors, but still I can't boot to it

Last edited by BlackCherry (2024-12-24 03:32:43)

Offline

#2 2024-12-23 14:23:12

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

BlackCherry wrote:

I've tried to arch-chroot from a live usb and doing mkinitcpio -P but nothing, no errors, but still I can't boot to it

Do you have a separate /boot/ partition? Is there another /boot/ on the root partition that contains the new kernel & initramfs?

If so run `mount -a` in the chroot to mount everything listed in /etc/fstab and then reinstall the kernel package(s).


Jin, Jîyan, Azadî

Offline

#3 2024-12-23 14:32:59

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Yes I have a separate boot partition and I have it mounted in my live also (/mnt/boot in my case because the root partition is in /mnt/), just to make the mkinitcpio effective. what do you mean by 'reinstall the kernel package(s)'?

Offline

#4 2024-12-23 14:35:12

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

You will need the kernel image on the /boot/ partition to match the contents of /usr/lib/modules/ so it can load the filesystem drivers, that won't happen unless you reinstall the kernel with /boot/ mounted correctly.

Run fsck on the ESP first though, there must have been a reason it was un-mounted for the upgrade. Perhaps the FAT fileystem got corrupted somehow.


Jin, Jîyan, Azadî

Offline

#5 2024-12-23 14:39:07

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

 ~#fsck /dev/nvme0n1p2
fsck from util-linux 2.40.2
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
[123?q]?

whats this? it's in the ESP

Offline

#6 2024-12-23 14:42:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Looks like it was un-mounted incorrectly. Use the -a option to repair the filesystem automatically.


Jin, Jîyan, Azadî

Offline

#7 2024-12-23 14:45:19

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

~# fsck -a /dev/nvme0n1p2
fsck from util-linux 2.40.2
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
  Not automatically fixing this.
Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
 Automatically removing dirty bit.

*** Filesystem was changed ***
Writing changes.
/dev/nvme0n1p2: 11 files, 121209/261372 clusters

This will be enough? and what about the root partition?

Offline

#8 2024-12-23 14:47:35

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

That should be fine but I would consider re-formatting the partition and switching the mountpoint to /efi using autofs to avoid exposure.

You can check the root partition if you want but most other filesystems are more resilient than FAT.


Jin, Jîyan, Azadî

Offline

#9 2024-12-23 14:52:49

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

still can't boot

 waiting 10 seconds for device /dev/disk/by-uuid/"root partition uuid"
ERROR: device 'UUID="root partitio uuid"' not found. Skipping fsck.

Offline

#10 2024-12-23 14:59:03

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

So run the `file` command on the kernel image on the /boot/ partition to confirm the version and then check or share your bootloader configuration.

Also double-check /etc/fstab against the output of `blkid`.


Jin, Jîyan, Azadî

Offline

#11 2024-12-23 15:03:17

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

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Check "lsblk -f" whether the UUID is actually correct.
Can you boot the fallback initramfs? Maybe the nvme modules are missing in the initramfs?

Alternatively: Can you install and boot the LTS kernel?

Offline

#12 2024-12-23 15:12:45

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

seth wrote:

Can you boot the fallback initramfs?

How can I do that? also I triple checked but UUIDs are correct

Offline

#13 2024-12-23 15:15:06

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

My efibootmgr:

 efibootmgr --create --disk /dev/nvme0n1 --part 2 --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=UUID=157dd383-382e-4399-abfd-79aca335be92 rw initrd=\amd-ucode.img initrd=\initramfs-linux.img' --verbose

My fstab:

# /dev/nvme0n1p3
UUID=157dd383-382e-4399-abfd-79aca335be92	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p2
UUID=6E0C-8086      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

Offline

#14 2024-12-23 15:38:54

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

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

fstab and efibootmgr matching is meaningless, you need to check "lsblk -f" (from the install iso, before chrooting)

You can select the failsafe/fallback initramfs at your bootloader (it's the same kernel, you're just booting a different initramfs)

Offline

#15 2024-12-23 15:52:19

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

okay we've made progress, initramfs-fallback does work but the main initramfs don't

Offline

#16 2024-12-23 15:53:05

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

I mean, with the initramfs-fallback my system boots perfectly

Offline

#17 2024-12-23 15:56:42

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

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

seth wrote:

Maybe the nvme modules are missing in the initramfs?

sudo lsinitcpio /boot/initramfs-linux.img | grep -i nvme

Either the autodetection fails or you've some bogus stuff in your mkinitcpio.conf?

Offline

#18 2024-12-23 16:03:02

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

# lsinitcpio /boot/initramfs-linux.img | grep -i nvme
usr/lib/modules/6.12.4-arch1-1/kernel/drivers/nvme/
usr/lib/modules/6.12.4-arch1-1/kernel/drivers/nvme/common/
usr/lib/modules/6.12.4-arch1-1/kernel/drivers/nvme/common/nvme-auth.ko.zst
usr/lib/modules/6.12.4-arch1-1/kernel/drivers/nvme/host/
usr/lib/modules/6.12.4-arch1-1/kernel/drivers/nvme/host/nvme-core.ko.zst
usr/lib/modules/6.12.4-arch1-1/kernel/drivers/nvme/host/nvme.ko.zst

And in the fallback

# lsinitcpio /boot/initramfs-linux-fallback.img | grep -i nvme
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/common/
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/common/nvme-auth.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/common/nvme-keyring.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/nvme-core.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/nvme-fabrics.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/nvme-fc.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/nvme-rdma.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/nvme-tcp.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/host/nvme.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/nvme-fcloop.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/nvme-loop.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/nvmet-fc.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/nvmet-rdma.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/nvmet-tcp.ko.zst
usr/lib/modules/6.12.6-arch1-1/kernel/drivers/nvme/target/nvmet.ko.zst

I ... don't know what to say x,D

Offline

#19 2024-12-23 16:09:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Why do the fallback modules have a different version?

Did you run the `file` command on the kernel image on the ESP? Have you used `lsblk -f` or `blkid` to confirm the UUIDs?


Jin, Jîyan, Azadî

Offline

#20 2024-12-23 16:12:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

What's in your /etc/mkinitcpio.d/linux.preset?

Offline

#21 2024-12-23 16:18:40

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Scimmia wrote:

What's in your /etc/mkinitcpio.d/linux.preset?

# cat /etc/mkinitcpio.d/linux.preset 
# mkinitcpio preset file for the 'linux' package

#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
#default_image="/boot/initramfs-linux.img"
default_uki="/boot/EFI/Linux/arch-linux.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"

#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-linux-fallback.img"
fallback_uki="/boot/EFI/Linux/arch-linux-fallback.efi"
fallback_options="-S autodetect"

Offline

#22 2024-12-23 16:34:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Why is that set up for UKIs when you're not using UKIs?

Offline

#23 2024-12-23 16:42:42

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

yep, that's the funny thing I've discover, I've never have an initramfs because I use a UKI but in november I have a bad update that broke my efiboot entry and searching in the internet I saw that effectively I'm missing the efiboot entry and also my initramfs, but in that moment I forgot my UKI, so basically sorry to all of you that helped me with this it was my fault no remembering that the UKI its a replacement for the initramfs, although I dont know why the initramfs-fallback is up to date, and thank you all so much for the support

Offline

#24 2024-12-23 17:02:17

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

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#25 2024-12-23 17:08:39

BlackCherry
Member
Registered: 2024-12-23
Posts: 14

Re: [SOLVED] systemd-udevd 257 doesn't find root partition

I would like to know why my initramfs-fallback is the only updating while having UKI, because with UKI I should not have any initramfs

Offline

Board footer

Powered by FluxBB