... | ... |
@@ -12,6 +12,22 @@ |
12 | 12 |
# The path to this empty disk is specified in the HDD variable in config.inc |
13 | 13 |
# End |
14 | 14 |
# |
15 |
+grub_efi_install() |
|
16 |
+{ |
|
17 |
+ mkdir $BUILDROOT/boot/efi |
|
18 |
+ mkfs.vfat /dev/sda1 |
|
19 |
+ mount -t vfat /dev/sda1 $BUILDROOT/boot/efi |
|
20 |
+ cp boot/unifont.pf2 /usr/share/grub/ |
|
21 |
+ grub2-efi-install --target=x86_64-efi --efi-directory=$BUILDROOT/boot/efi --bootloader-id=Boot --root-directory=$BUILDROOT --recheck --debug |
|
22 |
+ mv $BUILDROOT/boot/efi/EFI/Boot/grubx64.efi $BUILDROOT/boot/efi/EFI/Boot/bootx64.efi |
|
23 |
+ umount $BUILDROOT/boot/efi |
|
24 |
+} |
|
25 |
+ |
|
26 |
+grub_mbr_install() |
|
27 |
+{ |
|
28 |
+ $grubInstallCmd --force --boot-directory=$BUILDROOT/boot "$HDD" |
|
29 |
+} |
|
30 |
+ |
|
15 | 31 |
set -o errexit # exit if error...insurance ;) |
16 | 32 |
set -o nounset # exit if variable not initalized |
17 | 33 |
set +h # disable hashall |
... | ... |
@@ -45,7 +61,8 @@ echo "Unable to found grub install command" |
45 | 45 |
exit 1 |
46 | 46 |
fi |
47 | 47 |
|
48 |
-$grubInstallCmd --force --boot-directory=$BUILDROOT/boot "$HDD" |
|
48 |
+grub_mbr_install |
|
49 |
+ |
|
49 | 50 |
cp boot/unifont.pf2 ${BUILDROOT}/boot/grub2/ |
50 | 51 |
mkdir -p ${BUILDROOT}/boot/grub2/themes/photon |
51 | 52 |
cp boot/splash.tga ${BUILDROOT}/boot/grub2/themes/photon/photon.tga |