Update arch-post.sh

This commit is contained in:
Timothy Pidashev
2021-10-23 21:03:23 -07:00
committed by GitHub
parent 5c744ef875
commit e0cf651720
+13 -13
View File
@@ -8,7 +8,7 @@ echo "Generated locales..."
# set localtime
ln -sf /usr/share/zoneinfo/America/Seattle /etc/localtime
echo "Set localtime..."
echo "Localtime set..."
# hardware clock
hwclock --systohc --utc
@@ -20,39 +20,39 @@ echo $HOSTNAME > /etc/hostname
sed -i "/localhost/s/$/ $HOSTNAME/" /etc/hosts #MAY BE BROKEN :(
# install networkmanager
echo "installing NetworkManager..."
echo "installing NetworkManager..." && sleep 1
pacman -S --noconfirm networkmanager
systemctl enable NetworkManager
# change password | may also be broken first time writing :(
read -r -p "Set root password for $HOSTNAME: " ROOTPASSWD
echo $ROOTPASSWD | passwd
echo "Password set!"
echo "Set your root password please."
passwd
# Bootloader installation
read -r -p "Sorry, computer's sometimes forget stuff too. What kind of system is this again? " sys
if [ $sys -eq 1 ]
then
# install grub and the boot manager
echo "Installing boot manager..."
echo "Installing boot manager..." && sleep 1
pacman -S --noconfirm grub efibootmgr
# mount bootmgr
echo "Mounting all systems..."
echo "Mounting all systems..." && sleep 1
mkdir /boot/efi
mount /dev/sda1 /boot/efi
# Install grub to system
echo "Installing and configuring grub..."
echo "Installing and configuring grub..." && sleep 1
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi --removable --debug
grub-mkconfig -o /boot/grub/grub.cfg
# complete setup
echo "Configuration complete! Unmounting and rebooting system. Please take out your arch installation medium."
umount -r /mnt
exit
fi
if [ $sys -eq 2 ]
then
echo "efi goes here :)"
fi
# complete setup
echo "Configuration complete! Unmounting and rebooting system. Please take out your arch installation medium."
umount -r /mnt
exit