Question about mkinitcpio

Hello guys, I’m following a recipe to use an encryption file so that I don’t have to type my crypt password twice, everytime I boot my system.
key file is created with:

dd bs=512 count=4 if=/dev/urandom of=/crypto_keyfile.bin
chmod 000 /crypto_keyfile.bin

Only issue is that the recipe is for Debian, and it tells me to edit initrd.conf adding:

and /etc/cryptsetup-initramfs/conf-hook with these parameters:

then tells me to:
update-initramfs -u -k all

Sorry I’m really new, but I want to learn, if someone can point me to a good read or video that explains what I need, or if you can post step by step what I need to do I would be very grateful.

Thanks for reading and take care everyone.


Calamares and manjaro-architect set this up automatically. No need to setup manually. Just tick the encryption box in the installer and it does exactly what you are describing for debian here.

1 Like

Yeah but my system was already installed, it was unencrypted then.

The procedure was to copy the root partition to a new encrypted partition with Luks, chroot into it, make the ajustments and start the system, it worked out fine(had to use arch wiki for some parts).

Problem I didn’t really understand much what happened, maybe I wouldn’t be able to do it again, so I’m asking for help to understand.

Maybe I will give this manjaro-architect a try, what I really wanted to do was to have two more root partitions for Debian and Xubuntu also encrypted, but it might be too complicated for me so I’m thinking of just getting into kvm and start to play with it.

Thanks a lot for the reply.

Thank you for the reply, I had to use a bit this page to be able to do what I did, the part about adding hooks to the mkinitcpio specifically.