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
c6c6d27e4d
commit
64c5dc8ec6
1 changed files with 6 additions and 6 deletions
12
easy-arch.sh
12
easy-arch.sh
|
|
@ -69,8 +69,8 @@ read -r -p "This will delete the current partition table on $DISK. Do you agree
|
||||||
response=${response,,}
|
response=${response,,}
|
||||||
if [[ "$response" =~ ^(yes|y)$ ]]
|
if [[ "$response" =~ ^(yes|y)$ ]]
|
||||||
then
|
then
|
||||||
wipefs -af $DISK &>/dev/null
|
wipefs -af "$DISK" &>/dev/null
|
||||||
sgdisk -Zo $DISK &>/dev/null
|
sgdisk -Zo "$DISK" &>/dev/null
|
||||||
else
|
else
|
||||||
echo "Quitting."
|
echo "Quitting."
|
||||||
exit
|
exit
|
||||||
|
|
@ -78,7 +78,7 @@ fi
|
||||||
|
|
||||||
# Creating a new partition scheme.
|
# Creating a new partition scheme.
|
||||||
echo "Creating new partition scheme on $DISK."
|
echo "Creating new partition scheme on $DISK."
|
||||||
parted -s $DISK \
|
parted -s "$DISK" \
|
||||||
mklabel gpt \
|
mklabel gpt \
|
||||||
mkpart ESP fat32 1MiB 513MiB \
|
mkpart ESP fat32 1MiB 513MiB \
|
||||||
mkpart Cryptroot 513MiB 100% \
|
mkpart Cryptroot 513MiB 100% \
|
||||||
|
|
@ -88,7 +88,7 @@ Cryptroot="/dev/disk/by-partlabel/Cryptroot"
|
||||||
|
|
||||||
# Informing the Kernel of the changes.
|
# Informing the Kernel of the changes.
|
||||||
echo "Informing the Kernel about the disk changes."
|
echo "Informing the Kernel about the disk changes."
|
||||||
partprobe $DISK
|
partprobe "$DISK"
|
||||||
|
|
||||||
# Formatting the ESP as FAT32.
|
# Formatting the ESP as FAT32.
|
||||||
echo "Formatting the EFI Partition as FAT32."
|
echo "Formatting the EFI Partition as FAT32."
|
||||||
|
|
@ -139,7 +139,7 @@ genfstab -U /mnt >> /mnt/etc/fstab
|
||||||
|
|
||||||
# Setting hostname.
|
# Setting hostname.
|
||||||
read -r -p "Please enter the hostname: " hostname
|
read -r -p "Please enter the hostname: " hostname
|
||||||
echo $hostname > /mnt/etc/hostname
|
echo "$hostname" > /mnt/etc/hostname
|
||||||
|
|
||||||
# Setting up locales.
|
# Setting up locales.
|
||||||
read -r -p "Please insert the locale you use (format: xx_XX): " locale
|
read -r -p "Please insert the locale you use (format: xx_XX): " locale
|
||||||
|
|
@ -172,7 +172,7 @@ echo -e "# Booting with BTRFS subvolume\nGRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETE
|
||||||
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
|
||||||
sed -i -e "s,GRUB_CMDLINE_LINUX="",GRUB_CMDLINE_LINUX="cryptdevice=UUID=$UUID:cryptroot root=$BTRFS cryptkey=rootfs:/root/cryptroot.keyfile,g"
|
sed -i -e "s,GRUB_CMDLINE_LINUX="",GRUB_CMDLINE_LINUX="cryptdevice=UUID="$UUID":cryptroot root=$BTRFS cryptkey=rootfs:/root/cryptroot.keyfile,g"
|
||||||
|
|
||||||
# Configuring the system.
|
# Configuring the system.
|
||||||
arch-chroot /mnt /bin/bash -e <<EOF
|
arch-chroot /mnt /bin/bash -e <<EOF
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue