Wind-River / meta-secure-core

MIT License
20 stars 23 forks source link

Map crypt_LUKS partitions during booting initramfs for mounting encrypted rootfs #75

Closed Dvergatal closed 3 weeks ago

Dvergatal commented 3 weeks ago

I have an issue that generally initramfs is not detecting/mapping crypto_LUKS rootfs partition. I'm setting parameters to my grub like below:

root=LABEL=${label} rd.luks.uuid=${partuuid}

where label is the label name of ext4 partition located on encrypted luks partition and partuuid is a partuuid of crypto_LUKS partition, even though there is no systemd-cryptsetup-generator binary in my initramfs so I have added systemd to my PACKAGE_INSTALL of my initramfs image recipe but still I'm getting error that /dev/disk/by-label/${label} doesn't exist or does not contain a /dev and it should first try to decrypt the encrypted partition which is not...

Do you have some solution to this? I know that initramfs generated by dracut or mkinitcpio has already features like that but yocto initramfs images are not being built with those.

Dvergatal commented 3 weeks ago

OK i've been missing initrdscripts-secure-core in my initramfs image. Now it locates the partition :)