Browse code

Installer: add EFI boot entry for EFI installation

Also add haveged in ISO initrd to speed up installer load

Change-Id: Iec161108baf7033ccadd80ae0d57a062e5f855d3
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5634
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
Tested-by: Anish Swaminathan <anishs@vmware.com>

Bo Gan authored on 2018/09/08 08:16:00
Showing 2 changed files
... ...
@@ -1,9 +1,9 @@
1 1
 {   
2
-    "packages": ["glibc","zlib","filesystem","file","gmp","libgcc","libstdc++","bash","sed",
2
+    "packages": ["glibc","zlib","filesystem","file","gmp","libgcc","libstdc++","bash","sed", "haveged",
3 3
                   "bzip2","pkg-config","python3-curses","ncurses", "cracklib","cracklib-dicts","python3-cracklib",
4 4
                   "shadow","coreutils","grep","readline","findutils","xz","util-linux","e2fsprogs",
5 5
                   "libffi","expat","linux","cpio","Linux-PAM","attr","libcap", "systemd","dbus",
6 6
                   "gzip", "sqlite","nspr","nss","popt","lua","rpm","gptfdisk","tar", "librepo",
7 7
                   "hawkey", "python3","python3-libs","pcre","glib", "tdnf", "python3-requests",
8
-                  "grub2-pc", "grub2-efi", "dracut", "curl", "dosfstools"]
8
+                  "grub2-pc", "grub2-efi", "efivar", "efibootmgr", "dracut", "curl", "dosfstools"]
9 9
 }
... ...
@@ -36,9 +36,11 @@ grub_efi_install()
36 36
     if [ $(uname -m) == "aarch64" ]
37 37
     then
38 38
         cp EFI_aarch64/BOOT/* $BUILDROOT/boot/efi/EFI/Boot/
39
+        local EXE_NAME="bootaa64.efi"
39 40
     elif [ $(uname -m) == "x86_64" ]
40 41
     then
41 42
         cp EFI_x86_64/BOOT/* $BUILDROOT/boot/efi/EFI/Boot/
43
+        local EXE_NAME="bootx64.efi"
42 44
     fi
43 45
 
44 46
     mkdir -p $BUILDROOT/boot/efi/boot/grub2
... ...
@@ -46,6 +48,7 @@ grub_efi_install()
46 46
 search -n -u ${BOOT_UUID} -s
47 47
 configfile ${BOOT_DIRECTORY}grub2/grub.cfg
48 48
 EOF
49
+    efibootmgr --create --remove-dups --disk "$HDD" --part 1 --loader "/EFI/Boot/$EXE_NAME" --label Photon --verbose >&2
49 50
     umount $BUILDROOT/boot/efi
50 51
 }
51 52