From f605281f9ced3344c29f97d0efc78465a4ff12ed Mon Sep 17 00:00:00 2001 From: teldra Date: Wed, 9 Feb 2022 13:17:24 +0100 Subject: [PATCH] progress --- etc/bootloader/grub | 21 +++++++++++++++++++++ main.sh | 6 ++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/etc/bootloader/grub b/etc/bootloader/grub index aa21ab0..7f54954 100644 --- a/etc/bootloader/grub +++ b/etc/bootloader/grub @@ -27,6 +27,27 @@ config() { fi if ! [ "${KEY_LANG}" == "en" ]; then + VGUUID=$(vgdisplay |grep UUID|awk '{print $3}') + LVUUID=$(lvdisplay ${TARGETNAME_UNDERSCORE}-root |grep UUID|awk '{print $3}') + rl=$(basename $(readlink "${TARGET_PHY_ID}-part${TARGET_PART}")) + TMP=$(lsblk -o NAME,UUID -l|grep "${rl}" | awk '{print $2}') + CRYPTUUID=${TMP//-/} + grub-kbdcomp -o ${KEY_LANG}.gkb ${KEY_LANG} + tar cf memdisk.tar ${KEY_LANG}.gkb + + echo "set root=(memdisk)" >> /boot/grub/early-grub.cfg + echo "set prefix=($root)/" >> /boot/grub/early-grub.cfg + echo "terminal_input at_keyboard" >> /boot/grub/early-grub.cfg + echo "keymap /dvorak.gkb" >> /boot/grub/early-grub.cfg + echo "cryptomount -u 1234abcdef1234abcdef1234abcdef" >> /boot/grub/early-grub.cfg + echo "set root='cryptouuid/1234abcdef1234abcdef1234abcdef'" >> /boot/grub/early-grub.cfg + echo "set prefix=($root)/grub" >> /boot/grub/early-grub.cfg + echo "configfile grub.cfg" >> /boot/grub/early-grub.cfg + + grub-mkimage -c /boot/grub/early-grub.cfg -o grubx64.efi -O x86_64-efi -m memdisk.tar memdisk tar at_keyboard keylayouts configfile + cp -f grubx64.efi /boot/efi/EFI/void/grubx64.efi + + rm -rf grubx64.efi memdisk.tar ${KEY_LANG}.gkb if ! grep -q rd.console.keymap /etc/default/grub; then sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT/s/=\"/=\" rd.vconsole.keymap=${L2} /" /etc/default/grub fi diff --git a/main.sh b/main.sh index f529c70..8eeb309 100755 --- a/main.sh +++ b/main.sh @@ -254,8 +254,7 @@ do_install() { echo "ignorepkg=${i}" >> "${target}/etc/xbps.d/10-ignore-pkg.conf" done if [ "${DEBUG}" -ge "1" ]; then - echo_vars - read + xbps-install -S -R https://alpha.de.repo.voidlinux.org/current -r "${target}" "${pkgs[@]}" else xbps-install -Sy -R https://alpha.de.repo.voidlinux.org/current -r "${target}" "${pkgs[@]}" @@ -386,6 +385,9 @@ network printing header "Do installation" +if [ "${DEBUG}" -ge "1" ]; then + echo_vars +fi if ! yesno "Do you really wanna install?" n; then exit fi