You are not logged in.
Hi there,
i just installed grub2 and edited /etc/default/grub like this:
GRUB_DEFAULT=0
#GRUB_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT=4
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR="Arch Linux"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="quiet loglevel=3 logo.nologo console=tty1 splash=silent,fadein,fadeout,theme:arch-black"
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
but instead of just booting the first entry, grub waits 4 sec and then displays the normal grub menu. What i want is that the grub menu is not displayed at all, unless i press the shift key during that 4 seconds period in GRUB_HIDDEN_TIMEOUT=4. What am i doing wrong?
Thanks in advance,
RobertBuhren
PS: Yes i executed "grub-mkconfig -o /boot/grub/grub.cfg" after each change to /etc/default/grub
Last edited by RobertBuhren (2011-09-07 16:21:34)
Offline
set
GRUB_TIMEOUT=0
The grub2 hiddenmenu first hides the menu for <GRUB_HIDDEN_TIMEOUT> seconds (it displays the hidden timeout countdoen if <GRUB_HIDDEN_TIMEOUT_QUIET> is not enabled) and then displayes the menu for <GRUB_TIMEOUT> and then boots to the default entry.
My new forum user/nick name is "the.ridikulus.rat" .
Offline
Thanks skodabenz for the quick answer. I changed GRUB_TIMEOUT=0 but still it is not quite working the way i wanted. There are still the messages like "Loading Grub" etc. how to i get rid of these? Actually i want my bootloader to print nothing on the screen. It should only by visible when i`m pressing a button during startup. Also with GRUB_TIMEOUT=0 i can`t access the grub menu anymore (i tried pressing the "shift" and the escape button during startup).
Thanks in advance,
RobertBuhren
Offline
Thanks skodabenz for the quick answer. I changed GRUB_TIMEOUT=0 but still it is not quite working the way i wanted. There are still the messages like "Loading Grub" etc. how to i get rid of these? Actually i want my bootloader to print nothing on the screen. It should only by visible when i`m pressing a button during startup.
You can't stop "Loading GRUB" from disappearing. That message comes even before the grub.cfg is parsed by grub2.
Also with GRUB_TIMEOUT=0 i can`t access the grub menu anymore (i tried pressing the "shift" and the escape button during startup).
For me "Shift" does not work, but "Esc" works. can you post th generated grub.cfg?
My new forum user/nick name is "the.ridikulus.rat" .
Offline
Sure:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue
insmod part_gpt
insmod ext2
set root='(hd0,gpt4)'
search --no-floppy --fs-uuid --set=root daccc002-7655-4acd-8988-bb507e6b84fc
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 52b2abb9-e095-4af2-bf8d-e0938c1bcb83
set locale_dir=($root)/grub/locale
set lang=de_DE
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if sleep --interruptible 0 ; then
set timeout=0
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, mit Linux linux' --class archlinux --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 52b2abb9-e095-4af2-bf8d-e0938c1bcb83
echo 'Linux linux wird geladen …'
linux /vmlinuz-linux root=UUID=daccc002-7655-4acd-8988-bb507e6b84fc ro quiet loglevel=3 logo.nologo console=tty1 splash=silent,fadein,fadeout,theme:arch-black
echo 'Initiale Ramdisk wird geladen …'
initrd /initramfs-linux.img
}
menuentry 'Arch Linux, mit Linux linux Fallback' --class archlinux --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 52b2abb9-e095-4af2-bf8d-e0938c1bcb83
echo 'Linux linux wird geladen …'
linux /vmlinuz-linux root=UUID=daccc002-7655-4acd-8988-bb507e6b84fc ro quiet loglevel=3 logo.nologo console=tty1 splash=silent,fadein,fadeout,theme:arch-black
echo 'Initiale Ramdisk wird geladen …'
initrd /initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
greetz,
robert
Offline
In grub.cfg the code should be like
if sleep --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=${GRUB_TIMEOUT}
fi
In your grub.cfg instead of
if sleep --interruptible 4 ; then
set timeout=0
fi
it is
if sleep --interruptible 0 ; then
set timeout=0
fi
I don't know what is the exact cause of this bug though.
My new forum user/nick name is "the.ridikulus.rat" .
Offline
Sorry i posted a wrong version of my grub.cfg I tried too many different settings. Here are my current configs:
/etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT=1
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR="Arch Linux"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="quiet loglevel=3 logo.nologo console=tty1 splash=silent,fadein,fadeout,theme:arch-black"
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
and the correspondig /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
set menu_color_normal=light-blue/black
set menu_color_highlight=light-cyan/blue
insmod part_gpt
insmod ext2
set root='(hd0,gpt4)'
search --no-floppy --fs-uuid --set=root daccc002-7655-4acd-8988-bb507e6b84fc
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 52b2abb9-e095-4af2-bf8d-e0938c1bcb83
set locale_dir=($root)/grub/locale
set lang=de_DE
insmod gettext
fi
terminal_input console
terminal_output gfxterm
if sleep --interruptible 1 ; then
set timeout=0
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, mit Linux linux' --class archlinux --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 52b2abb9-e095-4af2-bf8d-e0938c1bcb83
echo 'Linux linux wird geladen …'
linux /vmlinuz-linux root=UUID=daccc002-7655-4acd-8988-bb507e6b84fc ro quiet loglevel=3 logo.nologo console=tty1 splash=silent,fadein,fadeout,theme:arch-black
echo 'Initiale Ramdisk wird geladen …'
initrd /initramfs-linux.img
}
menuentry 'Arch Linux, mit Linux linux Fallback' --class archlinux --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='(hd0,gpt2)'
search --no-floppy --fs-uuid --set=root 52b2abb9-e095-4af2-bf8d-e0938c1bcb83
echo 'Linux linux wird geladen …'
linux /vmlinuz-linux root=UUID=daccc002-7655-4acd-8988-bb507e6b84fc ro quiet loglevel=3 logo.nologo console=tty1 splash=silent,fadein,fadeout,theme:arch-black
echo 'Initiale Ramdisk wird geladen …'
initrd /initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
I`m now able to enter the grub menu by pressing escape. Although this is not the best solution for me because it adds an unnecessary delay to the boot process (ok 1sek isn`t much but still ) Is there a way to get rid of the "echo" statements in the grub.cfg? I think editing the grub.cfg itself is not a good idea.
greetz,
Robert
Offline
Is there a way to get rid of the "echo" statements in the grub.cfg? I think editing the grub.cfg itself is not a good idea.
You should ask that in grub-devel mailing list or #grub in irc freenode. Anyway for now mark the thread as [SOLVED].
My new forum user/nick name is "the.ridikulus.rat" .
Offline