ask user if the install drive is a ssd and set the btrfs ssd option accordingly
remove space_cache mount option because btrfs-progs uses Free Space Tree (space_cache=v2) since version 5.15 by default. see: https://wiki.tnonline.net/w/Btrfs/Space_Cache
This commit is contained in:
parent
afbacbe3c2
commit
48dc88b0c5
|
|
@ -74,9 +74,9 @@ createsubvolumes () {
|
|||
}
|
||||
|
||||
mountallsubvol () {
|
||||
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@home /dev/mapper/ROOT /mnt/home
|
||||
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@tmp /dev/mapper/ROOT /mnt/tmp
|
||||
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@.snapshots /dev/mapper/ROOT /mnt/.snapshots
|
||||
mount -o ${mountoptions},subvol=@home /dev/mapper/ROOT /mnt/home
|
||||
mount -o ${mountoptions},subvol=@tmp /dev/mapper/ROOT /mnt/tmp
|
||||
mount -o ${mountoptions},subvol=@.snapshots /dev/mapper/ROOT /mnt/.snapshots
|
||||
mount -o subvol=@var /dev/mapper/ROOT /mnt/var
|
||||
}
|
||||
if [[ "${DISK}" == "nvme" ]]; then
|
||||
|
|
|
|||
16
startup.sh
16
startup.sh
|
|
@ -90,6 +90,20 @@ Please select key board layout from this list
|
|||
read -p "Your key boards layout:" keymap
|
||||
echo "keymap=$keymap" >> setup.conf
|
||||
}
|
||||
drivessd () {
|
||||
echo -ne "
|
||||
Is this an ssd? yes/no:
|
||||
"
|
||||
read ssd_drive
|
||||
|
||||
case $ssd_drive in
|
||||
y|Y|yes|Yes|YES)
|
||||
echo "mountoptions=noatime,compress=zstd,ssd,commit=120" >> setup.conf;;
|
||||
n|N|no|NO|No)
|
||||
echo "mountoptions=noatime,compress=zstd,commit=120" >> setup.conf;;
|
||||
*) echo "Wrong option. Try again";drivessd;;
|
||||
esac
|
||||
}
|
||||
diskpart () {
|
||||
lsblk
|
||||
echo -ne "
|
||||
|
|
@ -103,6 +117,8 @@ Please enter disk to work on: (example /dev/sda):
|
|||
"
|
||||
read option
|
||||
echo "DISK=$option" >> setup.conf
|
||||
|
||||
drivessd
|
||||
}
|
||||
userinfo () {
|
||||
echo -ne "Please enter username: "
|
||||
|
|
|
|||
Loading…
Reference in New Issue