f
This commit is contained in:
parent
739c244ec0
commit
b896cf4767
15
gentoo.sh
15
gentoo.sh
@ -38,7 +38,7 @@ ROOT_PASSWORD="123456"
|
|||||||
WIRELESS_PASSWORD='123456'
|
WIRELESS_PASSWORD='123456'
|
||||||
SSID='123456'
|
SSID='123456'
|
||||||
DISK_PASSWORD='123456'
|
DISK_PASSWORD='123456'
|
||||||
AUTO_DECRYPT='True'
|
AUTO_DECRYPT='False'
|
||||||
WIRELESS_INTERFACE='wlan0'
|
WIRELESS_INTERFACE='wlan0'
|
||||||
COMPRESSION='compress=zstd:10'
|
COMPRESSION='compress=zstd:10'
|
||||||
FLATPAKS+=()
|
FLATPAKS+=()
|
||||||
@ -105,11 +105,10 @@ decryptBoot() {
|
|||||||
echo "Adding new key......"
|
echo "Adding new key......"
|
||||||
echo
|
echo
|
||||||
printf "$DISK_PASSWORD" | cryptsetup luksAddKey $1 /boot/$KEYFILE
|
printf "$DISK_PASSWORD" | cryptsetup luksAddKey $1 /boot/$KEYFILE
|
||||||
echo "install_items+=/boot/$KEYFILE" >>/etc/dracut.conf
|
echo "install_items+=\" /boot/unlock.sh /boot/$KEYFILE \"" >>/etc/dracut.conf
|
||||||
echo "install_items+=/boot/unlock.sh" >>/etc/dracut.conf
|
sed -i "s/none/luks,\/boot\/$KEYFILE,keyscript=\/boot\/unlock.sh/" /etc/crypttab
|
||||||
sed -i "s/none/\/boot\/$KEYFILE,keyscript=\/boot\/unlock.sh/" /etc/crypttab
|
echo "#!/bin/bash" >/boot/unlock.sh
|
||||||
echo "#!/bin/bash" > /boot/unlock.sh
|
echo "cryptsetup open UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) --key-file=/boot/$KEYFILE $ROOT_MAPPER_NAME" >>/boot/unlock.sh
|
||||||
echo "cryptsetup open UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) --key-file=/boot/$KEYFILE $ROOT_MAPPER_NAME" >> /boot/unlock.sh
|
|
||||||
chmod +x /boot/unlock.sh
|
chmod +x /boot/unlock.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -910,7 +909,6 @@ bootloader() {
|
|||||||
LOADER_FILE="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
|
LOADER_FILE="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
|
||||||
PREVIOUS_LOADER_FILE="/boot/loader/entries/previous.conf"
|
PREVIOUS_LOADER_FILE="/boot/loader/entries/previous.conf"
|
||||||
clear
|
clear
|
||||||
echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) none luks" >/etc/crypttab
|
|
||||||
|
|
||||||
echo 'add_dracutmodules+=" crypt dm rootfs-block "' >/etc/dracut.conf
|
echo 'add_dracutmodules+=" crypt dm rootfs-block "' >/etc/dracut.conf
|
||||||
if [[ $SWAP_CHOICE = *y* ]]; then
|
if [[ $SWAP_CHOICE = *y* ]]; then
|
||||||
@ -920,7 +918,10 @@ bootloader() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$AUTO_DECRYPT" == "True" ]; then
|
if [ "$AUTO_DECRYPT" == "True" ]; then
|
||||||
|
echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) none" >/etc/crypttab
|
||||||
decryptBoot "${BTRFS}"
|
decryptBoot "${BTRFS}"
|
||||||
|
else
|
||||||
|
echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid -s UUID -o value ${BTRFS}) none luks" >/etc/crypttab
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /boot/$MACHINE_ID/$KERNEL_VERSION
|
mkdir -p /boot/$MACHINE_ID/$KERNEL_VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user