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