diff --git a/etc/bootloader/grub b/etc/bootloader/grub index 8622053..dbff363 100644 --- a/etc/bootloader/grub +++ b/etc/bootloader/grub @@ -1,16 +1,16 @@ packages() { if [ "$EFI" == "1" ]; then - addpkg grub-x86_64-efi dracut-uefi + addpkg grub-x86_64-efi else addpkg grub fi } config() { - if [ "$EFI" == "1" ]; then - grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id="Void" + if [ "${EFI}" == "1" ]; then + grub-install --bootloader-id="Void" else - grub-install $TARGET_PHY_ID + grub-install "${TARGET_PHY_ID}" fi xbps-reconfigure -fa } \ No newline at end of file diff --git a/main.sh b/main.sh index d26b54f..4c1f8b3 100644 --- a/main.sh +++ b/main.sh @@ -137,6 +137,7 @@ do_partition() { lvcreate --name root -l 100%FREE "vg_${TARGETNAME_UNDERSCORE}" mkswap -f "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap" mkfs.btrfs -f "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root" + mkswap "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-swap" mount "/dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root" "${target}" btrfs subvol create "${target}/root" btrfs subvol create "${target}/home" @@ -257,10 +258,12 @@ config reset config for file in \$(find /tmp/vinstaller/run -type f); do - header \"\$(basename \$file)\" - . \$file - config - reset config + if grep -q "config()" "\${file}"; then + header \"\$(basename \$file)\" + . \$file + config + reset config + fi done EOF