commit
df8f4bedcb
|
|
@ -74,10 +74,10 @@ createsubvolumes () {
|
||||||
}
|
}
|
||||||
|
|
||||||
mountallsubvol () {
|
mountallsubvol () {
|
||||||
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@home /dev/mapper/ROOT /mnt/home
|
mount -o ${mountoptions},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 ${mountoptions},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=@.snapshots /dev/mapper/ROOT /mnt/.snapshots
|
||||||
mount -o subvol=@var /dev/mapper/ROOT /mnt/var
|
mount -o ${mountoptions},subvol=@var /dev/mapper/ROOT /mnt/var
|
||||||
}
|
}
|
||||||
if [[ "${DISK}" =~ "nvme" ]]; then
|
if [[ "${DISK}" =~ "nvme" ]]; then
|
||||||
if [[ "${FS}" == "btrfs" ]]; then
|
if [[ "${FS}" == "btrfs" ]]; then
|
||||||
|
|
@ -101,7 +101,7 @@ if [[ "${DISK}" =~ "nvme" ]]; then
|
||||||
createsubvolumes
|
createsubvolumes
|
||||||
umount /mnt
|
umount /mnt
|
||||||
# mount @ subvolume
|
# mount @ subvolume
|
||||||
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@ /dev/mapper/ROOT /mnt
|
mount -o ${mountoptions},subvol=@ /dev/mapper/ROOT /mnt
|
||||||
# make directories home, .snapshots, var, tmp
|
# make directories home, .snapshots, var, tmp
|
||||||
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
||||||
# mount subvolumes
|
# mount subvolumes
|
||||||
|
|
@ -125,7 +125,7 @@ else
|
||||||
createsubvolumes
|
createsubvolumes
|
||||||
umount /mnt
|
umount /mnt
|
||||||
# mount all the subvolumes
|
# mount all the subvolumes
|
||||||
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@ /dev/mapper/ROOT /mnt
|
mount -o ${mountoptions},subvol=@ /dev/mapper/ROOT /mnt
|
||||||
# make directories home, .snapshots, var, tmp
|
# make directories home, .snapshots, var, tmp
|
||||||
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
mkdir -p /mnt/{home,var,tmp,.snapshots}
|
||||||
# mount subvolumes
|
# mount subvolumes
|
||||||
|
|
|
||||||
18
startup.sh
18
startup.sh
|
|
@ -107,6 +107,21 @@ read -p "Your key boards layout:" keymap
|
||||||
set_option KEYMAP $keymap
|
set_option KEYMAP $keymap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
# selection for disk type
|
# selection for disk type
|
||||||
diskpart () {
|
diskpart () {
|
||||||
# show disks present on system
|
# show disks present on system
|
||||||
|
|
@ -121,6 +136,9 @@ echo -ne "
|
||||||
Please enter full path to disk: (example /dev/sda):
|
Please enter full path to disk: (example /dev/sda):
|
||||||
"
|
"
|
||||||
read option
|
read option
|
||||||
|
echo "DISK=$option" >> setup.conf
|
||||||
|
|
||||||
|
drivessd
|
||||||
set_option DISK $option
|
set_option DISK $option
|
||||||
}
|
}
|
||||||
userinfo () {
|
userinfo () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue