Hiddenmenu for grub2
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi, this week I made a clean debian sid install and decided to install grub2 (grub-pc) instead of -legacy. It is working nicely, great job there! Thank you!
I wanted to add the "hiddenmenu" functionality found in grub-legacy, to this end I came across the previous version of
http://grub.enbug.org/Hiddenmenu
I got carried away and did a few (3) modifications that offer support for the legacy "hiddenmenu" functionality from /etc/default/grub. the idea is that its clear and easy to turn on but its off by default.
First is /etc/grub.d/03_hiddenmenu
_________
#!/bin/sh
# This is to provide legacy "hiddenmenu" from /etc/default/grub
if [ "x${GRUB_HIDDENMENU}" = "xtrue" ]; then
cat << EOF
echo -n "Press ESC to enter the menu... "
if sleep --verbose --interruptible ${GRUB_TIMEOUT} ; then
set timeout=${GRUB_TIMEOUT}
else
set timeout=-1
fi
EOF
fi
_________
Second added this to /etc/default/grub
_________
# Uncomment to hide the menu (use 'ESC' to display) #GRUB_HIDDENMENU=true
_________
And finally added GRUB_HIDDENMENU in the optional
user defined vars in update-grub
I chose to use 03 so that nothing is shown at boot time unless there is a need for it. timeout=-1 so that there is no timeout after the menu is shown. All this can be added in 00_header to avoid setting timeout twice.
I tested this with and without graphical terminal.
How does this all look?
--
Saludos
Niko
A little amend:
Quoted 6 lines · Niko Cavallini Araya
echo -n "Press ESC to enter the menu... "
if sleep --verbose --interruptible ${GRUB_TIMEOUT} ; then
set timeout=${GRUB_TIMEOUT}
else
set timeout=-1
fi
should be:
Quoted 6 lines
echo -n "Press ESC to enter the menu... "
if sleep --verbose --interruptible ${GRUB_TIMEOUT} ; then
set timeout=0
else
set timeout=-1
fi
Signature · 2 lines
Saludos Niko