[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Trouble/bug with initramfs-tools adding encrypted swap partition



On 2024-04-23, Richard wrote:

> luks-775ea946-6797-4c4d-a042-72924309f3d2
> UUID=775ea946-6797-4c4d-a042-72924309f3d2     /crypto_keyfile.bin
> luks,keyscript=/bin/cat
> luks-78362aa3-760c-41de-b911-6531b684e3f7
> UUID=78362aa3-760c-41de-b911-6531b684e3f7     /crypto_keyfile.bin
> luks,keyscript=/bin/cat

initramfs extract line from /etc/crypttab to create its own crypttab
as you have seen in main/cryptroot/crypttab, and only for rootfs, not for
swap

> Now, is this a bug in the package or am I missing something? And how do I
> create a working initramfs now?

swap is usually mounted after rootfs is mounted, thus using
/etc/crypttab. If you want to resume from swap you have to follow
paragraph 2.2.1 on
https://wiki.archlinux.org/title/Dm-crypt/Swap_encryption

If you don't need to resume you can follow the much easier chapter 1 on
the same url, using /dev/urandom as a keyfile.


Reply to: