You are not logged in.

#1 2022-09-06 15:03:35

Isildur
Member
Registered: 2009-05-26
Posts: 100

Boot error with LVM after update

I'm experiencing a boot error since I updated my system yesterday. The error I get is this:

Error: device '/dev/mapper/main-root' not found. Skipping fsck.
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off

- The first line (Error: device '/dev/mapper/main-root' not found. Skipping fsck.) I think it is old and appeared when I configured LVM. Apparently it didn't cause any issues so far (the message only showed up for a split-second during boot). That's why I didn't bother until now but actually it's something worth investigating I guess.
- The second part is new and drops me into the recovery shell.
- When I use the Fallback initramfs option in GRUB the system boots normally.
- I read about the GRUB-issue but so far didn't understand how that might be the cause of my issue or if it's unrelated. That's why I didn't run grub-install & grub-mkconfig yet, cause I first wanted to understand the issue and not potentially loose the working fallback option.

I attached some information about my system. Any help on diagnosing the issue is appreciated - thanks in advance!

System Info
I have an LVM system with only /home being encrypted using LUKS on LVM. Here is some info that might be helpful

# pvs                                                                                                                                                                                                                              
  PV             VG   Fmt  Attr PSize    PFree
  /dev/nvme0n1p3 main lvm2 a--  <937.37g    0
  
# vgs                                                                                                                                                                                                                              
  VG   #PV #LV #SN Attr   VSize    VFree
  main   1   5   0 wz--n- <937.37g    0 
  
# lvs                                                                                                                                                                                                                              
  LV       VG   Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data2    main -wi-ao----  170.00g                                                    
  home     main -wi-ao---- <637.37g                                                    
  home_bak main -wi-a-----   10.00g                                                    
  root     main -wi-ao----   80.00g                                                    
  var      main -wi-ao----   40.00g                   
                                   
# dmsetup ls --target crypt                                                                                                                                                                                                    
home	(254, 5)

# cat /etc/crypttab                                                                                                                                                                                                            
...
home            /dev/mapper/main-home                           /etc/luks-keys/home

# cat /etc/mkinitcpio.conf | grep ^HOOKS                                                                                                                                                                                         
HOOKS=(base udev autodetect keyboard keymap modconf block lvm2 encrypt filesystems fsck)


# cat /etc/default/grub
...
GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"
...

# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux root=/dev/mapper/main-root rw loglevel=3 quiet

Offline

#2 2022-09-06 19:04:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Boot error with LVM after update

What was the output from pacman? You can find it in the log. Have you tried the LTS kernel with a non-fallback image?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-09-07 16:03:52

Isildur
Member
Registered: 2009-05-26
Posts: 100

Re: Boot error with LVM after update

Thanks for the advice. The pacman.log revealed that grub was updated in that update. Furthermore there where some errors in the mkinitcpio-hook that might explain the issues. I installed the linux-lts but it doesn't show up as a boot option in GRUB although the mkinitcpio for the LTS apparently ran fine. Probably I'll have to run the recommended GRUB commands then.

[2022-09-05T09:24:55+0200] [ALPM] running '30-systemd-tmpfiles.hook'...
[2022-09-05T09:24:55+0200] [ALPM-SCRIPTLET] Cannot set file attributes for '/var/log/journal', maybe due to incompatibility in specified attributes, previous=0x10001000, current=0x10001000, expected=0x10801000, ignoring.
[2022-09-05T09:24:55+0200] [ALPM-SCRIPTLET] Cannot set file attributes for '/var/log/journal/d9c58923d54c46548dcb9dcf0cd04d10', maybe due to incompatibility in specified attributes, previous=0x00001000, current=0x00001000, expected=0x00801000, ignoring.
[2022-09-05T09:24:55+0200] [ALPM-SCRIPTLET] Cannot set file attributes for '/var/log/journal/remote', maybe due to incompatibility in specified attributes, previous=0x10001000, current=0x10001000, expected=0x10801000, ignoring.
[2022-09-05T09:24:55+0200] [ALPM] running '30-systemd-udev-reload.hook'...
[2022-09-05T09:24:55+0200] [ALPM] running '30-systemd-update.hook'...
[2022-09-05T09:24:55+0200] [ALPM] running '30-update-mime-database.hook'...
[2022-09-05T09:24:56+0200] [ALPM] running '60-depmod.hook'...
[2022-09-05T09:25:02+0200] [ALPM] running '70-dkms-install.hook'...
[2022-09-05T09:25:02+0200] [ALPM-SCRIPTLET] ==> dkms install --no-depmod v4l2loopback/0.12.5 -k 5.19.6-arch1-1
[2022-09-05T09:25:02+0200] [ALPM-SCRIPTLET] Deprecated feature: REMAKE_INITRD
[2022-09-05T09:25:11+0200] [ALPM-SCRIPTLET] ==> depmod 5.19.6-arch1-1
[2022-09-05T09:25:18+0200] [ALPM] running '90-mkinitcpio-install.hook'...
[2022-09-05T09:25:18+0200] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
[2022-09-05T09:25:18+0200] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2022-09-05T09:25:18+0200] [ALPM-SCRIPTLET] ==> Starting build: 5.19.6-arch1-1
[2022-09-05T09:25:18+0200] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2022-09-05T09:25:19+0200] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2022-09-05T09:25:19+0200] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET] find: ‘sort’ terminated by signal 9
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET] modprobe: ERROR: missing parameters. See -h.
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2022-09-05T09:25:23+0200] [ALPM-SCRIPTLET]   -> Running build hook: [lvm2]
[2022-09-05T09:25:23+0200] [ALPM-SCRIPTLET]   -> Running build hook: [encrypt]
[2022-09-05T09:25:25+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: qat_4xxx
[2022-09-05T09:25:26+0200] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2022-09-05T09:25:26+0200] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2022-09-05T09:25:26+0200] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2022-09-05T09:25:26+0200] [ALPM-SCRIPTLET] ==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
[2022-09-05T09:25:27+0200] [ALPM-SCRIPTLET] ==> Image generation successful
[2022-09-05T09:25:27+0200] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
[2022-09-05T09:25:27+0200] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2022-09-05T09:25:27+0200] [ALPM-SCRIPTLET] ==> Starting build: 5.19.6-arch1-1
[2022-09-05T09:25:27+0200] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2022-09-05T09:25:28+0200] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2022-09-05T09:25:29+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2022-09-05T09:25:29+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: xhci_pci
[2022-09-05T09:25:32+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2022-09-05T09:25:32+0200] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2022-09-05T09:25:32+0200] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2022-09-05T09:25:33+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: qed
[2022-09-05T09:25:33+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: qla1280
[2022-09-05T09:25:33+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
[2022-09-05T09:25:34+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: qla2xxx
[2022-09-05T09:25:34+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: wd719x
[2022-09-05T09:25:35+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: bfa
[2022-09-05T09:25:39+0200] [ALPM-SCRIPTLET]   -> Running build hook: [lvm2]
[2022-09-05T09:25:40+0200] [ALPM-SCRIPTLET]   -> Running build hook: [encrypt]
[2022-09-05T09:25:42+0200] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: qat_4xxx
[2022-09-05T09:25:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2022-09-05T09:25:44+0200] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2022-09-05T09:25:46+0200] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2022-09-05T09:25:46+0200] [ALPM-SCRIPTLET] ==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
[2022-09-05T09:25:48+0200] [ALPM-SCRIPTLET] ==> Image generation successful

Offline

#4 2022-09-07 16:39:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,206

Re: Boot error with LVM after update

[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET] find: ‘sort’ terminated by signal 9
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET] modprobe: ERROR: missing parameters. See -h.

reads weird...

pacman -Qkk findutils
type -a find

did you run out of memory during the update or so? This just sounds like your normal image didn't get generated properly, what happens if you rerun

mkinitcpio -p linux

Last edited by V1del (2022-09-07 16:42:54)

Offline

#5 2022-09-08 07:29:20

Isildur
Member
Registered: 2009-05-26
Posts: 100

Re: Boot error with LVM after update

V1del wrote:
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET] find: ‘sort’ terminated by signal 9
[2022-09-05T09:25:20+0200] [ALPM-SCRIPTLET] modprobe: ERROR: missing parameters. See -h.

reads weird...

pacman -Qkk findutils
type -a find

did you run out of memory during the update or so? This just sounds like your normal image didn't get generated properly, what happens if you rerun

mkinitcpio -p linux

I checked, find(utils) exists. Rerunning

mkinitcpio -p linux

succeeded and it works now. Maybe it was the memory (although with 32GB I rarely run low on it but who knows). Thanks a lot for the help!

Do you have any idea what might cause the first error

Error: device '/dev/mapper/main-root' not found. Skipping fsck.

? It apparently doesn't cause issues but would be nice to clean up.

Offline

#6 2022-09-08 08:07:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,206

Re: Boot error with LVM after update

You potentially have a stale/invalid lvm device still registered look at the pvs command and check your fstab/crypttab for a main-root entry that's not used anymore.

Offline

Board footer

Powered by FluxBB