Unable to boot to LUKS encrypted partition

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Unable to boot to LUKS encrypted partition

Postby motoko » Fri Feb 02, 2018 7:09 pm

Hi all,

I am trying to boot to a LUKS partition but I am unable to do so. I have three partitions: boot, unencrypted partition and a LUKS partition and every time I boot, unencrypted partition gets loaded and I never get prompted for the LUKS password to mount p3.

I've basically followed this guide: https://gist.github.com/pezz/5310082
Code: Select all
$ uname -a
Linux raspi 4.9.79-1-ARCH #1 SMP Thu Feb 1 01:26:20 UTC 2018 armv7l GNU/Linux
 


Below, p3 is the LUKS one:
Code: Select all
$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0     179:0    0 14.9G  0 disk
├─mmcblk0p1 179:1    0  100M  0 part /boot
├─mmcblk0p2 179:2    0  2.8G  0 part /
└─mmcblk0p3 179:3    0   12G  0 part


Here is my /boot/cmdline.txt:
Code: Select all
$ cat  /boot/cmdline.txt
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
cryptdevice=/dev/mmcblk0p3:root:allow-discards root=/dev/mapper/root initrd=0x00f00000


Here's my /boot/config.txt (is anything here the culprit? as you can see, I've tried few options...)
Code: Select all
$ cat /boot/config.txt
gpu_mem=64
#initramfs initramfs-linux.img initrd followkernel
dtparam=watchdog=on
#initramfs initrd 0x00f00000
initramfs initrd followkernel
 


Here's /etc/fstab ... maybe this /dev/mapper/root part is wrong?!
Code: Select all
$ cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1  /boot   vfat    defaults        0       0
/dev/mapper/root    /           ext4    defaults,discard,noatime,commit=120 0      1
 


and this is /etc/mkinitcpio.conf
Code: Select all
 $  cat /etc/mkinitcpio.conf
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block keymap encrypt filesystems keyboard fsck)
motoko
 
Posts: 5
Joined: Tue Jan 30, 2018 7:12 am

Re: Unable to boot to LUKS encrypted partition

Postby motoko » Fri Feb 02, 2018 8:04 pm

OK, I think I got it fixed with the help of mk-fg from the IRC channel. The issue was this line:

Code: Select all
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
 


It should be commented out.

And the trick that did it was not rebooting but actually plugging the cable out (cutting the power completely).
motoko
 
Posts: 5
Joined: Tue Jan 30, 2018 7:12 am


Return to Raspberry Pi

Who is online

Users browsing this forum: Google [Bot] and 1 guest