mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-25 02:51:32 -05:00
Update install.sh
This commit is contained in:
parent
4db7f33663
commit
b84ef4eb58
12
install.sh
12
install.sh
@ -150,9 +150,19 @@ sed -i -e "s#root=/dev/mapper/cryptroot#oot=/dev/mapper/cryptroot lsm=lockdown,y
|
||||
echo "" >> /mnt/etc/default/grub
|
||||
echo -e "# 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.key iflag=fullblock &>/dev/null
|
||||
chmod 000 /mnt/root/.root.key &>/dev/null
|
||||
cryptsetup -v luksAddKey /dev/disk/by-partlabel/cryptroot /mnt/.root.key
|
||||
sed -i -e "s,quiet,quiet cryptdevice=UUID=$UUID:cryptroot root=$BTRFS cryptkey=rootfs:/.root.key,g" /mnt/etc/default/grub
|
||||
sed -i 's#FILES=()#FILES=(/.root.key)#g' /mnt/etc/mkinitcpio.conf
|
||||
|
||||
# Configuring the system.
|
||||
arch-chroot /mnt /bin/bash -e <<EOF
|
||||
|
||||
# Setting up timezone.
|
||||
ln -sf /usr/share/zoneinfo/$(curl -s http://ip-api.com/line?fields=timezone) /etc/localtime &>/dev/null
|
||||
|
||||
# Setting up clock.
|
||||
hwclock --systohc
|
||||
|
||||
@ -162,6 +172,7 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
||||
|
||||
# Generating a new initramfs.
|
||||
echo "Creating a new initramfs."
|
||||
chmod 600 /boot/initramfs-linux* &>/dev/null
|
||||
mkinitcpio -P &>/dev/null
|
||||
|
||||
# Installing GRUB.
|
||||
@ -171,7 +182,6 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
||||
# Creating grub config file.
|
||||
echo "Creating GRUB config file."
|
||||
grub-mkconfig -o /boot/grub/grub.cfg &>/dev/null
|
||||
|
||||
EOF
|
||||
|
||||
# Setting root password.
|
||||
|
Loading…
Reference in New Issue
Block a user