You are not logged in.

#1 2021-11-22 17:51:32

mizzunet
Member
Registered: 2021-11-17
Posts: 4

ERROR: device '/dev/mapper/arch--lvm-arch--root' not found

Cannot boot into Arch after `grub-mkconfig -o /boot/grub/grub.cfg`

ERROR: device '/dev/mapper/arch--lvm-arch--root' not found
mount: /new_root: special device /dev/mapper/arch--lvm-arch--root does not exist.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#

I cannot type anything there, it was frozen

Could you please help me?

I have NOT encrypted it

I booted Arch installation media.

`lsblk`

NAME                     MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                        8:16   0 223.6G  0 disk 
├─sda1                     8:17   0   512M  0 part 
└─sda2                     8:18   0 223.1G  0 part 
  ├─arch--lvm-arch--swap 254:0    0     5G  0 lvm  
  └─arch--lvm-arch--root 254:1    0 218.1G  0 lvm  

Here, `sda1` is the EFI partition


What I tried,

1. Mounted partitions

mkdir arch
mount /dev/arch-lvm/arch-root arch
mount /dev/sda1 arch/boot/efi

2. `arch-chroot`ed `arch` folder and from chroot, and I tried to regenerate `grub` and ramfs`

mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg

These command ran without any errors

Rebooted, but still the error persists

So, I ran `mkinitcpio` and `grub-mkconfig` after removing `/etc/lvm/lvm2` and then reinstalling `lvm2`, `pacman -S lvm2`

But still not fixed.


`/etc/mkinitcpio.conf`

...
HOOKS=(base udev autodetect modconf block lvm2 filesystems keyboard fsck)
...

`/etc/default/grub` file https://nekobin.com/nidowowagi

`/etc/fstab` file

# <file system> <dir> <type> <options> <dump> <pass>
UUID=a2c79af7-4a57-4090-bf2d-1f971f07377d /  ext4    defaults,noatime,commit=60  0 1

Thank you very much (:

Last edited by mizzunet (2021-11-22 17:54:44)

Offline

#2 2021-11-22 20:37:24

roccobaroccoSC
Member
Registered: 2021-10-04
Posts: 16

Re: ERROR: device '/dev/mapper/arch--lvm-arch--root' not found

You formatted your drive with LVM, which splits your drive into 2 partitions: swap and root.
For your info, technically this is not necessary. You *could* have two normal partitions without LVM.

About your problem: To boot into an LVM root with GRUB, you need to configure it to load the LVM module as described in the Wiki: https://wiki.archlinux.org/title/GRUB#LVM

# /etc/default/grub
GRUB_PRELOAD_MODULES="... lvm"

You need to boot from an installation medium first, because your system is not bootable.
Mount your /dev/mapper/arch--lvm-arch--root under /mnt. arch-chroot into /mnt.
Then change your /etc/default/grub, line 8 should be changed to

GRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"

Then regenerate the configuration with grub-mkconfig.

Last edited by roccobaroccoSC (2021-11-22 20:41:33)

Offline

Board footer

Powered by FluxBB