This commit is contained in:
teldra 2022-02-07 19:10:58 +01:00
parent 75ab3b6ea4
commit 983947f3b0
2 changed files with 11 additions and 8 deletions

View File

@ -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
}

11
main.sh
View File

@ -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