Update install.sh
This commit is contained in:
parent
2adeadfbfc
commit
f74ac33aef
27
install.sh
27
install.sh
|
@ -1,19 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
### Variables:
|
||||
# $dsks = whole lsblk output (e.g. "sda 1,0T, sdb ..")
|
||||
# $disk = only selected disk (e.g. "sdc 500G")
|
||||
# $dev = selected disk without size (e.g. "sdd")
|
||||
# $main = main partition (e.g. "sde2")
|
||||
# $szmn = size of the main partition (e.g. "50")
|
||||
# szrt = size of root LVM volume
|
||||
# $boot = boot partition (e.g. "sdf1")
|
||||
# $host = hostname
|
||||
# $user = username
|
||||
# $pwur = user password
|
||||
# $pwrt = root password
|
||||
# $pwcr = encryption password
|
||||
|
||||
exec >> >(tee -i /tmp/install.log)
|
||||
exec 2>&1
|
||||
|
||||
|
@ -24,7 +10,7 @@ echo "Welcome to the Arch Linux installation script!"
|
|||
echo "This script will ERASE ALL DATA on the partition you will choose next!"
|
||||
echo
|
||||
read -p "Do you want to continue? Type [Y]es or [N]o. " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
exit 1
|
||||
|
@ -208,9 +194,9 @@ umount /mnt &&
|
|||
echo
|
||||
|
||||
echo "Mounting.." &&
|
||||
mount -o compress=zstd,subvol=root /dev/mapper/main /mnt &&
|
||||
mount -o autodefrag,compress=zstd:3,subvol=root /dev/mapper/main /mnt &&
|
||||
mkdir /mnt/home &&
|
||||
mount -o compress=zstd,subvol=home /dev/mapper/main /mnt/home &&
|
||||
mount -o autodefrag,compress=zstd:3,subvol=home /dev/mapper/main /mnt/home &&
|
||||
mkdir /mnt/boot &&
|
||||
mount /dev/$boot /mnt/boot &&
|
||||
echo "Mounting complete." &&
|
||||
|
@ -222,7 +208,6 @@ echo
|
|||
# Updating mirrors using reflector.
|
||||
echo "Updating mirrors.."
|
||||
reflector --verbose --latest 10 --country Germany --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist &&
|
||||
#reflector --verbose --latest 10 --age 24 --protocol https --sort rate --save /etc/pacman.d/mirrorlist &&
|
||||
echo "Done."
|
||||
echo
|
||||
|
||||
|
@ -251,16 +236,13 @@ echo
|
|||
|
||||
# Setting locale.
|
||||
echo "Setting and generating locale.."
|
||||
#localegen=$(cat /mnt/etc/locale.gen)
|
||||
cat << EOF >/mnt/etc/locale.gen
|
||||
en_US.UTF-8 UTF-8
|
||||
#de_DE.UTF-8 UTF-8
|
||||
EOF
|
||||
|
||||
#echo "${localegen}" >>/mnt/etc/locale.gen
|
||||
arch-chroot /mnt locale-gen
|
||||
echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf &&
|
||||
#echo "LANG=de_DE.UTF-8" >/mnt/etc/locale.conf
|
||||
echo "KEYMAP=de-latin1" > /mnt/etc/vconsole.conf &&
|
||||
echo "Done."
|
||||
echo
|
||||
|
@ -317,6 +299,9 @@ arch-chroot /mnt bootctl --path=/boot install &&
|
|||
echo "Done."
|
||||
echo
|
||||
|
||||
# Check if installed on SSD
|
||||
|
||||
|
||||
# Get UUID for primary partition
|
||||
uuid=$(ls -l /dev/disk/by-uuid | grep $main | awk '{print $9}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue