[SOLVED]Cannot boot into encrypted system after install

3 posts / 0 new
Last post
#1 Thu, 2016-03-24 05:00
famboozle
  • famboozle's picture
  • Offline
  • Last seen: 2 years 1 week ago
  • Joined: 2015-05-26

Alpine will not boot into my encrypted system after install. When I reboot I get the following message:

mount: mounting: UUID=### on /sysroot failed: No such file or directory
Mounting root failed.

I never get to the point where I am prompted for a passphrase.

I have rebuilt the initramfs using mkinitfs with cryptsetup using the configuration file in my installation:

mkinitfs -c /mnt/etc/mkinitfs/mkinitfs.conf -b /mnt

I adjusted syslinux append line for:

APPEND cryptdevice=/dev/sda:cryptdev root=UUID=#### ....

I have even tried the old:

APPEND cryptroot=/dev/sda cryptdm=cryptdev real_root=UUID=### .....

I have also tried not using UUIDs, however, nothing gets me to the passphrase prompt.

I have installed alpine linux onto an encrypted partition following these instructions:

http://wiki.alpinelinux.org/wiki/LVM_on_LUKS

and following the arch linux wiki. I have installed arch linux onto encrypted partitions many, many times without a problem booting. I installed an older version of alpine into an encrypted partition about a year ago and it worked with no hiccups.

There are two possible problems that I see:
1) I had to symlink 4.1.19-grsec with 4.1.20-grsec in /mnt/lib/modules for mkinitfs to work
2) something is wrong with mkinitfs that does not include the decryption stuff in the initramfs

Can anyone offer any suggestions? Thanks

Fri, 2016-03-25 04:49
famboozle
  • famboozle's picture
  • Offline
  • Last seen: 2 years 1 week ago
  • Joined: 2015-05-26

I figured out the problem. The shell script /etc/update-extlinux.conf kept overwriting the manual changes I made to extlinux.conf, resulting in the disk not being found. In addition, the cryptdevice=/dev/sda:cryptdev is specific to arch linux. In alpine you must use, in extlinux.conf:

APPEND cryptroot=/dev/sda cryptdm=cryptdev root=/dev/mapper/cryptdev ...

cryptroot and cryptdm are coded into the init in the initramfs.

Finally, the root parameter appears not to be able to use a UUID. I specifically had to use root=/dev/mapper/cryptdev and not root=UUID=### to get alpine to boot.

Thu, 2018-03-29 09:52
jodumont
  • jodumont's picture
  • Offline
  • Last seen: 17 hours 4 min ago
  • Joined: 2018-02-06

also as pointed here : https://forum.alpinelinux.org/forum/kernel-and-hardware/persistent-device-names
alpine is able to manage uuid if
you install udev : apk add udev
than make the udev service run : rc-update add udev
than populate via : udevadm trigger

Log in or register to post comments