This commit is contained in:
Your Name 2024-02-17 16:20:27 -07:00
parent 2edb271dc5
commit 8173e91a84

View File

@ -32,6 +32,7 @@ mkdir $TARGET
######################################
echo
HARD_DISK=$2
SWAP=""
######################################
USER="verita84"
USER_PASSWORD="123456"
@ -67,6 +68,7 @@ partitionDetection() {
#This is used for the installer to do script-based actions
EFI=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -1 | tail -1)
BTRFS=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -2 | tail -1)
SWAP=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -3 | tail -1)
}
partitionDetection
create-os-snapshots() {
@ -396,6 +398,7 @@ locale() {
fstab() {
mkdir $TARGET/etc
echo "UUID=$(/sbin/blkid -s UUID -o value ${EFI}) /efi vfat umask=0077 0 1" >>$TARGET/etc/fstab
echo "UUID=$(/sbin/blkid -s UUID -o value ${SWAP}) none swap 0 1" >>$TARGET/etc/fstab
echo "$BTRFS / btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@$ROOT_NAME 0 1" >>$TARGET/etc/fstab
echo "$BTRFS /.snapshots btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@.snapshots 0 1" >>$TARGET/etc/fstab
echo "$BTRFS /var/lib/libvirt btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@libvirt 0 1" >>$TARGET/etc/fstab
@ -441,8 +444,12 @@ initialize-disk() {
sleep 10
partitionDetection
echo
echo "Formatting....."
echo "Formatting Root....."
echo y | mkfs.btrfs $BTRFS --force
echo "Formatting Swap"
mkswap -f $SWAP
echo "Formatting $EFI"
echo
echo y | mkfs.vfat $EFI