Btrfs is now the default install.sh.

This commit is contained in:
proledatarian 2022-04-26 15:52:51 +00:00
parent 3dde2e5f2a
commit f2449e9cf5
2 changed files with 120 additions and 120 deletions

View File

@ -13,6 +13,8 @@
# $pwur = user password # $pwur = user password
# $pwrt = root password # $pwrt = root password
# $pwcr = encryption password # $pwcr = encryption password
# $pwfr = password first
# $pwsc = password second
# Friendly introduction. # Friendly introduction.
echo "Welcome to the Arch Linux installation script!" echo "Welcome to the Arch Linux installation script!"
@ -54,6 +56,14 @@ IFS=' '
# Create new variable of selection. # Create new variable of selection.
array=($dev) array=($dev)
dev="${array[0]}" dev="${array[0]}"
szmn="${array[1]%?}"
# Setting partition size.
echo "Your system partition has a size of $szmn GB."
echo "What size should your root volume have (GB)?"
echo "The rest will be used for your home volume."
read szrt
echo
echo "2. ENCRYPTION" echo "2. ENCRYPTION"
echo echo
@ -72,6 +82,8 @@ then
else else
echo echo
echo "You have entered different passwords. Try again.." echo "You have entered different passwords. Try again.."
echo
continue
fi fi
break break
done done
@ -90,7 +102,7 @@ echo
# Setting root password. # Setting root password.
echo "Choose a password for the root account:" echo "Choose a password for the root account:"
while [ -z "$pwr" ]; do while [ -z "$pwrt" ]; do
echo "Please enter a password: " echo "Please enter a password: "
read -s pwfr read -s pwfr
read -s -p "Retype a password: " pwsc read -s -p "Retype a password: " pwsc
@ -102,6 +114,8 @@ then
else else
echo echo
echo "You have entered different passwords. Try again.." echo "You have entered different passwords. Try again.."
echo
continue
fi fi
break break
done done
@ -117,7 +131,7 @@ echo
# Setting user password. # Setting user password.
echo "Also please choose a password for your user:" echo "Also please choose a password for your user:"
while [ -z "$pwu" ]; do while [ -z "$pwur" ]; do
echo "Please enter a password: " echo "Please enter a password: "
read -s pwfr read -s pwfr
read -s -p "Retype a password: " pwsc read -s -p "Retype a password: " pwsc
@ -129,6 +143,8 @@ then
else else
echo echo
echo "You have entered different passwords. Try again.." echo "You have entered different passwords. Try again.."
echo
continue
fi fi
break break
@ -148,15 +164,18 @@ sgdisk -Z /dev/$dev &&
echo echo
# Creating boot partition. # Creating boot partition.
#szmn="${array[1]%?}"
echo "Creating boot partition of 256 MB." echo "Creating boot partition of 256 MB."
sgdisk -n 1:0:+256M /dev/$dev && sgdisk -n 1:0:+256M /dev/$dev &&
echo echo
# Setting type for EFI. # Setting type for EFI.
echo "Marking partition as boot."
sgdisk -t 1:ef00 /dev/$dev && sgdisk -t 1:ef00 /dev/$dev &&
echo
# Creating system partition. # Creating system partition.
echo "Creating system partition." echo "Creating system partition of $szmn GB."
sgdisk -n 2:0:0 /dev/$dev sgdisk -n 2:0:0 /dev/$dev
echo echo
@ -175,45 +194,58 @@ echo -en "$pwcr\n$pwcr" | cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/$ma
echo "Partition successfully encrypted." echo "Partition successfully encrypted."
echo echo
# Opening encrypted partition and mounting at /dev/mapper/main. # Opening encrypted partition and mounting at /dev/mapper/lvm.
echo "Decrypting.. This also might take a while." echo "Decrypting.. This also might take a while."
echo echo
echo -en "$pwcr\n$pwcr" | cryptsetup luksOpen /dev/$main main && echo -en "$pwcr\n$pwcr" | cryptsetup luksOpen /dev/$main lvm &&
echo "Partition successfully opened." echo "Partition successfully opened."
echo echo
lsblk | grep "$dev" lsblk | grep "$dev"
echo echo
# Creating physical volume.
echo "Creating physical volume."
pvcreate /dev/mapper/lvm &&
echo
# Creating volume group "main".
echo "Creating volume group."
vgcreate main /dev/mapper/lvm &&
echo
# Creating logical volumes.
echo "Creating logical volumes for root and home."
lvcreate -L ${szrt}G -n root main &&
lvcreate -l 100%FREE -n home main &&
echo "Logical volumes successfully created."
echo
echo "Creating the filesystem." echo "Creating the filesystem."
boot=${dev}1 boot=${dev}1
mkfs.fat -F 32 -n UEFI /dev/$boot && mkfs.fat -F 32 -n UEFI /dev/$boot &&
echo "Filesystem for boot successfully created." echo "Filesystem for boot successfully created."
echo echo
# Creating btrfs partition. mkfs.ext4 -L root /dev/mapper/main-root &&
mkfs.btrfs /dev/mapper/main && echo "Filesystem for root successfully created."
mount /dev/mapper/main /mnt &&
btrfs subvolume create /mnt/@root &&
btrfs subvolume create /mnt/@home &&
btrfs subvolume create /mnt/@snapshots &&
umount /mnt &&
echo "Mounting.." &&
mount -o compress=zstd,subvol=@root /dev/mapper/main /mnt &&
mkdir /mnt/home &&
mount -o compress=zstd,subvol=@home /dev/mapper/main /mnt/home &&
mkdir /mnt/.snapshots &&
mount -o compress=zstd,subvol=@snapshots /dev/mapper/main /mnt/.snapshots &&
mkdir /mnt/boot &&
mount /dev/$boot /mnt/boot &&
echo "Mounting complete." &&
echo echo
lsblk | grep "$dev" mkfs.ext4 -L home /dev/mapper/main-home &&
echo "Filesystem for home successfully created."
echo
echo "Mounting.."
mount /dev/mapper/main-root /mnt &&
mkdir /mnt/boot &&
mkdir /mnt/home &&
mount /dev/$boot /mnt/boot &&
mount /dev/mapper/main-home /mnt/home &&
echo "Mounting complete."
echo
#lsblk | grep "$dev"
lsblk
echo echo
# Updating mirrors using reflector. # Updating mirrors using reflector.
@ -223,17 +255,22 @@ reflector --verbose --latest 10 --country Germany --age 24 --protocol https --so
echo "Done." echo "Done."
echo echo
echo "Updating keyring.."
pacman -Sy archlinux-keyring --noconfirm &&
echo "Done."
echo
# Installing base system. # Installing base system.
echo "Installing basic packages.." echo "Installing basic packages.."
#pacstrap /mnt base base-devel firefox konsole linux linux-firmware linux-zen lvm2 networkmanager nano plasma-desktop sddm sddm-kcm && #pacstrap /mnt base base-devel firefox konsole linux linux-firmware linux-zen lvm2 networkmanager nano plasma-desktop sddm sddm-kcm &&
pacstrap /mnt base btrfs-progs firefox konsole linux linux-firmware linux-zen lvm2 nano networkmanager plasma-desktop sddm sddm-kcm sudo && pacstrap /mnt base firefox konsole linux linux-firmware linux-zen lvm2 nano networkmanager plasma-desktop sddm sddm-kcm sudo &&
echo "Base system installed." echo "Base system installed."
echo echo
# Generating fstab. # Generating fstab.
echo "Generating fstab." echo "Generating fstab."
genfstab -Up /mnt > /mnt/etc/fstab && genfstab -Up /mnt > /mnt/etc/fstab &&
echo "Installed fstab." echo "Done."
echo echo
# Setting hostname. # Setting hostname.
@ -245,9 +282,9 @@ echo
# Setting locale. # Setting locale.
echo "Setting and generating locale." echo "Setting and generating locale."
#localegen=$(cat /mnt/etc/locale.gen) #localegen=$(cat /mnt/etc/locale.gen)
cat <<EOF >/mnt/etc/locale.gen cat <<EOF > /mnt/etc/locale.gen
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
#de_DE.UTF-8 UTF-8 de_DE.UTF-8 UTF-8
EOF EOF
#echo "${localegen}" >>/mnt/etc/locale.gen #echo "${localegen}" >>/mnt/etc/locale.gen
arch-chroot /mnt locale-gen arch-chroot /mnt locale-gen
@ -261,7 +298,7 @@ echo
echo "Setting locale and keyboard layout." echo "Setting locale and keyboard layout."
arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys && arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys &&
cat << EOF > /mnt//etc/X11/xorg.conf.d/00-keyboard.conf && cat << EOF > /mnt/etc/X11/xorg.conf.d/00-keyboard.conf &&
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's # Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to # probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it. # instruct systemd-localed to update it.
@ -278,9 +315,8 @@ echo
# Editing mkinitcpio.conf. # Editing mkinitcpio.conf.
echo "Editing /etc/mkinitcpio.conf." echo "Editing /etc/mkinitcpio.conf."
echo sed -i '7s/.*/MODULES=(ext4)/' /mnt/etc/mkinitcpio.conf
sed -i '7s/.*/MODULES=(ext4)/' /mnt/etc/mkinitcpio.conf && sed -i '52s/.*/HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf
sed -i '52s/.*/HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf &&
echo "Done." echo "Done."
echo echo
@ -304,7 +340,7 @@ echo
# Install bootloader. # Install bootloader.
echo "Installing systemd-boot." echo "Installing systemd-boot."
arch-chroot /mnt bootctl --path=/boot install && arch-chroot /mnt bootctl install &&
echo "Done." echo "Done."
echo echo
@ -316,9 +352,8 @@ linux /vmlinuz-linux-zen
#initrd /amd-ucode.img #initrd /amd-ucode.img
#initrd /intel-ucode.img #initrd /intel-ucode.img
initrd /initramfs-linux-zen.img initrd /initramfs-linux-zen.img
options cryptdevice=/dev/$main:main options cryptdevice=/dev/$main:lvm
options root=/dev/mapper/main rw options root=/dev/mapper/main-root rw
options rootflags=subvol=@root
options lang=de locale=de_DE.UTF-8 options lang=de locale=de_DE.UTF-8
options init=/usr/lib/systemd/systemd options init=/usr/lib/systemd/systemd
#options loglevel=3 #options loglevel=3
@ -329,9 +364,8 @@ cat << EOF > /mnt/boot/loader/entries/arch-fallback.conf &&
title Arch Linux Fallback title Arch Linux Fallback
linux /vmlinuz-linux linux /vmlinuz-linux
initrd /initramfs-linux-fallback.img initrd /initramfs-linux-fallback.img
options cryptdevice=/dev/$main:main options cryptdevice=/dev/$main:lvm
options root=/dev/mapper/main rw options root=/dev/mapper/main-root rw
options rootflags=subvol=@root
options lang=de locale=de_DE.UTF-8 options lang=de locale=de_DE.UTF-8
options init=/usr/lib/systemd/systemd options init=/usr/lib/systemd/systemd
EOF EOF
@ -347,7 +381,7 @@ echo "Adding user."
arch-chroot /mnt useradd -m $user && arch-chroot /mnt useradd -m $user &&
echo -en "$pwur\n$pwur" | arch-chroot /mnt passwd $user && echo -en "$pwur\n$pwur" | arch-chroot /mnt passwd $user &&
arch-chroot /mnt gpasswd -a $user wheel && arch-chroot /mnt gpasswd -a $user wheel &&
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers &&
echo "Done." echo "Done."
echo echo
@ -365,6 +399,7 @@ echo
# Unmounting and rebooting. # Unmounting and rebooting.
echo "Unmounting system." echo "Unmounting system."
umount /mnt/boot && umount /mnt/boot &&
umount /mnt/home &&
umount /mnt && umount /mnt &&
echo "Done." echo "Done."
echo echo
@ -372,5 +407,5 @@ echo
clear clear
echo "Installation finished!" echo "Installation finished!"
echo "Press [Enter] to shut down, then remove the installation media and start your system." read -p "Press [Enter] to shut down, then remove the installation media and start your system."
poweroff poweroff

View File

@ -13,8 +13,6 @@
# $pwur = user password # $pwur = user password
# $pwrt = root password # $pwrt = root password
# $pwcr = encryption password # $pwcr = encryption password
# $pwfr = password first
# $pwsc = password second
# Friendly introduction. # Friendly introduction.
echo "Welcome to the Arch Linux installation script!" echo "Welcome to the Arch Linux installation script!"
@ -56,14 +54,6 @@ IFS=' '
# Create new variable of selection. # Create new variable of selection.
array=($dev) array=($dev)
dev="${array[0]}" dev="${array[0]}"
szmn="${array[1]%?}"
# Setting partition size.
echo "Your system partition has a size of $szmn GB."
echo "What size should your root volume have (GB)?"
echo "The rest will be used for your home volume."
read szrt
echo
echo "2. ENCRYPTION" echo "2. ENCRYPTION"
echo echo
@ -82,8 +72,6 @@ then
else else
echo echo
echo "You have entered different passwords. Try again.." echo "You have entered different passwords. Try again.."
echo
continue
fi fi
break break
done done
@ -102,7 +90,7 @@ echo
# Setting root password. # Setting root password.
echo "Choose a password for the root account:" echo "Choose a password for the root account:"
while [ -z "$pwrt" ]; do while [ -z "$pwr" ]; do
echo "Please enter a password: " echo "Please enter a password: "
read -s pwfr read -s pwfr
read -s -p "Retype a password: " pwsc read -s -p "Retype a password: " pwsc
@ -114,8 +102,6 @@ then
else else
echo echo
echo "You have entered different passwords. Try again.." echo "You have entered different passwords. Try again.."
echo
continue
fi fi
break break
done done
@ -131,7 +117,7 @@ echo
# Setting user password. # Setting user password.
echo "Also please choose a password for your user:" echo "Also please choose a password for your user:"
while [ -z "$pwur" ]; do while [ -z "$pwu" ]; do
echo "Please enter a password: " echo "Please enter a password: "
read -s pwfr read -s pwfr
read -s -p "Retype a password: " pwsc read -s -p "Retype a password: " pwsc
@ -143,8 +129,6 @@ then
else else
echo echo
echo "You have entered different passwords. Try again.." echo "You have entered different passwords. Try again.."
echo
continue
fi fi
break break
@ -164,18 +148,15 @@ sgdisk -Z /dev/$dev &&
echo echo
# Creating boot partition. # Creating boot partition.
#szmn="${array[1]%?}"
echo "Creating boot partition of 256 MB." echo "Creating boot partition of 256 MB."
sgdisk -n 1:0:+256M /dev/$dev && sgdisk -n 1:0:+256M /dev/$dev &&
echo echo
# Setting type for EFI. # Setting type for EFI.
echo "Marking partition as boot."
sgdisk -t 1:ef00 /dev/$dev && sgdisk -t 1:ef00 /dev/$dev &&
echo
# Creating system partition. # Creating system partition.
echo "Creating system partition of $szmn GB." echo "Creating system partition."
sgdisk -n 2:0:0 /dev/$dev sgdisk -n 2:0:0 /dev/$dev
echo echo
@ -194,58 +175,45 @@ echo -en "$pwcr\n$pwcr" | cryptsetup -c aes-xts-plain -s 512 luksFormat /dev/$ma
echo "Partition successfully encrypted." echo "Partition successfully encrypted."
echo echo
# Opening encrypted partition and mounting at /dev/mapper/lvm. # Opening encrypted partition and mounting at /dev/mapper/main.
echo "Decrypting.. This also might take a while." echo "Decrypting.. This also might take a while."
echo echo
echo -en "$pwcr\n$pwcr" | cryptsetup luksOpen /dev/$main lvm && echo -en "$pwcr\n$pwcr" | cryptsetup luksOpen /dev/$main main &&
echo "Partition successfully opened." echo "Partition successfully opened."
echo echo
lsblk | grep "$dev" lsblk | grep "$dev"
echo echo
# Creating physical volume.
echo "Creating physical volume."
pvcreate /dev/mapper/lvm &&
echo
# Creating volume group "main".
echo "Creating volume group."
vgcreate main /dev/mapper/lvm &&
echo
# Creating logical volumes.
echo "Creating logical volumes for root and home."
lvcreate -L ${szrt}G -n root main &&
lvcreate -l 100%FREE -n home main &&
echo "Logical volumes successfully created."
echo
echo "Creating the filesystem." echo "Creating the filesystem."
boot=${dev}1 boot=${dev}1
mkfs.fat -F 32 -n UEFI /dev/$boot && mkfs.fat -F 32 -n UEFI /dev/$boot &&
echo "Filesystem for boot successfully created." echo "Filesystem for boot successfully created."
echo echo
mkfs.ext4 -L root /dev/mapper/main-root && # Creating btrfs partition.
echo "Filesystem for root successfully created." mkfs.btrfs /dev/mapper/main &&
echo
mkfs.ext4 -L home /dev/mapper/main-home && mount /dev/mapper/main /mnt &&
echo "Filesystem for home successfully created."
echo
echo "Mounting.." btrfs subvolume create /mnt/@root &&
mount /dev/mapper/main-root /mnt && btrfs subvolume create /mnt/@home &&
mkdir /mnt/boot && btrfs subvolume create /mnt/@snapshots &&
umount /mnt &&
echo "Mounting.." &&
mount -o compress=zstd,subvol=@root /dev/mapper/main /mnt &&
mkdir /mnt/home && mkdir /mnt/home &&
mount -o compress=zstd,subvol=@home /dev/mapper/main /mnt/home &&
mkdir /mnt/.snapshots &&
mount -o compress=zstd,subvol=@snapshots /dev/mapper/main /mnt/.snapshots &&
mkdir /mnt/boot &&
mount /dev/$boot /mnt/boot && mount /dev/$boot /mnt/boot &&
mount /dev/mapper/main-home /mnt/home && echo "Mounting complete." &&
echo "Mounting complete."
echo echo
#lsblk | grep "$dev" lsblk | grep "$dev"
lsblk
echo echo
# Updating mirrors using reflector. # Updating mirrors using reflector.
@ -255,22 +223,17 @@ reflector --verbose --latest 10 --country Germany --age 24 --protocol https --so
echo "Done." echo "Done."
echo echo
echo "Updating keyring.."
pacman -Sy archlinux-keyring --noconfirm &&
echo "Done."
echo
# Installing base system. # Installing base system.
echo "Installing basic packages.." echo "Installing basic packages.."
#pacstrap /mnt base base-devel firefox konsole linux linux-firmware linux-zen lvm2 networkmanager nano plasma-desktop sddm sddm-kcm && #pacstrap /mnt base base-devel firefox konsole linux linux-firmware linux-zen lvm2 networkmanager nano plasma-desktop sddm sddm-kcm &&
pacstrap /mnt base firefox konsole linux linux-firmware linux-zen lvm2 nano networkmanager plasma-desktop sddm sddm-kcm sudo && pacstrap /mnt base btrfs-progs firefox konsole linux linux-firmware linux-zen lvm2 nano networkmanager plasma-desktop sddm sddm-kcm sudo &&
echo "Base system installed." echo "Base system installed."
echo echo
# Generating fstab. # Generating fstab.
echo "Generating fstab." echo "Generating fstab."
genfstab -Up /mnt > /mnt/etc/fstab && genfstab -Up /mnt > /mnt/etc/fstab &&
echo "Done." echo "Installed fstab."
echo echo
# Setting hostname. # Setting hostname.
@ -282,9 +245,9 @@ echo
# Setting locale. # Setting locale.
echo "Setting and generating locale." echo "Setting and generating locale."
#localegen=$(cat /mnt/etc/locale.gen) #localegen=$(cat /mnt/etc/locale.gen)
cat <<EOF > /mnt/etc/locale.gen cat <<EOF >/mnt/etc/locale.gen
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
de_DE.UTF-8 UTF-8 #de_DE.UTF-8 UTF-8
EOF EOF
#echo "${localegen}" >>/mnt/etc/locale.gen #echo "${localegen}" >>/mnt/etc/locale.gen
arch-chroot /mnt locale-gen arch-chroot /mnt locale-gen
@ -298,7 +261,7 @@ echo
echo "Setting locale and keyboard layout." echo "Setting locale and keyboard layout."
arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys && arch-chroot /mnt localectl --no-convert set-keymap de-latin1-nodeadkeys &&
cat << EOF > /mnt/etc/X11/xorg.conf.d/00-keyboard.conf && cat << EOF > /mnt//etc/X11/xorg.conf.d/00-keyboard.conf &&
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's # Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to # probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it. # instruct systemd-localed to update it.
@ -315,8 +278,9 @@ echo
# Editing mkinitcpio.conf. # Editing mkinitcpio.conf.
echo "Editing /etc/mkinitcpio.conf." echo "Editing /etc/mkinitcpio.conf."
sed -i '7s/.*/MODULES=(ext4)/' /mnt/etc/mkinitcpio.conf echo
sed -i '52s/.*/HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf sed -i '7s/.*/MODULES=(ext4)/' /mnt/etc/mkinitcpio.conf &&
sed -i '52s/.*/HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)/' /mnt/etc/mkinitcpio.conf &&
echo "Done." echo "Done."
echo echo
@ -340,7 +304,7 @@ echo
# Install bootloader. # Install bootloader.
echo "Installing systemd-boot." echo "Installing systemd-boot."
arch-chroot /mnt bootctl install && arch-chroot /mnt bootctl --path=/boot install &&
echo "Done." echo "Done."
echo echo
@ -352,8 +316,9 @@ linux /vmlinuz-linux-zen
#initrd /amd-ucode.img #initrd /amd-ucode.img
#initrd /intel-ucode.img #initrd /intel-ucode.img
initrd /initramfs-linux-zen.img initrd /initramfs-linux-zen.img
options cryptdevice=/dev/$main:lvm options cryptdevice=/dev/$main:main
options root=/dev/mapper/main-root rw options root=/dev/mapper/main rw
options rootflags=subvol=@root
options lang=de locale=de_DE.UTF-8 options lang=de locale=de_DE.UTF-8
options init=/usr/lib/systemd/systemd options init=/usr/lib/systemd/systemd
#options loglevel=3 #options loglevel=3
@ -364,8 +329,9 @@ cat << EOF > /mnt/boot/loader/entries/arch-fallback.conf &&
title Arch Linux Fallback title Arch Linux Fallback
linux /vmlinuz-linux linux /vmlinuz-linux
initrd /initramfs-linux-fallback.img initrd /initramfs-linux-fallback.img
options cryptdevice=/dev/$main:lvm options cryptdevice=/dev/$main:main
options root=/dev/mapper/main-root rw options root=/dev/mapper/main rw
options rootflags=subvol=@root
options lang=de locale=de_DE.UTF-8 options lang=de locale=de_DE.UTF-8
options init=/usr/lib/systemd/systemd options init=/usr/lib/systemd/systemd
EOF EOF
@ -381,7 +347,7 @@ echo "Adding user."
arch-chroot /mnt useradd -m $user && arch-chroot /mnt useradd -m $user &&
echo -en "$pwur\n$pwur" | arch-chroot /mnt passwd $user && echo -en "$pwur\n$pwur" | arch-chroot /mnt passwd $user &&
arch-chroot /mnt gpasswd -a $user wheel && arch-chroot /mnt gpasswd -a $user wheel &&
sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers && sed -i '82s/.*/%wheel ALL=(ALL) ALL/' /mnt/etc/sudoers
echo "Done." echo "Done."
echo echo
@ -399,7 +365,6 @@ echo
# Unmounting and rebooting. # Unmounting and rebooting.
echo "Unmounting system." echo "Unmounting system."
umount /mnt/boot && umount /mnt/boot &&
umount /mnt/home &&
umount /mnt && umount /mnt &&
echo "Done." echo "Done."
echo echo
@ -407,5 +372,5 @@ echo
clear clear
echo "Installation finished!" echo "Installation finished!"
read -p "Press [Enter] to shut down, then remove the installation media and start your system." echo "Press [Enter] to shut down, then remove the installation media and start your system."
poweroff poweroff