0

I used the lvm on luks encrytion method.

I was booted to this

Starting version 241.7-2-arch
ERROR: device '/dev/mapper/MyVolGroup-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
[rootfs ]# _
  • Looks like you haven't set up any hooks for opening the LUKS partition. The arch wiki has a good guide on setting this up – Torin Mar 21 at 15:18
0
# mount /dev/MyVolGroup/root /mnt
# mkdir /mnt/home
# mount /dev/MyVolGroup/home /mnt/home
# swapon /dev/MyVolGroup/swap

# mkdir /mnt/hostlvm
# mount --bind /run/lvm /mnt/hostlvm
# arch-chroot /mnt
# ln -s /hostlvm /run/lvm

I added: cryptdevice=UUID=device-UUID:cryptlvm root=/dev/MyVolGroup/root

within the Double quotes of GRUB_CMDLINE_LINUX="" and GRUB_CMDLINE_LINUX_DEFAULT="" in

/etc/default/grub

to get:

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=device-UUID:cryptlvm root=/dev/MyVolGroup/root"
GRUB_CMDLINE_LINUX="cryptdevice=UUID=device-UUID:cryptlvm root=/dev/MyVolGroup/root"

The device-UUID is something you need to get with:

ls -l /dev/disk/by-uuid/

you put the UUID where device-UUID showed up before.

Before these I did

arch-chroot /mnt

Don't regenerate the grub config yet. I regenerated the grub config.(this was the wrong time to do it)

I reinstalled linux with pacman -S linux

Make sure the hoods are right in /etc/mkinitcpio.conf go to lvm on luks in the archlinux wiki to see them.

Then I ran

mkinitcpio -p linux

I exited arch-chroot by using the command exit.

exit

I did this

mkdir /mnt/hostlvm
mount --bind /run/lvm /mnt/hostlvm
arch-chroot /mnt
ln -s /hostlvm /run/lvm

then I ran

grub-mkconfig -o /boot/grub/grub.cfg

I exited out of arch-chroot the rebooted with

exit

then

reboot

And it worked after that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.