Fix legacy partitioning and missing package database
This commit is contained in:
parent
57e63b05de
commit
b9bacbe17f
12
install.sh
12
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"
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue