diff --git a/installer/default_platform.conf b/installer/default_platform.conf index 35e4fd41df..fca7754476 100755 --- a/installer/default_platform.conf +++ b/installer/default_platform.conf @@ -264,6 +264,14 @@ demo_install_grub() exit 1 } + # Create a blank environment block file. + if [ ! -f "$onie_initrd_tmp/$demo_mnt/grub/grubenv" ]; then + grub-editenv "$onie_initrd_tmp/$demo_mnt/grub/grubenv" create || { + echo "ERROR: grub-editenv failed on: $blk_dev" + exit 1 + } + fi + if [ "$demo_type" = "DIAG" ] ; then # Install GRUB in the partition also. This allows for # chainloading the DIAG image from another OS. @@ -346,6 +354,14 @@ demo_install_uefi_grub() } rm -f $grub_install_log + # Create a blank environment block file. + if [ ! -f "$demo_mnt/grub/grubenv" ]; then + grub-editenv "$demo_mnt/grub/grubenv" create || { + echo "ERROR: grub-editenv failed on: $blk_dev" + exit 1 + } + fi + # Configure EFI NVRAM Boot variables. --create also sets the # new boot number as active. grub=$(find /boot/efi/EFI/$demo_volume_label/ -name grub*.efi -exec basename {} \;)