Reorder partitioning steps
This commit is contained in:
parent
dd9461df27
commit
571a27901d
18
install.sh
18
install.sh
|
@ -153,11 +153,17 @@ partition() {
|
||||||
[ -f /bin/parted ] || download_parted
|
[ -f /bin/parted ] || download_parted
|
||||||
|
|
||||||
local rootN
|
local rootN
|
||||||
|
[ $UEFI -eq 0 ] && rootN=2 || rootN=3
|
||||||
|
|
||||||
echo -n "Partitioning drive..."
|
echo -n "Partitioning drive..."
|
||||||
|
|
||||||
|
echo -n "Configuring ROOT partition..."
|
||||||
|
quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"$rootN
|
||||||
|
quiet mount "$DRIVE_TARGET"$rootN /mnt
|
||||||
|
echo "done"
|
||||||
|
|
||||||
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 primary linux-swap 0% 4GiB \
|
mkpart primary linux-swap 0% 4GiB \
|
||||||
|
@ -165,7 +171,6 @@ partition() {
|
||||||
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 \
|
||||||
|
@ -177,8 +182,8 @@ partition() {
|
||||||
echo -n "Configuring BOOT partition..."
|
echo -n "Configuring BOOT partition..."
|
||||||
quiet mkfs.fat -F 32 "$DRIVE_TARGET"2
|
quiet mkfs.fat -F 32 "$DRIVE_TARGET"2
|
||||||
fatlabel "$DRIVE_TARGET"2 BOOT
|
fatlabel "$DRIVE_TARGET"2 BOOT
|
||||||
mkdir /mnt/boot
|
mkdir -p /mnt/boot
|
||||||
mount "$DRIVE_TARGET"2 /mnt/boot
|
quiet mount "$DRIVE_TARGET"2 /mnt/boot
|
||||||
echo "done"
|
echo "done"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -186,11 +191,6 @@ partition() {
|
||||||
quiet mkswap -L SWAP "$DRIVE_TARGET"1
|
quiet mkswap -L SWAP "$DRIVE_TARGET"1
|
||||||
quiet swapon "$DRIVE_TARGET"1
|
quiet swapon "$DRIVE_TARGET"1
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
echo -n "Configuring ROOT partition..."
|
|
||||||
quiet mkfs.ext4 -L ROOT "$DRIVE_TARGET"$rootN
|
|
||||||
quiet mount "$DRIVE_TARGET"$rootN /mnt
|
|
||||||
echo "done"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_base() {
|
install_base() {
|
||||||
|
|
Loading…
Reference in New Issue