LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Arch linux: No /dev/mapper/lvm-root ERROR (https://www.linuxquestions.org/questions/linux-newbie-8/arch-linux-no-dev-mapper-lvm-root-error-4175460932/)

linux555 05-06-2013 04:35 PM

Arch linux: No /dev/mapper/lvm-root ERROR
 
1 Attachment(s)
Greetings folks,

I've installed the new arch distro in a VM to try out before installing on my main PC and I followed the steps in the arch wiki to the letter.

I incorporated LVM and LUKS into the installation as I done this in the past with great success. However some things have change since I last used arch a few years ago.

Long story short, after the installation and everything seem fine, I rebooted the VM and I got this message:

ERROR: device '/dev/mapper/lvm-root' not found. Skipping fsck
ERROR: Unable to find root device '/dev/mapper/lvm-root'

I am using grub-bios which is grub2. And in case you're wondering I added encrypt and lvm2 in the mkinitcpio.conf file before filesystems of the HOOKS arrray.

I'm guessing grub2 didn't use cryptdevice. If this is the culprit how do I add cryptdevice in a grub2 configuration and is there any additional steps?

I gladly accept any help. Thx

linux555 05-06-2013 05:34 PM

I Solved it whoo hooo!

lleb 05-06-2013 05:35 PM

please post what you did to solve the issue and mark thread as [SOLVED] please and thank you.

linux555 05-06-2013 06:17 PM

First, I selected the Arch VM from virtualbox on the right

I clicked on storage. From the CD/DVD controller I choose to boot from a arch iso file.

Once the arch iso booted, I opened the encrypted device

Code:

cryptsetup luksOpen /dev/sda2 root
I enter my passphrase.

Next I mounted the lvm-root volume on /mnt and /dev/sda1 on /mnt/boot
Code:

mount /dev/mapper/lvm-root /mnt
mount /dev/sda1 /mnt/boot

I follewd this step from the arch wiki GRUB root encryption

Note: Do not do the regenerate the configuration yet. This comes later.

After editing the /mnt/etc/default/grub file I ran these commands

Code:

cd
arch-chroot /mnt
grub-mkconfig -o /boot/grub/grub.cfg
exit
shutdown -h now

I release the arch iso image so it won't boot and I boot up Arch normally.

When I booted into arch I was prompted for the passphrase of the crypted device. After I entered my passphrase it booted the system. I got the login prompt and logged into my system.

Cool!

linux555 05-06-2013 09:23 PM

just testing my useragent from firefox in arch

linux555 05-06-2013 09:27 PM

2nd try

Cool!!!

lleb 05-07-2013 07:49 AM

gratz, and thank you.

linux555 05-07-2013 11:03 AM

You're welcome lleb.

I came back to arch after a 3 year absent as I was using other distros. Arch now uses systemd so I thave to relearned some new stuff. I admit it is snappier than before.


All times are GMT -5. The time now is 09:19 AM.