s
This commit is contained in:
parent
da50cdb3fe
commit
8257e62c42
@ -68,9 +68,10 @@ MASKED_PACKAGES+=(media-video/obs-studio media-video/ffmpeg net-im/element-deskt
|
|||||||
partitionDetection() {
|
partitionDetection() {
|
||||||
#This is used for the installer to do script-based actions
|
#This is used for the installer to do script-based actions
|
||||||
EFI=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -1 | tail -1)
|
EFI=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -1 | tail -1)
|
||||||
SWAP=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -2 | tail -1)
|
#SWAP=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -2 | tail -1)
|
||||||
BTRFS=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -3 | tail -1)
|
BTRFS=$(blkid | grep $HARD_DISK | sort | cut -d ":" -f1 | head -2 | tail -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
partitionDetection
|
partitionDetection
|
||||||
|
|
||||||
create-os-snapshots() {
|
create-os-snapshots() {
|
||||||
@ -422,7 +423,7 @@ locale() {
|
|||||||
fstab() {
|
fstab() {
|
||||||
mkdir $TARGET/etc
|
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 ${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 "UUID=$(/sbin/blkid -s UUID -o value ${SWAP}) none swap 0 1" >>$TARGET/etc/fstab
|
||||||
echo "UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) / btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@$ROOT_NAME 0 1" >>$TARGET/etc/fstab
|
echo "UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) / btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@$ROOT_NAME 0 1" >>$TARGET/etc/fstab
|
||||||
echo "UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) /.snapshots btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@.snapshots 0 1" >>$TARGET/etc/fstab
|
echo "UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) /.snapshots btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@.snapshots 0 1" >>$TARGET/etc/fstab
|
||||||
echo "UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) /var/lib/libvirt btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@libvirt 0 1" >>$TARGET/etc/fstab
|
echo "UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) /var/lib/libvirt btrfs noatime,nodiratime,autodefrag,$COMPRESSION,subvol=@libvirt 0 1" >>$TARGET/etc/fstab
|
||||||
@ -462,21 +463,21 @@ btrfs-tweaks() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initialize-disk() {
|
initialize-disk() {
|
||||||
SWAP_SIZE=$(expr $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g' | sed 's/kB//') / 1000 / 1000)
|
#SWAP_SIZE=$(expr $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g' | sed 's/kB//') / 1000 / 1000)
|
||||||
SWAP_SIZE_END="$(expr $SWAP_SIZE + $ROOT_PARTITION_SIZE)"
|
#SWAP_SIZE_END="$(expr $SWAP_SIZE + $ROOT_PARTITION_SIZE)"
|
||||||
parted /dev/$HARD_DISK mklabel gpt
|
parted /dev/$HARD_DISK mklabel gpt
|
||||||
parted -a optimal /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB
|
parted -a optimal /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB
|
||||||
parted -a optimal /dev/$HARD_DISK mkpart swap ext3 200MiB ${SWAP_SIZE_END}GB
|
parted -a optimal /dev/$HARD_DISK mkpart root ext3 200MiB 100%
|
||||||
|
#parted -a optimal /dev/$HARD_DISK mkpart swap ext3 200MiB ${SWAP_SIZE_END}GB
|
||||||
parted -a optimal /dev/$HARD_DISK set 1 esp on
|
parted -a optimal /dev/$HARD_DISK set 1 esp on
|
||||||
parted -a optimal /dev/$HARD_DISK mkpart root ext3 ${SWAP_SIZE_END}GB 100%
|
#parted -a optimal /dev/$HARD_DISK mkpart root ext3 ${SWAP_SIZE_END}GB 100%
|
||||||
sleep 10
|
|
||||||
partitionDetection
|
partitionDetection
|
||||||
echo
|
echo
|
||||||
echo "Formatting Root....."
|
echo "Formatting Root....."
|
||||||
echo y | mkfs.btrfs $BTRFS --force
|
echo y | mkfs.btrfs $BTRFS --force
|
||||||
|
|
||||||
echo "Formatting Swap"
|
#echo "Formatting Swap"
|
||||||
mkswap -f $SWAP
|
#mkswap -f $SWAP
|
||||||
|
|
||||||
echo "Formatting $EFI"
|
echo "Formatting $EFI"
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user