mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
Fix btrfs issue (#728)
This commit is contained in:
parent
2837f9291a
commit
dd10565d8f
|
@ -386,33 +386,36 @@ fi
|
|||
|
||||
if [[ "${FS}" == "btrfs" ]]; then
|
||||
mkfs.vfat -F32 -n "EFIBOOT" "${partition2}"
|
||||
mkfs.btrfs -L ROOT "${partition3}" -f
|
||||
mkfs.btrfs -f "${partition3}"
|
||||
mount -t btrfs "${partition3}" /mnt
|
||||
subvolumesetup
|
||||
elif [[ "${FS}" == "ext4" ]]; then
|
||||
mkfs.vfat -F32 -n "EFIBOOT" "${partition2}"
|
||||
mkfs.ext4 -L ROOT "${partition3}"
|
||||
mkfs.ext4 "${partition3}"
|
||||
mount -t ext4 "${partition3}" /mnt
|
||||
elif [[ "${FS}" == "luks" ]]; then
|
||||
mkfs.vfat -F32 -n "EFIBOOT" "${partition2}"
|
||||
mkfs.vfat -F32 "${partition2}"
|
||||
# enter luks password to cryptsetup and format root partition
|
||||
echo -n "${LUKS_PASSWORD}" | cryptsetup -y -v luksFormat "${partition3}" -
|
||||
# open luks container and ROOT will be place holder
|
||||
echo -n "${LUKS_PASSWORD}" | cryptsetup open "${partition3}" ROOT -
|
||||
# now format that container
|
||||
mkfs.btrfs -L ROOT "${partition3}"
|
||||
mkfs.btrfs "${partition3}"
|
||||
# create subvolumes for btrfs
|
||||
mount -t btrfs "${partition3}" /mnt
|
||||
subvolumesetup
|
||||
ENCRYPTED_PARTITION_UUID=$(blkid -s UUID -o value "${partition3}")
|
||||
fi
|
||||
|
||||
BOOT_UUID=$(blkid -s UUID -o value "${partition2}")
|
||||
|
||||
sync
|
||||
if ! mountpoint -q /mnt; then
|
||||
echo "ERROR! Failed to mount ${partition3} to /mnt after multiple attempts."
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p /mnt/boot/efi
|
||||
mount -t vfat -L EFIBOOT /mnt/boot/
|
||||
mount -t vfat -U "${BOOT_UUID}" /mnt/boot/
|
||||
|
||||
if ! grep -qs '/mnt' /proc/mounts; then
|
||||
echo "Drive is not mounted can not continue"
|
||||
|
@ -435,7 +438,7 @@ fi
|
|||
echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf
|
||||
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
|
||||
|
||||
genfstab -L /mnt >> /mnt/etc/fstab
|
||||
genfstab -U /mnt >> /mnt/etc/fstab
|
||||
echo "
|
||||
Generated /etc/fstab:
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue
Block a user