From b9bacbe17f0158c364a631581b2169da96eebc76 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Thu, 12 Aug 2021 15:51:12 -0300 Subject: [PATCH] Fix legacy partitioning and missing package database --- install.sh | 12 ++++++++---- post-install.sh | 17 +++++++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 5224706..3db0db8 100755 --- a/install.sh +++ b/install.sh @@ -144,16 +144,20 @@ partition() { print_phase "Disk partitioning" [ -f /bin/parted ] || download_parted + local rootN + echo -n "Partitioning drive..." if [ $UEFI -eq 0 ]; then # Legacy + rootN=2 parted --script "$DRIVE_TARGET" \ mklabel msdos \ - mkpart swap linux-swap 0% 4GiB \ - mkpart root ext4 4GiB 100% + mkpart primary linux-swap 0% 4GiB \ + mkpart primary ext4 4GiB 100% echo "done" else # EFI + rootN=3 parted --script "$DRIVE_TARGET" \ mklabel gpt \ mkpart swap linux-swap 0% 4GiB \ @@ -176,8 +180,8 @@ partition() { echo "done" echo -n "Configuring ROOT partition..." - quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"3 - quiet mount "$DRIVE_TARGET"3 /mnt + quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"$rootN + quiet mount "$DRIVE_TARGET"$rootN /mnt echo "done" } diff --git a/post-install.sh b/post-install.sh index f0bf9b9..76bc386 100755 --- a/post-install.sh +++ b/post-install.sh @@ -193,16 +193,16 @@ remove() { install() { if [ -z "$2" ]; then - echo -n "Installing $1..." + echo -n "Installing ${LGREEN}$1${NC}..." else - echo "Installing $1. Description:" - echo "$2" + echo -n "Installing ${LGREEN}$1${NC} ($2)..." fi set +e quiet pacman -Sq --needed --noconfirm $1 if [ $? -ne 0 ]; then set -e - quiet pacman -Sqyu --needed --noconfirm $1 + quiet pacman -Sy + quiet pacman -Sq --needed --noconfirm $1 fi set -e echo "done" @@ -431,6 +431,7 @@ repos() { if [ "$DISTRO" = "artix" ]; then pacman_repo lib32 local ARCH_REPOS="$DEFAULT_INCLUDE-arch" + quiet pacman -Sy install archlinux-mirrorlist pacman_repo extra $ARCH_REPOS pacman_repo community $ARCH_REPOS @@ -438,6 +439,14 @@ repos() { else pacman_repo multilib fi + echo -n "Downloading package database..." + quiet pacman -Sy + echo "done" + + echo -n "Configuring pacman keyring..." + quiet pacman-key --init + quiet pacman-key --populate archlinux + echo "done" } # pwd must be the home dir of the user