agFM Beta12
agFM Beta10 adds a new F10 hotkey function (new hidden feature).
If you press F10 in a grubfm menu, then it will completely reload grub2.
You may find this useful if you run an ISO or some other payload file and grubfm loses the gfxmenu system and just displays a black-and-white text menu. If you then press F10 then the whole agFM boot file will be reloaded thus saving you having to reboot. Since some servers can take 5 minutes to reboot, you might find this useful.
The actual code is compiled within agFM (in global.sh), but if you are interested, you can add a menuentry to your own menu system as shown below:
hiddenentry "[F10] Reload Menu System..." --hotkey f10 --class=go-previous {
if [ "${EFI64}" = "true" ]; then
chainloader (${user})/grubfmx64.efi
fi
if [ "${EFI32}" = "true" ]; then
chainloader (${user})/EFI/BOOT/BOOTIA32.EFI
fi
if [ "${MBR}" = "true" ]; then
set cmd="map --mem (hd0,1)/e2b/grubfm.iso (0xff);map --hook;rootnoverify (0xff);chainloader (0xff);"
linux16 ${prefix}/grub.exe --config-file=$cmd
fi
grubfm "${grubfm_current_path}"
}
Note: Ctrl+F10 cannot be used because the hex key code is different between MBR and UEFI - so I have used F10 instead.
Beta12 also adds an improved SAMPLE_startup_menu.txt file. You can now have many more than 10 entries and specify an icon and hotkey for each menu entry. The sample_slack theme now has a timeout counter added so that if you use the fm.txt file for your startup menu, you will see the F1-F6 icons at the bottom and a timeout counter (if you specify a timeout).
SAMPLE_startup_menu.txt example using internal 'slack' theme. |
Example for a 64-bit ISO with icon and hotkey w
if $CPU64 ; then
set gmenu="(${bootdev},1)/_ISO/WINDOWS/WIN10/Windows10_2020_04_20_UK_Both.iso"
set gmenu_title="[W] Windows 10 Dual x64 UK (ISO)"
set gmenu_type="wininst"
make_entry nt6 w
fi
The first make_entry parameter 'nt6' is the name of the icon to use for the menu entry. The second parameter 'w' is the hotkey. Both are optional.
Load the agFM grubfm.iso from grub2
A few people have asked me how to boot to the grubfm.iso from a different version of grub2.
The grubfm.iso file does not boot nicely from a normal grub2 menu, but this can be done by using the grub4dos .exe file which is within the ISO and then using it to boot itself!
set root=loop1
set cmd="map --mem (hd0,1)/e2b/grubfm.iso (0xff);map --hook;rootnoverify (0xff);chainloader (0xff);"
linux16 /boot/grubfm/grub.exe --config-file=$cmd
This does not seem to work under Ventoy's grub2 however (the fm.loop fails to load).
initrd
(hd0,2)/e2b/grubfm.iso
Can we not just use following commands within from grub2 to boot grubfm.iso in MBR mode ?
ReplyDeleteGRUB 2
linux /loadfm
initrd /grubfm.iso
Hello Steve Master.
ReplyDeleteIt is not related to the subject. Sorry for that, I am writing here because I do not know where to write, but I will be glad if you help on this subject. When loading the first loader in Multiboot, I adjust the resolution as follows.
set gfxmode=1024x768
gfxmode=auto
terminal_output gfxterm
I set the resolution in this way, while the loader is loaded, it is set according to the resolution of the video card (1440x900), then I use a config file for grubfm, accordingly, although the resolution is 1024x768, this resolution is not activated. It starts with the resolution (1440x900) selected with the loder. How can you suggest a combination or code sample to load the resolution as 1024x768 when loading grubfm. Thank you.