1
0
mirror of https://github.com/tommytran732/Arch-Setup-Script synced 2024-11-22 01:21:34 -05:00
This commit is contained in:
Tommaso Chiti 2021-02-01 09:13:05 +01:00
parent 9a1c7b8de0
commit 96a85cd11e

View File

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
# Unmounting partitions.
echo "Unmounting /mnt in order to proceed with the installation of Arch Linux."
umount -R /mnt
# Exit on STDERR. # Exit on STDERR.
set -e set -e
@ -23,13 +27,12 @@ then
wipefs -af $DISK wipefs -af $DISK
sgdisk -Zo $DISK sgdisk -Zo $DISK
else else
echo "Quitting." echo "Quitting."
exit exit
fi 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 \
@ -52,8 +55,6 @@ echo "Opening the newly created LUKS Container."
cryptsetup open $Cryptroot cryptroot cryptsetup open $Cryptroot cryptroot
BTRFS=/dev/mapper/cryptroot BTRFS=/dev/mapper/cryptroot
partprobe $DISK
# Formatting the LUKS Container as BTRFS. # Formatting the LUKS Container as BTRFS.
echo "Formatting the LUKS container as BTRFS." echo "Formatting the LUKS container as BTRFS."
mkfs.btrfs $BTRFS mkfs.btrfs $BTRFS
@ -173,6 +174,7 @@ echo "Enabling NetworkManager."
systemctl enable NetworkManager --root=/mnt systemctl enable NetworkManager --root=/mnt
# Unmounting partitions. # Unmounting partitions.
echo "Unmounting /mnt."
umount -R /mnt umount -R /mnt
echo "Done." echo "Done, you may now wish to reboot."
exit exit