Subject: Installation with LVM on LUKS, syslinux and GPT

From: José Alberto Orejuela García<[email-masked]>
Date: Mon, 26 Aug 2019 19:48:55 +0200

Hi,

I've been trying to install Alpine for a few days and I don't find the
way. I've followed a mix of the pages [1] and [2] as I want LVM on
LUKS in a GPT disk, but I get an error when booting.

[1]: https://wiki.alpinelinux.org/wiki/LVM_on_LUKS
[2]: https://wiki.alpinelinux.org/wiki/Installing_on_GPT_LVM

I get the following error after syslinux ends the countdown:

mount: mounting UUID=d8d442ca-f568-4834-8770-54a5067f5344 on /sysroot
failed: No such file or directory

I thought the problem was related to not indicating properly the root
after the decryption, but I've tried several things without
success. My partition scheme is the following:

/dev/nvme0n1
   /dev/nvme0n1p1 --> /boot partition
   /dev/nvme0n1p1 --> LUKS partition
     /dev/mapper/cryptlvm --> LVM volume
       /dev/vglvm/root --> / partition
       /dev/vglvm/swap --> swap partition
       /dev/vglvm/home --> /home partition

And I've tried the following parameters in /etc/update-extlinux.conf

default_kernel_opts="... cryptroot=/dev/nvme0n1p2 cryptdm=cryptlvm"
default_kernel_opts="... root=/dev/mapper/vglvm-root 
cryptdevice=/dev/nvme0n1p2:cryptlvm"
default_kernel_opts="... root=/dev/mapper/cryptlvm 
cryptdevice=/dev/nvme0n1p2:cryptlvm"

None of them successfully, getting a similar error to the one previously 
mentioned.

I'm out of ideas. Can anyone help me, please?

Thank you,

José Alberto

---

From: Paul Zillmann <[email-masked]>
Date: Mon, 26 Aug 2019 23:19:06 +0200

Hello José,

have you added the nessesary modules (crytpsetup, lvm2) to the initramfs 
configuration and recreated the initramfs?

- Paul

Am 26.08.19 um 19:48 schrieb José Alberto Orejuela García:
> None of them successfully, getting a similar error to the one 
> previously mentioned.
>

---

From: José Alberto Orejuela García <[email-masked]>
Date: Tue, 27 Aug 2019 17:31:53 +0200

>configuration and recreated the initramfs?

I edited /etc/mkinitfs/mkinitfs.conf during installation, adding
cryptsetup to it,

features="ata base ide scsi usb virtio ext4 lvm cryptsetup"

And then I did

# mkinitfs -c /mnt/etc/mkinitfs/mkinitfs.conf -b /mnt/ $(ls /mnt/lib/modules/)

as the wiki said. Is that what you mean or should I do something more?

José Alberto

---

From: Cosmo Borsky <[email-masked]>
Date: Tue, 27 Aug 2019 22:37:20 +0000

Try adding `nvme` to your mkinitfs modules.

---

From: José Alberto Orejuela García<[email-masked]>
Date: Thu, 29 Aug 2019 20:06:54 +0200

Hi,

> Try adding `nvme` to your mkinitfs modules.

It worked, thanks!

> Should I also change lvm to lvm2?

No, just in case anyone wondering.

Oh, and the correct parameters in /etc/update-extlinux.conf are

as the wiki says.

---

From: José Alberto Orejuela García <[email-masked]>
Date: Wed, 28 Aug 2019 12:48:22 +0200