--- /dev/null
+#!/bin/bash
+
+DISK=$(cat /root/instantARCH/config/disk)
+mkdir /efi
+mount "${DISK}1" /efi
+
+sudo pacman -S efibootmgr grub --noconfirm
+
+grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
#!/bin/bash
+echo "installing grub for legacy bios"
grub-install --target=i386-pc "$(cat /root/instantARCH/config/disk)" --root /mnt
${DISK}1 : start= 4096, size= 614400, type=ef
${DISK}2: start=618496, type=83, bootable" | sfdisk "${DISK}"
- mkfs.fat32 -F ${DISK}1
+ mkfs.fat -F32 ${DISK}1
mkfs.ext4 -F ${DISK}2
else
chrootscript "lang/timezone"
# grub: install package, install, generate config
-escript bootloader/install
+if efibootmgr; then
+ chrootscript "bootloader/efi"
+else
+ escript bootloader/install
+fi
chrootscript "user/user" &&
chrootscript "network/network" &&