Friday, 14 February 2020

agFM v1.11 now available

a1ive has made a small change so that we can have an initial boot menu on booting the agFM.

This means it is possible to set a default menu item + timeout.

Here is a sample menu which offers three menu choices and will default to select a Windows 10 ISO on timeout...



To configure your own menu, rename the \boot\grubfm\SAMPLE_startup_menu.txt file to startup_menu.txt.

Here is the contents of the sample menu...

\boot\grubfm\startup_menu.txt


#Rename to startup_menu.txt to be active.
#Displays up to five menu options (uncomment lines and change paths as required).
#Menu items are only listed if the file exists.
#type can be e2biso to boot immediately using partnew or wininst for Windows Install ISO or do not set a type to allow user choice from menu.
#for .cfg and .imgptn files, do not set a type and they will auto-run.

set timeout=5;
set default=0;

set grubfm0=(hd0,msdos1)/_ISO/WINDOWS/WIN10/Windows10_1909_x64_English_MS.iso
set grubfm0_title="Windows 10 64-bit English"
set grubfm0_type="wininst"

set grubfm1=(hd0,msdos1)/_ISO/LINUX/ubuntu-18.04.3-desktop-amd64.iso
set grubfm1_title="Ubuntu 64-bit 18.04.2"
set grubfm1_type="e2biso"

set grubfm2=(${user})/RESTORE_E2B.cfg
set grubfm2_title="Restore E2B partitions"
set grubfm2_type=""

#set grubfm3=(hd0,msdos1)/_ISO/MAINMENU/xxx
#set grubfm3_title="title"
#set grubfm3_type="e2biso"

#set grubfm4=(hd0,msdos1)/_ISO/MAINMENU/xxx
#set grubfm4_title="title"
#set grubfm4_type="e2biso"

# === DO NOT ALTER BELOW HERE ===

if [ -f "${grubfm0}" ] ; then 
menuentry "${grubfm0_title}" {
set grubfm_file="${grubfm0}"
if [ "${grubfm0_type}" = "wininst" ] ; then configfile (${user})/boot/grubfm/rules/iso/win.sh ; fi
if [ "${grubfm0_type}" = "e2biso" ]  ; then configfile (${user})/boot/grubfm/rules/iso/e2b.sh ; fi
if [ "${grubfm0_type}" = "" ]        ; then grubfm_open ${grubfm0} ; fi
}
fi
if [ -f "${grubfm1}" ] ; then 
menuentry "${grubfm1_title}" {
set grubfm_file="${grubfm1}"
if [ "${grubfm1_type}" = "wininst" ] ; then configfile (${user})/boot/grubfm/rules/iso/win.sh ; fi
if [ "${grubfm1_type}" = "e2biso" ]  ; then configfile (${user})/boot/grubfm/rules/iso/e2b.sh ; fi
if [ "${grubfm1_type}" = "" ]        ; then grubfm_open ${grubfm1} ; fi
}
fi

if [ -f "${grubfm2}" ] ; then 
menuentry "${grubfm2_title}" {
set grubfm_file="${grubfm2}"
if [ "${grubfm2_type}" = "wininst" ] ; then configfile (${user})/boot/grubfm/rules/iso/win.sh ; fi
if [ "${grubfm2_type}" = "e2biso" ]  ; then configfile (${user})/boot/grubfm/rules/iso/e2b.sh ; fi
if [ "${grubfm2_type}" = "" ]        ; then grubfm_open ${grubfm2} ; fi
}
fi
if [ -f "${grubfm3}" ] ; then 
menuentry "${grubfm3_title}" {
set grubfm_file="${grubfm3}"
if [ "${grubfm3_type}" = "wininst" ] ; then configfile (${user})/boot/grubfm/rules/iso/win.sh ; fi
if [ "${grubfm3_type}" = "e2biso" ]  ; then configfile (${user})/boot/grubfm/rules/iso/e2b.sh ; fi
if [ "${grubfm3_type}" = "" ]        ; then grubfm_open ${grubfm3} ; fi
}
fi
if [ -f "${grubfm4}" ] ; then 
menuentry "${grubfm4_title}" {
set grubfm_file="${grubfm4}"
if [ "${grubfm4_type}" = "wininst" ] ; then configfile (${user})/boot/grubfm/rules/iso/win.sh ; fi
if [ "${grubfm4_type}" = "e2biso" ]  ; then configfile (${user})/boot/grubfm/rules/iso/e2b.sh ; fi
if [ "${grubfm4_type}" = "" ]        ; then grubfm_open ${grubfm4} ; fi
}
fi

menuentry "a1ive grub2 File Manager" {
  grubfm
}


I have arranged it so that it will directly boot to non- Windows Install ISOs using partnew. If you specify a .imgPTN* or .cfg file then that will also directly boot. However, if you set the type as wininst then you will need to select an XML file (or none) before it will boot to Windows Setup.

Note that the Restore E2B partition menu entry is optional, you would only use it after you have switched in a .imgPTN file and rebooted.

Secure Boot hole now patched!

It seems that in a very recent update, Microsoft have hastily patched the security hole which allowed us to Secure UEFI-boot to agFM and then boot to Windows from the EFI bootx64.efi Windows boot file. So after switching in a Windows .imgPTN file, you will need to Secure boot directly from that first partition containing Windows and avoid booting to agFM.

On some UEFI BIOSes this is tricky because these BIOSes don't list which partition they are going to boot from in the pop-up boot menu! My Asus Z87 BIOS lists the USB device twice with two identical entries - one entry for each partition, but it is pot-luck which is which!

The alternative is to set the UEFI BIOS boot option to 'Other OS' rather than 'Microsoft OS only'.

No comments:

Post a Comment