cryptsetup luksAddKey /dev/"$root_part" /mnt/crypto_keyfile.bin ||echo"Something vent wrong with adding the LUKS key. Is /dev/$root_part the right partition?"
# Add keyfile to initcpio
grep-q'/crypto_keyfile.bin' /mnt/etc/mkinitcpio.conf ||sed-i'/FILES/ s~)~/crypto_keyfile.bin)~' /mnt/etc/mkinitcpio.conf &&echo"Adding keyfile to the initcpio"
[[-e /mnt/crypto_keyfile.bin ]]||dd bs=512 count=4 if=/dev/urandom of=/mnt/crypto_keyfile.bin &&echo"Generating a keyfile"
chmod 000 /mnt/crypto_keyfile.bin
echo"Adding the keyfile to the LUKS configuration"
cryptsetup luksAddKey /dev/"$root_part" /mnt/crypto_keyfile.bin ||echo"Something vent wrong with adding the LUKS key. Is /dev/$root_part the right partition?"
# Add keyfile to initcpio
grep-q'/crypto_keyfile.bin' /mnt/etc/mkinitcpio.conf ||sed-i'/FILES/ s~)~/crypto_keyfile.bin)~' /mnt/etc/mkinitcpio.conf &&echo"Adding keyfile to the initcpio"