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
$this->bbcode_second_pass_code('', '$ 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:
$this->bbcode_second_pass_code('', '$ 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:
$this->bbcode_second_pass_code('', '$ 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...)
$this->bbcode_second_pass_code('', '$ 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?!
$this->bbcode_second_pass_code('', '$ 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
$this->bbcode_second_pass_code('', ' $ cat /etc/mkinitcpio.conf
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block keymap encrypt filesystems keyboard fsck)
')
motoko
 
Posts: 7
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:

$this->bbcode_second_pass_code('', '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: 7
Joined: Tue Jan 30, 2018 7:12 am


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 4 guests