code notes

This commit is contained in:
log :3 2022-10-18 11:14:25 +11:00
parent bc952a8ac2
commit d6eff5a379
2 changed files with 25 additions and 25 deletions

View File

@ -5,7 +5,7 @@ read INTERNETCONNECTION
if [ $INTERNETCONNECTION = n ] if [ $INTERNETCONNECTION = n ]
then then
echo "You must be connected to the internet to continue" echo "You must be connected to the internet to continue" # This asks the user if they are connected to the internet, important for installation
sleep 2 sleep 2
clear clear
exit exit
@ -14,7 +14,7 @@ fi
clear clear
timedatectl set-ntp true timedatectl set-ntp true
# These two commands make sure the time is set correctly
hwclock -w hwclock -w
clear clear
@ -22,35 +22,35 @@ clear
echo "Partitioning..." echo "Partitioning..."
sleep 1 sleep 1
parted /dev/sda mklabel gpt parted /dev/sda mklabel gpt
parted /dev/sda mkpart "EFI" fat32 1MiB 301MiB parted /dev/sda mkpart "EFI" fat32 1MiB 301MiB # These set of commands help create the hard drive and makes it easy to use.
parted /dev/sda set 1 esp on parted /dev/sda set 1 esp on
parted /dev/sda mkpart "swap" linux-swap 301MiB 8GiB parted /dev/sda mkpart "swap" linux-swap 301MiB 8GiB # Creates SWAP
parted /dev/sda mkpart "root" ext4 8GiB 100% parted /dev/sda mkpart "root" ext4 8GiB 100% # Creates usable Hard Drive space
mkfs.ext4 /dev/sda3 mkfs.ext4 /dev/sda3
mkswap /dev/sda2 mkswap /dev/sda2 # Formats Drives
mkfs.fat -F 32 /dev/sda1 mkfs.fat -F 32 /dev/sda1
mount /dev/sda3 /mnt mount /dev/sda3 /mnt
mount --mkdir /dev/sda1 /mnt/boot mount --mkdir /dev/sda1 /mnt/boot # Mounts all of the drives
swapon /dev/sda2 swapon /dev/sda2
clear clear
echo "Installing Packages..." echo "Installing Packages..."
sleep 1 sleep 1
pacman -Sy archlinux-keyring --noconfirm pacman -Sy archlinux-keyring --noconfirm # Makes sure the archlinux-keyring is up to date
clear clear
pacstrap /mnt base linux linux-firmware nano dkms plasma sddm networkmanager git grub efibootmgr intel-ucode amd-ucode sudo pulseaudio firefox dolphin flatpak packagekit-qt5 fwupd wine winetricks telepathy-accounts-signon telepathy-farstream telepathy-gabble telepathy-glib telepathy-haze telepathy-idle telepathy-kde-accounts-kcm telepathy-kde-approver telepathy-kde-auth-handler telepathy-kde-call-ui telepathy-kde-common-internals telepathy-kde-contact-list telepathy-kde-contact-runner telepathy-kde-desktop-applets telepathy-kde-filetransfer-handler telepathy-kde-integration-module telepathy-kde-meta telepathy-kde-send-file telepathy-kde-text-ui telepathy-mission-control telepathy-morse telepathy-qt telepathy-salut pacstrap /mnt base linux linux-firmware nano dkms plasma sddm networkmanager git grub efibootmgr intel-ucode amd-ucode sudo pulseaudio firefox dolphin flatpak packagekit-qt5 fwupd wine winetricks telepathy-accounts-signon telepathy-farstream telepathy-gabble telepathy-glib telepathy-haze telepathy-idle telepathy-kde-accounts-kcm telepathy-kde-approver telepathy-kde-auth-handler telepathy-kde-call-ui telepathy-kde-common-internals telepathy-kde-contact-list telepathy-kde-contact-runner telepathy-kde-desktop-applets telepathy-kde-filetransfer-handler telepathy-kde-integration-module telepathy-kde-meta telepathy-kde-send-file telepathy-kde-text-ui telepathy-mission-control telepathy-morse telepathy-qt telepathy-salut # Installs linux and plasma
clear clear
echo "Finishing up..." echo "Finishing up..."
sleep 1 sleep 1
genfstab -U /mnt >> /mnt/etc/fstab genfstab -U /mnt >> /mnt/etc/fstab # Generates FSTAB, for remembering what drives are used for what thing
cp setup2.sh /mnt/usr/bin/setup cp setup2.sh /mnt/usr/bin/setup # moves setup file so you can type setup to start 2nd part
clear clear
echo "When you are ready to proceed with setup, type 'setup'" echo "When you are ready to proceed with setup, type 'setup'"
arch-chroot /mnt arch-chroot /mnt # Arch is installed to the bare minimum

View File

@ -1,17 +1,17 @@
#!/bin/bash #!/bin/bash
systemctl enable NetworkManager systemctl enable NetworkManager # Enables Internet
systemctl enable sddm systemctl enable sddm # Enables Login Screen
clear clear
echo "Setting Timezone to Australia/Sydney..." echo "Setting Timezone to Australia/Sydney..."
sleep 1 sleep 1
ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime # Sets the timezone
clear clear
hwclock --systohc hwclock --systohc # Syncs the clock again
clear clear
cd tmp cd tmp
@ -21,7 +21,7 @@ rm /etc/locale.gen
cp files/locale.gen /etc/ cp files/locale.gen /etc/
cp files/locale.conf /etc/ cp files/locale.conf /etc/
rm /etc/pacman.conf rm /etc/pacman.conf
cp files/pacman.conf /etc/pacman.conf cp files/pacman.conf /etc/pacman.conf # Copies some important files to the install
rm /etc/sudoers rm /etc/sudoers
cp files/sudoers /etc/sudoers cp files/sudoers /etc/sudoers
cd / cd /
@ -29,14 +29,14 @@ clear
echo "What would you like to call your computer? (no spaces or special characters)" echo "What would you like to call your computer? (no spaces or special characters)"
read COMPUTERNAME read COMPUTERNAME
echo $COMPUTERNAME >> /etc/hostname echo $COMPUTERNAME >> /etc/hostname # Sets computer name
clear clear
echo "Running mkinitcpio..." echo "Running mkinitcpio..." # Reruns mkinitcpio
mkinitcpio -P mkinitcpio -P
clear clear
echo "Would you like a root account? (Administrator) [ y / n ]" echo "Would you like a root account? (Administrator) [ y / n ]" # Asks if the user wants an Administrator Account
read ROOTACC read ROOTACC
if [ $ROOTACC = y ] if [ $ROOTACC = y ]
then then
@ -48,11 +48,11 @@ fi
clear clear
echo "Installing bootloader..." echo "Installing bootloader..."
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub # Creates the bootloader which allows Linux to boot
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
clear clear
echo "What is your user account name? (no spaces or special characters)" echo "What is your user account name? (no spaces or special characters)" # Creates User
read USERACCNAME read USERACCNAME
echo "Would you like to be Administrator (superuser)? [ y / n ]" echo "Would you like to be Administrator (superuser)? [ y / n ]"
read SUPERUSERACC read SUPERUSERACC
@ -70,7 +70,7 @@ read SUPERUSERACC
fi fi
clear clear
echo "Finalizing Setup..." # add KDE Plasma welcome screen echo "Finalizing Setup..." # Sets up Plasma Welcome and installs steam
cd /tmp cd /tmp
cd elnathco cd elnathco
cd files cd files
@ -83,11 +83,11 @@ chmod +x /usr/bin/plasma-welcome
pacman -Syu steam --noconfirm pacman -Syu steam --noconfirm
echo "Cleaning Up..." echo "Cleaning Up..." # Deletes all useless items
cd /tmp cd /tmp
rm -R elnathco rm -R elnathco
rm /usr/bin/setup rm /usr/bin/setup
echo "Installation Finished." echo "Installation Finished."
echo "To reboot, type 'exit' and then 'reboot'" echo "To reboot, type 'exit' and then 'reboot'" # Completes Setup
exit exit