make sure devices are unmounted before formatting

This commit is contained in:
Austin Horstman 2022-02-20 22:26:24 -06:00
parent a854c3c479
commit 1f915fa541
2 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,7 @@ echo -ne "
Formating Disk
-------------------------------------------------------------------------
"
umount -A --recursive /mnt # make sure everything is unmounted before we start
# disk prep
sgdisk -Z ${DISK} # zap all on disk
sgdisk -a 2048 -o ${DISK} # new gpt disk 2048 alignment
@ -60,6 +61,8 @@ sgdisk -n 3::-0 --typecode=3:8300 --change-name=3:'ROOT' ${DISK} # partition 3 (
if [[ ! -d "/sys/firmware/efi" ]]; then # Checking for bios system
sgdisk -A 1:set:2 ${DISK}
fi
partprobe ${DISK} # reread partition table to ensure it is correct
# make filesystems
echo -ne "
-------------------------------------------------------------------------

View File

@ -124,8 +124,8 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
rm -rv $HOME/ArchTitus
rm -rv /home/$USERNAME/ArchTitus
rm -r $HOME/ArchTitus
rm -r /home/$USERNAME/ArchTitus
# Replace in the same state
cd $pwd