Lỗi boot filesystem cannot be of type lvmlv năm 2024

Help me. I did not turn on the proxmox server. I have only been able to access by chroot from the systemrecuecd. * Error Grub: error disk 'lvmid/XyYOqp-wfj3-zsZC-s1d4-...' . Entering rescue mode... * Error install grub: grub-probe device /dev/pve/root grub-probe: error: no s'ha trobat el disc «lvmid/XyYOqp-wfj3-zsZC-s1d4-jLw6-2XfG-kk1hmE/lbOS2h-dvdX-U18v-zubX-v5Cn-vjUQ-gzTvgi». grub-install /dev/sda S'està instal·lant per la plataforma x86_64-efi. File descriptor 4 (/dev/sda2) leaked on vgs invocation. Parent PID 5764: grub-install.real File descriptor 4 (/dev/sda2) leaked on vgs invocation. Parent PID 5764: grub-install.real grub-install.real: error: no s'ha trobat el disc «lvmid/XyYOqp-wfj3-zsZC-s1d4-jLw6-2XfG-kk1hmE/lbOS2h-dvdX-U18v-zubX-v5Cn-vjUQ-gzTvgi». * lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert data pve twi-aotz <758,25g 19,05 1,16 root pve -wi-ao-- 96,00g snap_vm-300-disk-0_moodle388 pve Vri-tz-k 10,00g data vm-300-disk-0 snap_vm-605-disk-0_snap20211010 pve Vri-tz-k 4,00g data vm-605-disk-0 snap_vm-605-disk-0_snap20211017 pve Vri-tz-k 4,00g data vm-605-disk-0 snap_vm-605-disk-0_snap20211024 pve Vri-tz-k 4,00g data vm-605-disk-0 snap_vm-605-disk-1_snap20211010 pve Vri-tz-k 2,00g data vm-605-disk-1 snap_vm-605-disk-1_snap20211017 pve Vri-tz-k 2,00g data vm-605-disk-1 snap_vm-605-disk-1_snap20211024 pve Vri-tz-k 2,00g data vm-605-disk-1 swap pve -wi-a- 8,00g vm-102-disk-0 pve Vwi-a-tz-- 20,00g data 20,49 vm-109-disk-0 pve Vwi-a-tz-- 30,00g data 25,53 vm-111-disk-0 pve Vwi-a-tz-- 20,00g data 22,21 vm-114-disk-0 pve Vwi-a-tz-- 50,00g data 17,91 vm-121-disk-0 pve Vwi-a-tz-- 20,00g data 73,71 vm-152-disk-0 pve Vwi-a-tz-- 20,00g data 95,54 vm-188-disk-0 pve Vwi-a-tz-- 10,00g data 10,87 vm-200-disk-0 pve Vwi-a-tz-- 20,00g data 13,56 vm-204-disk-0 pve Vwi-a-tz-- 50,00g data 5,73 vm-205-disk-0 pve Vwi-a-tz-- 8,00g data 91,16 vm-300-disk-0 pve Vwi-a-tz-- 10,00g data 40,58 vm-400-disk-0 pve Vwi-a-tz-- 8,00g data 24,00 vm-605-disk-0 pve Vwi-a-tz-- 4,00g data 98,36 vm-605-disk-1 pve Vwi-a-tz-- 2,00g data 98,16 vm-605-state-snap20211010 pve Vwi-a-tz-- <4,49g data 45,26 vm-605-state-snap20211017 pve Vwi-a-tz-- <4,49g data 45,31 vm-605-state-snap20211024 pve Vwi-a-tz-- <4,49g data 45,44 vm-906-disk-0 pve Vwi-a-tz-- 1,00g data 55,12 vm-9106-disk-0 pve Vwi-a-tz-- 10,00g data 31,93 vm-912-disk-0 pve Vwi-a-tz-- 30,00g data 98,00 vm-956-disk-0 pve Vwi-a-tz-- 1,91g data 27,34 vm-964-disk-0 pve Vwi-a-tz-- 19,07g data 69,15 * uname -a Linux sysrescue 5.10.70-1-lts

1 SMP Thu, 30 Sep 2021 09:43:10 +0000 x86_64 GNU/Linux

* pveversion pve-manager/7.0-13/7aa7e488 (running kernel: 5.10.70-1-lts)

1

zubalea MemberRegistered: 2015-05-08 Posts: 5

[Solved] New Install: Unable to boot from LVM partition

What I am trying to do:

Boot Arch Linux where the boot and root partition are within an LVM.

Platform:

I have tried this on 3 different platforms. 2 Laptop and 1 VM. No dual boot scenario and no UEFI.

What happens:

I get the following error: ERROR: device 'UUID=' not found. Skipping fsck. ERROR: Unable to find root device 'UUID='. You are being dropped to a recovery shell Type 'exit' to try and continue booting sh: can't access tty: job control turned off

Note: I have been trying to get this working for weeks now. I am reading the Wikis, searching Google and consulted my friends with the same love of learning Linux.

Here is the list of commands that I used to replicate this issue: I suspect I am missing a concept. Hence I must have skipped step or have done one incorrectly.

# lsblk
# modprobe -a dm_mod
# fdisk /dev/sda
-- Creating MBR
Command (m for help) o
-- Creating LVM Partition
Command (m for help) n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): default
Partition number (1-128, default 1): default
First sector (34-234441614, default = 2048) or {+-}size{KMGTP}: default
Last sector (2048-234441614, default = 234441614) or {+-}size{KMGTP}: default
Current type is 'Linux'
Command (m for help) t
Hex code for LVM: 8e
Command (m for help) w
-- Setup LVM
# pvdisplay
# pvcreate /dev/sda1
# pvdisplay
# vgcreate vol00 /dev/sda1
# vgdisplay
# lvcreate -L 500MB vol00 -n lvol_boot
# lvcreate -C y -L 4GB vol00 -n lvol_swap
# lvcreate -l +100%FREE vol00 -n lvol_root
# vgscan
# vgchange -ay
-- Format the LVM logical volumes
# mkfs.ext4 /dev/mapper/vol00-lvol_root
# mkfs.ext4 /dev/mapper/vol00-lvol_boot
# mkswap /dev/mapper/vol00-lvol_swap
-- Mount File Systems
# mount /dev/mapper/vol00-lvol_root /mnt
# mkdir /mnt/boot
# mount /dev/mapper/vol00-lvol_boot /mnt/boot
# swapon /dev/mapper/vol00-lvol_swap
-- Refresh packages
# pacman -Syy
-- Install base system
# pacstrap -i /mnt base base-devel
-- Generate and verity fstab
# genfstab -U -p /mnt >> /mnt/etc/fstab
# vi /mnt/etc/fstab
# arch-chroot /mnt /bin/bash
# vi /etc/locale.gen
-- Uncomment en_US.UTF-8 UTF-8
# locale-gen
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF-8
-- Time zone (City replace with my timezone city)
# ln -s /usr/share/zoneinfo/America/City /etc/localtime
-- Hardware clock
# hwclock --systohc --utc
-- Hostname
# echo myhostname > /etc/hostname
# vi /etc/hosts
-- Change the following with your chosen hostname
#  
127.0.0.1 localhost.localdomain localhost myhostname
::1 localhost.localdomain localhost
-- Configure the network
Find the name of the network adapter
# ip link
-- Above ip link gave interface name is enp9s0
# systemctl enable [email protected]
# vi /etc/mkinitcpio.conf
-- add lvm2 between block and filesystems
HOOKS="base udev autodetect modconf block lvm2 filesystems keyboard fsck"
# vi /etc/lvm/lvm.conf
-- change use_lvmetad = 1 to use_lvmetad = 0
# cd /boot
# mkinitcpio -p linux
-- Create users and set passwords
-- if root password has not been set do so now.
# passwd
-- Install GRUB2 and a few other packages
-- Install packages
# pacman -S fuse grub lvm2 os-prober
-- Install the bootloader
# grub-install --target=i386-pc --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
# exit
# reboot

Last edited by zubalea (2015-06-14 23:45:58)

2

kkat MemberRegistered: 2015-06-11 Posts: 1

Re: [Solved] New Install: Unable to boot from LVM partition

Did you check your /etc/default/grub. Maybe you need to add a line indicating the root there.

From https://wiki.archlinux.org/index.php/LVM

"If the root file system resides in a logical volume, the root= kernel parameter must be pointed to the mapped device, e.g /dev/mapper/vg-name-lv-name."

Last edited by kkat (2015-06-11 16:58:51)

3

zubalea MemberRegistered: 2015-05-08 Posts: 5

Re: [Solved] New Install: Unable to boot from LVM partition

I had tried that before and tried it again. No luck.

I decided to simply things a lot. Just trying to boot directly from Grub interface and not dealing with any missing configs.

At the boot screen I press c to go in Grub command line interface

grub>   ls
(hd0) (hd0,msdos1) (lvm/vol00-lvol_root)
grub>  ls (lvm/vol00-lvol_root)/
-- Result:  I see all the folders such as /usr /boot /root  etc
-- So I know I am talking to the partition
grub> linux /boot/vmlinuz-linux root=/dev/mapper/vol00-lvol_root
-- I am not 100% confident in the root part of this command.   Documentation seems to indicate that is how to set it up.
grub> initrd /boot/initrd-linux.img
grub> boot

Results from boot console:

early console in decrompress_kernel
Decompressing Linux... Parsing ELF... Done.
Booting the kernel.
:: running early hook [udev]
starting version 219
:: running early hook [lvm2]
:: running hook [udev]
:: Triggering uevents....
Waiting 10 seconds for device /dev/mapper/vol00-lvol_root ...
ERROR: device '/dev/mapper/vol00-lvol_root' not found.  Skipping fsck.
ERROR: unable to find root devce '/dev/mapper/vol00-lvol_root'.
You are being dropped to a recovery shell

4

TheSgtBilko MemberRegistered: 2013-08-13 Posts: 87

Re: [Solved] New Install: Unable to boot from LVM partition

Not sure if it is needed anymore - but I usually add dm_mod to MODULES in mkinitcpio.conf and recreate initrams.

5

zubalea MemberRegistered: 2015-05-08 Posts: 5

Re: [Solved] New Install: Unable to boot from LVM partition

Thank you @TheSgtBilko and @kkat. I tried you suggestions. Still not working.

Last edited by zubalea (2015-06-12 19:37:03)

6

Strike0 Member

Lỗi boot filesystem cannot be of type lvmlv năm 2024
From: Germany Registered: 2011-09-05 Posts: 1,429

Re: [Solved] New Install: Unable to boot from LVM partition

Grub should have picked an UUID for the root= when you let it generate the grub.cfg. Did it not or did you change that?

From within recovery you should be able to boot following:

# vgscan
# vgchange -ay
# exit

If that works, let grub re-generate its config (grub-mkconfig -o /boot/grub/grub.cfg).

7

zubalea MemberRegistered: 2015-05-08 Posts: 5

Re: [Solved] New Install: Unable to boot from LVM partition

For me the idea of the booting schema described in the first post is purely educational. They are so many other ways to implement a successful boot with Arch but I wanted to get this one working strictly using LVM

I finally found the issue.

Everything works when I don't update /etc/lvm/lvm.conf and leave "use lvmetab" parameter as the default "use_lvmetab = 1"

I will mark this thread as solved when I or someone else can explain why this parameter made a difference. Because when "use_lvmetab" is set to 1 there is a bunch of warnings during the grub building process. Putting "lvmetab = 0" removes those errors.

I suspect "lvmetab=1" loads something that my script requires to boot properly. I suspect there is another way to load what is required, but I don't have that knowledge yet.

Hoping someone with a more knowledgeable soul can enlighten me on this one.

Thank you

8

zubalea MemberRegistered: 2015-05-08 Posts: 5

Re: [Solved] New Install: Unable to boot from LVM partition

After more testing I have found the exact steps that caused my issue:

Before code change: where I get "Unable to find root device" on boot.

# vi /etc/mkinitcpio.conf
-- add lvm2 between block and filesystems
HOOKS="base udev autodetect modconf block lvm2 filesystems keyboard fsck"
# vi /etc/lvm/lvm.conf
-- change use_lvmetad = 1 to use_lvmetad = 0
# cd /boot
# mkinitcpio -p linux

After code change: where it boots with no issues.

# vi /etc/mkinitcpio.conf
-- add lvm2 between block and filesystems
HOOKS="base udev autodetect modconf block lvm2 filesystems keyboard fsck"
# cd /boot
# mkinitcpio -p linux
# vi /etc/lvm/lvm.conf
-- change use_lvmetad = 1 to use_lvmetad = 0

Notice in the after code change I built the initial ramdisk environment before I disabled use_lvmetad.

I suspect the initial ramdisk environment requires lvmetab enabled to see the LVM drives on boot up. Disabling lvmetad in the lvm.conf after the inital ramdisk environment removes the errors when building the grub.cfg.

I will make this thread as solved now. However, if someone with more in-depth knowledge read this, please feel free to add your expert opinions.