Merge pull request #143 from fhanrath/fix/nvme-drive

Fix/nvme drive
This commit is contained in:
Chris Titus 2022-01-06 11:27:07 -06:00 committed by GitHub
commit a6bf814a7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ mountallsubvol () {
mount -o noatime,compress=zstd,space_cache,commit=120,subvol=@.snapshots /dev/mapper/ROOT /mnt/.snapshots
mount -o subvol=@var /dev/mapper/ROOT /mnt/var
}
if [[ "${DISK}" == "nvme" ]]; then
if [[ "${DISK}" =~ "nvme" ]]; then
if [[ "${FS}" == "btrfs" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" ${DISK}p2
mkfs.btrfs -L ROOT ${DISK}p3 -f
@ -91,7 +91,7 @@ if [[ "${DISK}" == "nvme" ]]; then
elif [[ "${FS}" == "luks" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" ${DISK}p2
# enter luks password to cryptsetup and format root partition
echo -n "${luks_password}" | cryptsetup -y -v luksFormat ${DISK}p3 -
echo -n "${luks_password}" | cryptsetup -v luksFormat ${DISK}p3 -
# open luks container and ROOT will be place holder
echo -n "${luks_password}" | cryptsetup open ${DISK}p3 ROOT -
# now format that container
@ -118,7 +118,7 @@ else
mount -t ext4 ${DISK}3 /mnt
elif [[ "${FS}" == "luks" ]]; then
mkfs.vfat -F32 -n "EFIBOOT" ${DISK}2
echo -n "${luks_password}" | cryptsetup -y -v luksFormat ${DISK}3 -
echo -n "${luks_password}" | cryptsetup -v luksFormat ${DISK}3 -
echo -n "${luks_password}" | cryptsetup open ${DISK}3 ROOT -
mkfs.btrfs -L ROOT /dev/mapper/ROOT
mount -t btrfs /dev/mapper/ROOT /mnt