You need to load a program from GRUB with a message displayed (for example, "Hello" ).

I know that you can add a menu item to the /etc/grub.d/40_custom file. And what should I write to display a message with further loading?

    1 answer 1

    In principle, in this file ( /etc/grub.d/40_custom ) you can write everything that you need to add to the resulting configuration file grub.cfg . just do not delete (or better and not modify) the lines in this file - they are necessary for the correct operation of the script that collects the resulting grub.cfg . just add the lines you want.

    for example, menuentry ("menu item" translated from foreign).


    Example of memtest program memtest in 16-bit mode:

     menuentry "Memory test" { linux16 /memtest86+-5.01.bin } 

    so that after selecting this menu item, before launching this program, information is displayed, you can use the echo command:

     menuentry "Memory test" { echo "12345" linux16 /memtest86+-5.01.bin } 

    in this example, it is useless, since the memtest program memtest completely “redraw” the entire screen after launch. you can add the read command after echo , which will wait indefinitely for enter :

     menuentry "Memory test" { linux16 /memtest86+-5.01.bin echo "press enter to continue!" read } 
    • Thank you so much :) works :) but don’t tell me how to do the same, but the message should be output from the file on the hard disk? - user191831
    • /boot/grub/grub.cfg is the “file on the hard disk”. - aleksandr barakin