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