You are not logged in.

#1 2015-04-25 13:17:39

Hwiparam
Member
From: Poland
Registered: 2011-09-26
Posts: 95

[SOLVED]How can I set GRUB timeout to 0 s ?

First of all I'm neither dual-booting nor using multiple kernels. What I want to do is to save 5 seconds on every boot by skipping the GRUB menu automatically and booting to Arch which is my only OS.
I've tried playing around with options in /etc/default/grub (mainly GRUB_TIMEOUT and GRUB_HIDDEN_TIMEOUT) and updating the grub.cfg according to the Wiki, but with no result so far. It still displays the menu for 5 seconds unless I press return.
Below goes my current config, believe me, I have tried with different values, commenting/uncommenting those lines according to different tips found via Google. Am I doing something wrong?

/etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="rootflags=data=writeback"
GRUB_CMDLINE_LINUX="rootflags=data=writeback"

# 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=false

# 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"

GRUB_SAVEDEFAULT=true

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
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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 {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt 
insmod ext2
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  69c58b71-e01f-4ca8-9f17-c22d4e6fd59e
else
  search --no-floppy --fs-uuid --set=root 69c58b71-e01f-4ca8-9f17-c22d4e6fd59e
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=pl_PL
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=0
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-69c58b71-e01f-4ca8-9f17-c22d4e6fd59e' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  b419f237-4f67-4bdc-84ef-e74d19542cb8
	else
	  search --no-floppy --fs-uuid --set=root b419f237-4f67-4bdc-84ef-e74d19542cb8
	fi
	echo	'Wczytywanie systemu Linux linux...'
	linux	/vmlinuz-linux root=UUID=69c58b71-e01f-4ca8-9f17-c22d4e6fd59e rw rootflags=data=writeback rootflags=data=writeback
	echo	'Wczytywanie początkowego dysku RAM...'
	initrd	 /initramfs-linux.img
}
submenu 'Opcje zaawansowane dla systemu Arch Linux' $menuentry_id_option 'gnulinux-advanced-69c58b71-e01f-4ca8-9f17-c22d4e6fd59e' {
	menuentry 'Arch Linux, za pomocą systemu Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-69c58b71-e01f-4ca8-9f17-c22d4e6fd59e' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt 
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  b419f237-4f67-4bdc-84ef-e74d19542cb8
		else
		  search --no-floppy --fs-uuid --set=root b419f237-4f67-4bdc-84ef-e74d19542cb8
		fi
		echo	'Wczytywanie systemu Linux linux...'
		linux	/vmlinuz-linux root=UUID=69c58b71-e01f-4ca8-9f17-c22d4e6fd59e rw rootflags=data=writeback rootflags=data=writeback
		echo	'Wczytywanie początkowego dysku RAM...'
		initrd	 /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-69c58b71-e01f-4ca8-9f17-c22d4e6fd59e' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt 
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  b419f237-4f67-4bdc-84ef-e74d19542cb8
		else
		  search --no-floppy --fs-uuid --set=root b419f237-4f67-4bdc-84ef-e74d19542cb8
		fi
		echo	'Wczytywanie systemu Linux linux...'
		linux	/vmlinuz-linux root=UUID=69c58b71-e01f-4ca8-9f17-c22d4e6fd59e rw rootflags=data=writeback rootflags=data=writeback
		echo	'Wczytywanie początkowego dysku RAM...'
		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/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  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###

Last edited by Hwiparam (2015-04-25 14:10:11)

Offline

#2 2015-04-25 13:53:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]How can I set GRUB timeout to 0 s ?

Offline

#3 2015-04-25 14:02:36

Hwiparam
Member
From: Poland
Registered: 2011-09-26
Posts: 95

Re: [SOLVED]How can I set GRUB timeout to 0 s ?

Done, no effect...

EDIT:

grub-mkconfig -o /boot/efi/grub/grub.cfg

This did the trick ...
Before that I created the config file in /boot/grub/grub.cfg and that's why...
roll

Last edited by Hwiparam (2015-04-25 14:15:44)

Offline

#4 2015-04-25 18:47:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]How can I set GRUB timeout to 0 s ?

Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-04-25 18:54:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]How can I set GRUB timeout to 0 s ?

You said

Hwiparam wrote:

I've tried playing around with options in /etc/default/grub (mainly GRUB_TIMEOUT and GRUB_HIDDEN_TIMEOUT) and updating the grub.cfg according to the Wiki

so I thought that's what you did.

Offline

Board footer

Powered by FluxBB