Add filesystem formatting
This commit is contained in:
parent
b3646ce2b3
commit
95e09bcb32
1 changed files with 30 additions and 0 deletions
|
@ -51,6 +51,32 @@ function create_luks() {
|
||||||
${cmd} cryptsetup luksOpen "$RootPart" luksvol
|
${cmd} cryptsetup luksOpen "$RootPart" luksvol
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function prepare_format() {
|
||||||
|
if [[ "$DEBUG" ]]; then
|
||||||
|
local cmd="echo"
|
||||||
|
else
|
||||||
|
local cmd=""
|
||||||
|
echo "WARNING: Not in Debug mode, exiting now"
|
||||||
|
exit 254
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Formatting EFI: $EFIPart"
|
||||||
|
${cmd} mkfs.fat -F32 -n "EFI" "$EFIPart"
|
||||||
|
|
||||||
|
if [[ "$BootPart" != "@boot" ]]; then
|
||||||
|
echo "Formatting Boot: $BootPart"
|
||||||
|
${cmd} mkfs.ext4 -FF -L boot "$BootPart"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$ENCRYPTION" ]]; then
|
||||||
|
echo "Formatting Root: /dev/mapper/luksvol"
|
||||||
|
${cmd} mkfs.btrfs -L root /dev/mapper/luksvol
|
||||||
|
else
|
||||||
|
echo "Formatting Root: $RootPart"
|
||||||
|
${cmd} mkfs.btrfs -L root "$RootPart"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function create_subvolumes() {
|
function create_subvolumes() {
|
||||||
local -a subvols=("@")
|
local -a subvols=("@")
|
||||||
|
|
||||||
|
@ -205,6 +231,10 @@ function install_normal() {
|
||||||
create_luks
|
create_luks
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Formatting Filesystems..."
|
||||||
|
prepare_format
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Preparing Subvolumes..."
|
echo "Preparing Subvolumes..."
|
||||||
create_subvolumes
|
create_subvolumes
|
||||||
|
|
Loading…
Reference in a new issue