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"
|
print_phase "Disk partitioning"
|
||||||
[ -f /bin/parted ] || download_parted
|
[ -f /bin/parted ] || download_parted
|
||||||
|
|
||||||
|
local rootN
|
||||||
|
|
||||||
echo -n "Partitioning drive..."
|
echo -n "Partitioning drive..."
|
||||||
if [ $UEFI -eq 0 ]; then
|
if [ $UEFI -eq 0 ]; then
|
||||||
# Legacy
|
# Legacy
|
||||||
|
rootN=2
|
||||||
parted --script "$DRIVE_TARGET" \
|
parted --script "$DRIVE_TARGET" \
|
||||||
mklabel msdos \
|
mklabel msdos \
|
||||||
mkpart swap linux-swap 0% 4GiB \
|
mkpart primary linux-swap 0% 4GiB \
|
||||||
mkpart root ext4 4GiB 100%
|
mkpart primary ext4 4GiB 100%
|
||||||
echo "done"
|
echo "done"
|
||||||
else
|
else
|
||||||
# EFI
|
# EFI
|
||||||
|
rootN=3
|
||||||
parted --script "$DRIVE_TARGET" \
|
parted --script "$DRIVE_TARGET" \
|
||||||
mklabel gpt \
|
mklabel gpt \
|
||||||
mkpart swap linux-swap 0% 4GiB \
|
mkpart swap linux-swap 0% 4GiB \
|
||||||
@ -176,8 +180,8 @@ partition() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
echo -n "Configuring ROOT partition..."
|
echo -n "Configuring ROOT partition..."
|
||||||
quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"3
|
quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"$rootN
|
||||||
quiet mount "$DRIVE_TARGET"3 /mnt
|
quiet mount "$DRIVE_TARGET"$rootN /mnt
|
||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,16 +193,16 @@ remove() {
|
|||||||
|
|
||||||
install() {
|
install() {
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
echo -n "Installing $1..."
|
echo -n "Installing ${LGREEN}$1${NC}..."
|
||||||
else
|
else
|
||||||
echo "Installing $1. Description:"
|
echo -n "Installing ${LGREEN}$1${NC} ($2)..."
|
||||||
echo "$2"
|
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
quiet pacman -Sq --needed --noconfirm $1
|
quiet pacman -Sq --needed --noconfirm $1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
set -e
|
set -e
|
||||||
quiet pacman -Sqyu --needed --noconfirm $1
|
quiet pacman -Sy
|
||||||
|
quiet pacman -Sq --needed --noconfirm $1
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
echo "done"
|
echo "done"
|
||||||
@ -431,6 +431,7 @@ repos() {
|
|||||||
if [ "$DISTRO" = "artix" ]; then
|
if [ "$DISTRO" = "artix" ]; then
|
||||||
pacman_repo lib32
|
pacman_repo lib32
|
||||||
local ARCH_REPOS="$DEFAULT_INCLUDE-arch"
|
local ARCH_REPOS="$DEFAULT_INCLUDE-arch"
|
||||||
|
quiet pacman -Sy
|
||||||
install archlinux-mirrorlist
|
install archlinux-mirrorlist
|
||||||
pacman_repo extra $ARCH_REPOS
|
pacman_repo extra $ARCH_REPOS
|
||||||
pacman_repo community $ARCH_REPOS
|
pacman_repo community $ARCH_REPOS
|
||||||
@ -438,6 +439,14 @@ repos() {
|
|||||||
else
|
else
|
||||||
pacman_repo multilib
|
pacman_repo multilib
|
||||||
fi
|
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
|
# pwd must be the home dir of the user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user