mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-21 09:01:34 -05:00
Minor improvements & bug fixes
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
f400b8b0b2
commit
f08634fc49
32
install.sh
32
install.sh
@ -177,17 +177,14 @@ pacman -Sy
|
|||||||
## Installing curl
|
## Installing curl
|
||||||
pacman -S --noconfirm curl
|
pacman -S --noconfirm curl
|
||||||
|
|
||||||
## Formatting the disk
|
## Wipe the disk
|
||||||
wipefs -af "${disk}" &>/dev/null
|
blkdiscard --force "${disk}"
|
||||||
sgdisk -Zo "${disk}" &>/dev/null
|
|
||||||
|
|
||||||
## Creating a new partition scheme.
|
## Creating a new partition scheme.
|
||||||
output "Creating new partition scheme on ${disk}."
|
output "Creating new partition scheme on ${disk}."
|
||||||
parted -s "${disk}" \
|
sgdisk -g "${disk}"
|
||||||
mklabel gpt \
|
sgdisk -I -n 1:0:+512M -t 1:ef00 -c 1:'ESP' "${disk}"
|
||||||
mkpart ESP fat32 1MiB 513MiB \
|
sgdisk -I -n 2:0:0 -c 2:'rootfs' "${disk}"
|
||||||
set 1 esp on \
|
|
||||||
mkpart rootfs 513MiB 100%
|
|
||||||
|
|
||||||
ESP='/dev/disk/by-partlabel/ESP'
|
ESP='/dev/disk/by-partlabel/ESP'
|
||||||
|
|
||||||
@ -329,7 +326,14 @@ fi
|
|||||||
mkdir -p /mnt/boot/efi
|
mkdir -p /mnt/boot/efi
|
||||||
mount -o nodev,nosuid,noexec "${ESP}" /mnt/boot/efi
|
mount -o nodev,nosuid,noexec "${ESP}" /mnt/boot/efi
|
||||||
|
|
||||||
## Check the microcode to install.
|
## Pacstrap
|
||||||
|
output 'Installing the base system (it may take a while).'
|
||||||
|
|
||||||
|
output "You may see an error when mkinitcpio tries to generate a new initramfs."
|
||||||
|
output "It is okay. The script will regenerate the initramfs later in the installation process."
|
||||||
|
|
||||||
|
pacstrap /mnt apparmor base chrony efibootmgr firewalld grub grub-btrfs inotify-tools linux-firmware linux-hardened linux-lts nano reflector sbctl snapper sudo zram-generator
|
||||||
|
|
||||||
if [ "${virtualization}" = 'none' ]; then
|
if [ "${virtualization}" = 'none' ]; then
|
||||||
CPU=$(grep vendor_id /proc/cpuinfo)
|
CPU=$(grep vendor_id /proc/cpuinfo)
|
||||||
if [[ "${CPU}" == *"AuthenticAMD"* ]]; then
|
if [[ "${CPU}" == *"AuthenticAMD"* ]]; then
|
||||||
@ -337,16 +341,10 @@ if [ "${virtualization}" = 'none' ]; then
|
|||||||
else
|
else
|
||||||
microcode=intel-ucode
|
microcode=intel-ucode
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pacstrap /mnt "${microcode}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Pacstrap
|
|
||||||
output 'Installing the base system (it may take a while).'
|
|
||||||
|
|
||||||
output "You may see an error when mkinitcpio tries to generate a new initramfs."
|
|
||||||
output "It is okay. The script will regenerate the initramfs later in the installation process."
|
|
||||||
|
|
||||||
pacstrap /mnt apparmor base chrony efibootmgr firewalld grub grub-btrfs inotify-tools linux-firmware linux-hardened linux-lts "${microcode}" nano reflector sbctl snapper sudo zram-generator
|
|
||||||
|
|
||||||
if [ "${network_daemon}" = 'networkmanager' ]; then
|
if [ "${network_daemon}" = 'networkmanager' ]; then
|
||||||
pacstrap /mnt networkmanager
|
pacstrap /mnt networkmanager
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user