test
This commit is contained in:
parent
0411389bba
commit
07a0431af2
8
etc/base
8
etc/base
|
@ -45,18 +45,18 @@ if [ "${ENCRYPTION_STYLE}" == "e" ]; then
|
|||
fi
|
||||
|
||||
if [ "$EFI" == "1" ]; then
|
||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_ID}-part1)
|
||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_ID}${part}1)
|
||||
echo "UUID=${uuid} /boot/efi vfat defaults 0 0" >> /etc/fstab
|
||||
echo "efivarfs /sys/firmware/efi/efivars efivarfs defaults,nosuid,nodev,noexec 0 0" >> /etc/fstab
|
||||
fi
|
||||
|
||||
if [ "$ENCRYPTION_STYLE" == "a" ] || [ "$ENCRYPTION_STYLE" == "d" ]; then
|
||||
dd bs=1 count=64 if=/dev/urandom of=/boot/volume.key
|
||||
echo -n "${PASS}" | cryptsetup luksAddKey $TARGET_PHY_ID-part${TARGET_PART} /boot/volume.key
|
||||
echo -n "${PASS}" | cryptsetup luksAddKey $TARGET_PHY_ID${part}${TARGET_PART} /boot/volume.key
|
||||
chmod 000 /boot/volume.key
|
||||
chmod -R g-rwx,o-rwx /boot
|
||||
if [ "$ENCRYPTION_STYLE" == "a" ]; then
|
||||
echo "luks_${TARGETNAME_UNDERSCORE} $TARGET_PHY_ID-part${TARGET_PART} /boot/volume.key luks" >> /etc/crypttab
|
||||
echo "luks_${TARGETNAME_UNDERSCORE} $TARGET_PHY_ID${part}${TARGET_PART} /boot/volume.key luks" >> /etc/crypttab
|
||||
echo "install_items+=\" /boot/volume.key /etc/crypttab \"" > /etc/dracut.conf.d/10-crypt.conf
|
||||
fi
|
||||
fi
|
||||
|
@ -65,7 +65,7 @@ fi
|
|||
# echo "echo \"Disk pw is '${PASS}'\"" > /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo "read -p \"Change PW for disk? y/n \" answer" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " while ! cryptsetup luksChangeKey /dev/disk/by-id/${TARGET_PHY_ID}-part${TARGET_PART}; do" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " while ! cryptsetup luksChangeKey /dev/disk/by-id/${TARGET_PHY_ID}${part}${TARGET_PART}; do" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " echo \"Again, please\"" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " done" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
# echo " rm -rf /etc/runit/core-services/99-changepwdisk.sh" >> /etc/runit/core-services/99-changepwdisk.sh
|
||||
|
|
|
@ -13,7 +13,7 @@ config() {
|
|||
echo "GRUB_ENABLE_CRYPTODISK=y" >> /etc/default/grub
|
||||
fi
|
||||
fi
|
||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_ID}-part${TARGET_PART})
|
||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_ID}${part}${TARGET_PART})
|
||||
if ! grep -q rd.luks.uuid /etc/default/grub; then
|
||||
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.luks.uuid=${uuid} /" /etc/default/grub
|
||||
fi
|
||||
|
@ -32,7 +32,7 @@ config() {
|
|||
if [ "${EFI}" == "1" ]; then
|
||||
#VGUUID="$(vgdisplay |grep UUID|awk '{print $3}')"
|
||||
#LVUUID="$(lvdisplay "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root" |grep UUID|awk '{print $3}')"
|
||||
#rl="$(basename $(readlink "${TARGET_PHY_ID}-part${TARGET_PART}"))"
|
||||
#rl="$(basename $(readlink "${TARGET_PHY_ID}${part}${TARGET_PART}"))"
|
||||
#TMP="$(lsblk -o NAME,UUID -l|grep "${rl} " | awk '{print $2}')"
|
||||
#CRYPTUUID="${TMP//-/}"
|
||||
|
||||
|
@ -94,7 +94,7 @@ config() {
|
|||
|
||||
if [ "${EFI}" == "1" ]; then
|
||||
grub-install
|
||||
#efibootmgr --create --disk "${TARGET_PHY_ID}-part1" --loader /EFI/void/grubx64_de.efi --label "Voidlinux DE" --verbose
|
||||
#efibootmgr --create --disk "${TARGET_PHY_ID}${part}1" --loader /EFI/void/grubx64_de.efi --label "Voidlinux DE" --verbose
|
||||
else
|
||||
grub-install "${TARGET_PHY_ID}"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user