Ventoy Forums
[SOLVED] How to detect booted mode (UEFI vs BIOS) - Printable Version

+- Ventoy Forums (https://forums.ventoy.net)
+-- Forum: Ventoy General Use (https://forums.ventoy.net/forumdisplay.php?fid=1)
+--- Forum: Ventoy Discussion Forum (https://forums.ventoy.net/forumdisplay.php?fid=2)
+--- Thread: [SOLVED] How to detect booted mode (UEFI vs BIOS) (/showthread.php?tid=1279)



[SOLVED] How to detect booted mode (UEFI vs BIOS) - swiley43 - 10-21-2020

Hello

There is a way (a variable) to know if Ventoy pendrive booted in UEFI mode or in BIOS (legacy) mode, and to select the displayed theme : one for UEFI mode and another for BIOS mode.

Thanks


RE: How to detect booted mode (UEFI vs BIOS) - longpanda - 10-21-2020

grub_platform is a builtin variable in grub2, for legacy BIOS mode it is like: pc, for UEFI mode it is like: x86_64-efi

Currently, in the bottom left of the boot menu will display:

1.0.24 BIOS www.ventoy.net  ----> This means current is Legacy BIOS mode
1.0.24 UEFI www.ventoy.net  ----> This means current is UEFI mode


RE: How to detect booted mode (UEFI vs BIOS) - swiley43 - 10-21-2020

Thanks

How can I use this variable for changing the Ventoy theme : one BIOS theme vs UEFI theme ?


RE: How to detect booted mode (UEFI vs BIOS) - longpanda - 10-21-2020

I just support and commit it, the feature will be avaliable in the next release.


RE: How to detect booted mode (UEFI vs BIOS) - longpanda - 10-21-2020

You can use Ventoy-1.0.25


RE: How to detect booted mode (UEFI vs BIOS) - swiley43 - 10-21-2020

Thanks a lot for the job