You are not logged in.
Just switched to Arch, love it so far.
However, having issue with LUKS/LVM here. This is my first time manually configuring a bootloader so I am having some issues, am prompted to enter my password at boot then dropped into console. Using GPT syslinux.
Have all the hooks configured correctly, regenerated mkinitcpio, trying to think what else I'm missing...
error on boot:
Enter passphrase for /dev/sda3:
fsck: fsck.LVM2_member: not found
fsck: error 2 while executing fsck.LVM2_member for /dev/mapper/CRYPT-root
ERROR: fsck failed on '/dev/mapper/CRYPT-root'
mount: unknown filesystem type 'LVM2_member'
mkinitcpio config:
HOOKS="base udev autodetect modconf block keymap encrypt lvm2 filesystems keyboard shutdown fsck"
syslinux.cfg
LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux root=/dev/mapper/CRYPT-root cryptdevice=/dev/sda3:lvm ro quiet
APPEND cryptdevice=/dev/sda3:CRYPT-root root=/dev/mapper/CRYPT-root rootflags=subvol=_active rw
INITRD ../initramfs-linux.img
LABEL archfallback
MENU LABEL Arch Linux Fallback
LINUX ../vmlinuz-linux
APPEND cryptdevice=/dev/sda3:root root=/dev/mapper/CRYPT-root
INITRD ../initramfs-linux-fallback.img
As much as I love a challenge, why I switched to Arch, having to chroot into my drive on a live disc every time to change one or two lines is really getting to me now. Thanks for help. Let me know if there is any more information that I am omitting.
Offline
I'm not over familiar with syslinux, so I might be on the wrong track, but it looks like there is something wrong here:
syslinux.cfg
LABEL arch MENU LABEL Arch Linux LINUX ../vmlinuz-linux root=/dev/mapper/CRYPT-root cryptdevice=/dev/sda3:lvm ro quiet APPEND cryptdevice=/dev/sda3:CRYPT-root root=/dev/mapper/CRYPT-root rootflags=subvol=_active rw INITRD ../initramfs-linux.img LABEL archfallback MENU LABEL Arch Linux Fallback LINUX ../vmlinuz-linux APPEND cryptdevice=/dev/sda3:root root=/dev/mapper/CRYPT-root INITRD ../initramfs-linux-fallback.img
Have a look at my equivalent settings in /boot/refind_linux.conf:
"Boot with defaults" "root=/dev/mapper/vg-lvroot cryptdevice=/dev/sda3:vg rootfstype=ext4 ro resume=/dev/mapper/vg-lvswap systemd.unit=graphical.target ipv6.disable_ipv6=1 add_efi_memmap"
The relevant part is "root=" and "cryptdevice="
In my system, vg is the name I gave to the LVM volume group in the sda3 LUKS physical volume. Inside vg there are three logical volumes: lvroot, lvhome and lvswap.
So you can see that if your "root=" has the form "/dev/mapper/${VOLUME_GROUP_NAME}-${ROOT_LOGICAL_VOLUME_NAME}" and your "cryptdevice=" has the form "/dev/${PHYSICAL_DEVICE}:${VOLUME_GROUP_NAME}" then what can we infer about your system?
It appears from
LINUX ../vmlinuz-linux root=/dev/mapper/CRYPT-root cryptdevice=/dev/sda3:lvm ro quiet
that your "root=" seems to be saying that your VOLUME_GROUP_NAME is "CRYPT" and your ROOT_LOGICAL_VOLUME_NAME is "root"; but then "cryptdevice=" says that the VOLUME_GROUP_NAME is actually "lvm".
Furthermore, you have "root=" and "cryptdevice=" both being specified in both of the syslinux LINUX and APPEND fields. I think it should just be one or the other. Not only this, but your APPEND statement is inconsistent with your already inconsistent LINUX statement.
So I think if you want more help, first of all try enforcing some consistency, and don't set "cryptdevice=" or "root=" more than once, and if those things don't work, then when you return you should feel encouraged to post output from things like
# vgdisplay
# lvdisplay
# dmsetup deps -o devname /dev/mapper/*
Last edited by /dev/zero (2013-12-23 00:43:09)
Offline
Thanks so much for your reply and explanation, /dev/zero,
I'll try to clean up and post relevent outputs.
Offline
Ok, did some digging here.
vgdisplay
--- Volume group ---
VG Name CRYPT
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 595.92 GiB
PE Size 4.00 MiB
Total PE 152556
Alloc PE / Size 117760 / 460.00 GiB
Free PE / Size 34796 / 135.92 GiB
VG UUID eI7Cq1-ThDy-Y9xp-HrUy-1Eej-3J0A-qNPRaD
lvdisplay
--- Logical volume ---
LV Path /dev/CRYPT/root
LV Name root
VG Name CRYPT
LV UUID SGfZQR-tWke-FNYi-fTgr-m91n-Dv9w-CZC1hJ
LV Write Access read/write
LV Creation host, time archiso, 2013-12-21 01:54:46 -0500
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
--- Logical volume ---
LV Path /dev/CRYPT/home
LV Name home
VG Name CRYPT
LV UUID GFgXGE-Yv9I-WkTf-tgqc-j13L-ZLxw-mVb4jt
LV Write Access read/write
LV Creation host, time archiso, 2013-12-21 01:56:13 -0500
LV Status available
# open 0
LV Size 200.00 GiB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:3
--- Logical volume ---
LV Path /dev/CRYPT/media
LV Name media
VG Name CRYPT
LV UUID vM3Oc8-Qxka-sjt4-Xlf6-t76r-9opi-0Ap8eJ
LV Write Access read/write
LV Creation host, time archiso, 2013-12-21 01:56:33 -0500
LV Status available
# open 0
LV Size 200.00 GiB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4
--- Logical volume ---
LV Path /dev/CRYPT/swap
LV Name swap
VG Name CRYPT
LV UUID izfCEp-1UBy-K3V4-k0tf-vGej-JFHi-8IJFxE
LV Write Access read/write
LV Creation host, time archiso, 2013-12-21 01:56:43 -0500
LV Status available
# open 0
LV Size 10.00 GiB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:5
dmsetup
/dev/mapper/CRYPT-home: 1 dependencies : (lvm)
/dev/mapper/CRYPT-media: 1 dependencies : (lvm)
/dev/mapper/CRYPT-root: 1 dependencies : (lvm)
/dev/mapper/CRYPT-swap: 1 dependencies : (lvm)
/dev/mapper/arch_root-image: 2 dependencies : (loop2) (loop1)
This is my current syslinux.cfg
LINUX ../vmlinuz-linux root=/dev/mapper/CRYPT-root cryptdevice=/dev/sda3:CRYPT
APPEND root=/dev/mapper/CRYPT cryptdevice=/dev/sda3:CRYPT-root rw
The APPEND line is right from syslinux documentation
https://wiki.archlinux.org/index.php/sy … figuration
APPEND root=/dev/mapper/group-name cryptdevice=/dev/sdax:name rw
LINUX line is directly from syslinux as well
https://wiki.archlinux.org/index.php/LU … r_LUKS-LVM
root=/dev/mapper/<volume-group>-<logical-volume> cryptdevice=/dev/<luks-part>:<volume-group>
Now when booting, I get:
Waiting 10 seconds for device /dev/mapper/CRYPT...
ERROR: device '/dev/mapper/CRYPT' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/CRYPT'.
You are being dropped to a recovery shell
Maybe remove fsck from the hooks? I don't know, I am stumped here. I hope somebody can address this issue.
Offline
This is my current syslinux.cfg
LINUX ../vmlinuz-linux root=/dev/mapper/CRYPT-root cryptdevice=/dev/sda3:CRYPT APPEND root=/dev/mapper/CRYPT cryptdevice=/dev/sda3:CRYPT-root rw
It should be:
LINUX ../vmlinuz-linux
APPEND root=/dev/mapper/CRYPT-root cryptdevice=/dev/sda3:CRYPT rw
INITRD ../blahblahblah
You also need the requisite modules in your initrd which, gathering from your first post you haven't included. Add those and regenerate your initrd.
Offline
/dev/mapper/CRYPT-home: 1 dependencies : (lvm) /dev/mapper/CRYPT-media: 1 dependencies : (lvm) /dev/mapper/CRYPT-root: 1 dependencies : (lvm) /dev/mapper/CRYPT-swap: 1 dependencies : (lvm) /dev/mapper/arch_root-image: 2 dependencies : (loop2) (loop1)
Maybe I'm misunderstanding things myself, but this strikes me as a bit weird. On my machine,
# dmsetup deps -o devname /dev/mapper/vg*
/dev/mapper/vg: 1 dependencies : (sda3)
/dev/mapper/vg-lvhome: 1 dependencies : (vg)
/dev/mapper/vg-lvroot: 1 dependencies : (vg)
/dev/mapper/vg-lvswap: 1 dependencies : (vg)
Maybe you did something weird when setting up LUKS and LVM? What instructions did you follow?
The APPEND line is right from syslinux documentation
https://wiki.archlinux.org/index.php/sy … figurationLINUX line is directly from syslinux as well
https://wiki.archlinux.org/index.php/LU … r_LUKS-LVM
Neither of those links say to add kernel options to the LINUX line. I believe all options should only be specified in APPEND. See, for example, the gentoo documentation.
Maybe remove fsck from the hooks? I don't know, I am stumped here. I hope somebody can address this issue.
My hooks are:
HOOKS="base udev autodetect modconf block encrypt lvm2 resume filesystems keyboard fsck"
I can almost guarantee that it is either something to do with the way you set up LUKS/LVM in the first place, or your syslinux config, or a combination of the two.
Offline