mirror of
https://github.com/classy-giraffe/easy-arch.git
synced 2025-11-17 19:40:55 +00:00
Update easy-arch.sh
This commit is contained in:
parent
b1b8648c9a
commit
e6ea09fa53
1 changed files with 3 additions and 5 deletions
|
|
@ -138,16 +138,14 @@ cat > /mnt/etc/hosts <<EOF
|
||||||
127.0.1.1 $hostname.localdomain $hostname
|
127.0.1.1 $hostname.localdomain $hostname
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Configuring /etc/mkinitcpio.conf
|
# Configuring /etc/mkinitcpio.conf.
|
||||||
echo "Configuring /etc/mkinitcpio.conf for LUKS hook."
|
echo "Configuring /etc/mkinitcpio.conf for LUKS hook."
|
||||||
sed -i -e 's,modconf block filesystems keyboard,keyboard keymap modconf block encrypt filesystems,g' /mnt/etc/mkinitcpio.conf
|
sed -i -e 's,modconf block filesystems keyboard,keyboard keymap modconf block encrypt filesystems,g' /mnt/etc/mkinitcpio.conf
|
||||||
|
|
||||||
# Enabling LUKS in GRUB, setting up the UUID of the LUKS container and enabling boot on BTRFS.
|
# Setting up LUKS Keyfile, BTRFS Booting and encryption in grub/initramfs.
|
||||||
UUID=$(blkid $Cryptroot | cut -f2 -d'"')
|
UUID=$(blkid $Cryptroot | cut -f2 -d'"')
|
||||||
sed -i -e "s/#\(GRUB_ENABLE_CRYPTODISK=y\)/\1/" /mnt/etc/default/grub
|
sed -i -e "s/#\(GRUB_ENABLE_CRYPTODISK=y\)/\1/" /mnt/etc/default/grub
|
||||||
echo -e "# Booting with BTRFS subvolume\nGRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION=true" >> /mnt/etc/default/grub
|
echo -e "\n# Booting with BTRFS subvolume\nGRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION=true" >> /mnt/etc/default/grub
|
||||||
|
|
||||||
# Adding keyfile to the initramfs to avoid double password.
|
|
||||||
dd bs=512 count=4 if=/dev/random of=/mnt/root/cryptroot.keyfile iflag=fullblock &>/dev/null
|
dd bs=512 count=4 if=/dev/random of=/mnt/root/cryptroot.keyfile iflag=fullblock &>/dev/null
|
||||||
chmod 000 /mnt/root/cryptroot.keyfile &>/dev/null
|
chmod 000 /mnt/root/cryptroot.keyfile &>/dev/null
|
||||||
cryptsetup -v luksAddKey /dev/disk/by-partlabel/Cryptroot /mnt/root/cryptroot.keyfile
|
cryptsetup -v luksAddKey /dev/disk/by-partlabel/Cryptroot /mnt/root/cryptroot.keyfile
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue