progress
This commit is contained in:
parent
e5105d18b7
commit
a0827230ed
21
etc/base
21
etc/base
|
@ -15,7 +15,7 @@ fi
|
||||||
xbps-reconfigure -f glibc-locales
|
xbps-reconfigure -f glibc-locales
|
||||||
echo "GRUB_ENABLE_CRYPTODISK=y" >> /etc/default/grub
|
echo "GRUB_ENABLE_CRYPTODISK=y" >> /etc/default/grub
|
||||||
|
|
||||||
cat <<EOF > ${target}/etc/fstab
|
cat <<EOF > /etc/fstab
|
||||||
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
||||||
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root / btrfs defaults,subvol=root 0 0
|
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root / btrfs defaults,subvol=root 0 0
|
||||||
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root /home btrfs defaults,subvol=home 0 0
|
/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root /home btrfs defaults,subvol=home 0 0
|
||||||
|
@ -23,10 +23,23 @@ tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$EFI" == "1" ]; then
|
if [ "$EFI" == "1" ]; then
|
||||||
echo "${TARGET_PHY_WWN}-part1 /boot/efi vfat defaults 0 0" >> ${target}/etc/fstab
|
echo "${TARGET_PHY_WWN}-part1 /boot/efi vfat defaults 0 0" >> /etc/fstab
|
||||||
fi
|
fi
|
||||||
|
|
||||||
uuid=$(blkid -o value -s UUID ${TARGET_PHY_WWN}-part${TARGET_PART})
|
uuid=$(blkid -o value -s UUID ${TARGET_PHY_WWN}-part${TARGET_PART})
|
||||||
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.luks.uuid=${uuid} /" ${target}/etc/default/grub
|
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.luks.uuid=${uuid} /" /etc/default/grub
|
||||||
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.lvm.vg=vg_${TARGETNAME_UNDERSCORE} /" ${target}/etc/default/grub
|
sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\"rd.lvm.vg=vg_${TARGETNAME_UNDERSCORE} /" /etc/default/grub
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$ENCRYPTION_STYLE" == "a" ] || [ "$ENCRYPTION_STYLE" == "d" ]; then
|
||||||
|
dd bs=1 count=64 if=/dev/urandom of=/boot/volume.key
|
||||||
|
cryptsetup luksAddKey $TARGET_PHY_WWN-part${TARGET_PART} /boot/volume.key
|
||||||
|
chmod 000 /boot/volume.key
|
||||||
|
chmod -R g-rwx,o-rwx /boot
|
||||||
|
echo "luks_${TARGETNAME_UNDERSCORE} $TARGET_PHY_WWN-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
|
||||||
|
|
||||||
|
grub-install $TARGET_PHY_WWN
|
||||||
|
xbps-reconfigure -fa
|
||||||
}
|
}
|
2
main.sh
2
main.sh
|
@ -250,7 +250,7 @@ for file in \$(find /tmp/vinstaller/run -type f); do
|
||||||
config
|
config
|
||||||
done
|
done
|
||||||
EOF
|
EOF
|
||||||
chmod +x /tmp/vinstaller/main_chroot
|
chmod +x ${target}/tmp/vinstaller/main_chroot
|
||||||
chroot ${target} /tmp/vinstaller/main_chroot
|
chroot ${target} /tmp/vinstaller/main_chroot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user