vianney / arch-luks-suspend

Lock encrypted root volume on suspend in Arch Linux
https://aur.archlinux.org/packages/arch-luks-suspend-git/
51 stars 30 forks source link

arch-luks-suspend assumes that the root device is /dev/mapper/{crypt-name} #8

Open afn opened 7 years ago

afn commented 7 years ago

I use LVM on my system, so my crypt device is /dev/mapper/vgcrypt and the root filesystem is actually mounted on /dev/mapper/vgcrypt-root. Here's my /proc/cmdline:

initrd=\initramfs-linux.img cryptdevice=/dev/sda4:vgcrypt:allow-discards acpi_backlight=vendor nouveau.nofbaccel=1 root=/dev/mapper/vgcrypt-root rw

The arch-luks-suspend script temporarily remounts ext4 filesystems with barrier=0, but it looks for a mounted filesystem in /dev/mapper/${CRYPTNAME}, which isn't necessarily the root filesystem's device. Instead, I think it should use the value of root in /proc/cmdline. I'll submit a PR shortly.