Fixed partition label for VPS installer

This commit is contained in:
Dionysus 2024-02-12 19:10:31 -05:00
parent 0b4b44d18a
commit 86626f254d
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
1 changed files with 3 additions and 3 deletions

6
vps
View File

@ -13,7 +13,7 @@ USERNAME=acidvegas
setup_root() {
xbps-install parted
wipefs -a $DRIVE
parted --script $DRIVE mklabel gpt
parted --script $DRIVE mklabel msdos
parted --script $DRIVE mkpart primary ext4 1MiB 100%
parted --script $DRIVE set 1 boot on
mkfs.ext4 ${DRIVE}1
@ -23,7 +23,7 @@ setup_root() {
cp /var/db/xbps/keys/* /mnt/var/db/xbps/keys/
REPO=https://repo-default.voidlinux.org/current
[ $ARCH = 'x86_64-musl' ] && REPO=$REPO/musl
XBPS_ARCH=$ARCH xbps-install -S -r /mnt -R "$REPO" base-system linux
XBPS_ARCH=$ARCH xbps-install -S -r /mnt -R "$REPO" base-system linux nano wget
xchroot /mnt /bin/bash
}
@ -41,7 +41,7 @@ setup_chroot() {
fi
echo "$HOSTNAME" > /etc/hostname
echo "UUID=$(blkid -s UUID -o value ${DRIVE}1) / ext4 rw,errors=remount-ro,noatime 0 1" > /etc/fstab
touch /swapfile && chattr +C /swapfile
touch /swapfile
dd if=/dev/zero of=/swapfile bs=1M count=$SWAP_SIZE status=progress
chmod 0600 /swapfile
mkswap /swapfile && swapon /swapfile