Saturday 10 February 2024

How to quickly display the amount of system Total RAM under Ventoy

The easiest way to get information about the system you have booted from in Ventoy is to simply press F5 and select Hardware Information.

We could look at how Ventoy obtained this information by using the grub2 'e' for 'edit' key.

I highlighted the Hardware Information menu entry and pressed 'e' to get this screen...

Then I scrolled down until I saw the Physical RAM entry...

So it seems that a variable $grub_total_ram already exists.

I then made a \ventoy\ventoy_grub.cfg file on Partition 1 as follows:

menuentry 'Total Memory ' --class=custom {
echo $grub_total_ram MB

menuentry '<-- Return to Ventoy menu [Esc]' --class=vtoyret VTOY_RET {
echo 'Return ...'

The read command just tells grub2 to wait for me to press Enter.

This means that I can now press F6 and choose the Total Memory option to quickly display the amount of memory in the system...

No comments:

Post a Comment