You are not logged in.

#1 2018-10-10 11:54:54

rogerthat
Member
Registered: 2016-11-15
Posts: 56

GRUB boot menu configuration bug... impossible to display menu

Hello. Hope this is the right subgroup to post in. Seems to be an issue with GNU GRUB configuration or bug.

Below, are the etc/default/grub and boot/grub/grub.cfg files on my system. GRUB version is 2.02.

Althought I have configured the boot menu timout to 5 seconds, the boot menu only flashes on screen briefly for 3/100ths of a second and disappears.
I have also tried with GRUB_TIMEOUT=-1, and all sorts of combinations of configuration changes. Nothing does anything to get the boot menu to actually stay on the screen.
I have used a burst frame camera to take a picture of the screen that displays and to time how long it is present.

(EDIT: I originally reported this for GRUB v2.02~rc2, but I have since upgraded to v2.02 with no change.)

/etc/default/grub ::

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
#ALSO TRIED WITH: GRUB_TIMEOUT=-1
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda5:cryptroot root=/dev/mapper/cryptroot crypto=sha512:aes-xts-plain64:512:0:"
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#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"

# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

/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
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 loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
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-d9b29f82-0f88-48e8-97fd-98567f8449f5' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  24d7cf20-7239-476e-8144-8fa204bea41f
	else
	  search --no-floppy --fs-uuid --set=root 24d7cf20-7239-476e-8144-8fa204bea41f
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=d9b29f82-0f88-48e8-97fd-98567f8449f5 rw cryptdevice=/dev/sda5:cryptroot root=/dev/mapper/cryptroot crypto=sha512:aes-xts-plain64:512:0: quiet loglevel=3
	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-d9b29f82-0f88-48e8-97fd-98567f8449f5' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-d9b29f82-0f88-48e8-97fd-98567f8449f5' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  24d7cf20-7239-476e-8144-8fa204bea41f
		else
		  search --no-floppy --fs-uuid --set=root 24d7cf20-7239-476e-8144-8fa204bea41f
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=d9b29f82-0f88-48e8-97fd-98567f8449f5 rw cryptdevice=/dev/sda5:cryptroot root=/dev/mapper/cryptroot crypto=sha512:aes-xts-plain64:512:0: quiet loglevel=3
		echo	'Loading initial ramdisk ...'
		initrd	/intel-ucode.img /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-d9b29f82-0f88-48e8-97fd-98567f8449f5' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  24d7cf20-7239-476e-8144-8fa204bea41f
		else
		  search --no-floppy --fs-uuid --set=root 24d7cf20-7239-476e-8144-8fa204bea41f
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=d9b29f82-0f88-48e8-97fd-98567f8449f5 rw cryptdevice=/dev/sda5:cryptroot root=/dev/mapper/cryptroot crypto=sha512:aes-xts-plain64:512:0: quiet loglevel=3
		echo	'Loading initial ramdisk ...'
		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.
menuentry "System restart" {
	echo "System rebooting..."
	reboot
}
menuentry "System shutdown" {
	echo "System shutting down..."
	halt
}
### 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 ###

First screen in boot process:
1.jpg

The boot menu that displays for 3/100ths of a second:
2.jpg

Then, it quickly proceeds to:
3.jpg

Last edited by rogerthat (2018-10-11 12:27:10)

Offline

#2 2018-10-10 12:32:43

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: GRUB boot menu configuration bug... impossible to display menu

What if you keep a key (eg. arrow down) pressed? (Theory would be spurious input, in particular o fthe enter key - the timeout is there and acknowledged by grub)

Offline

#3 2018-10-10 13:36:13

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: GRUB boot menu configuration bug... impossible to display menu

Thanks for the suggestion, Seth.

Immediately after entering the BIOS boot password, I tried holding down: down-arrow, Esc, left-shift, and right-shift.
Nothing made the boot menu linger.

I also tried a few times booting while pressing the down-arrow as fast as I could.

Still the boot menu just flashed by.

Wonder why I'm on 2.02~rc2 when I see on the GRUB website 2.02 is out. Would an upgrade help?

Last edited by rogerthat (2018-10-10 16:31:59)

Offline

#4 2018-10-10 13:40:51

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: GRUB boot menu configuration bug... impossible to display menu

Arch ships grub 2.0.2 since late April, see https://git.archlinux.org/svntogit/pack … b6531d5a09

Unless you didn't update since half a year, you probably never ran grub-install since then?

(The keyboard idea was btw. to boot a different entry, but that doesn't seem to be the case)

Offline

#5 2018-10-10 13:47:46

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: GRUB boot menu configuration bug... impossible to display menu

OK. So I ran grub-install and upgraded to 2.02 and reran grub-mkconfig.
The boot menu still disappears; the only difference is it now says version 2.02 when it flashes briefly on screen.

Last edited by rogerthat (2018-10-10 16:32:21)

Offline

#6 2018-10-10 22:36:51

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: GRUB boot menu configuration bug... impossible to display menu

Supposing GRUB simply somehow gets the time wrong, I'd try to change the timeout to either some very high value or -1 to disable automatic selection.

Also, to test seth's assumption regarding the enter key, you could disable the menu, by just uncommenting any menuentry or submenu in grub.cfg.  You will then be dropped in to a command line interface.  You might want to put the default menuentry's content into a function.

Also, there is sendkey [0] which could possibly be used to emulate arrow keys.


[0] https://www.gnu.org/software/grub/manua … ndkey.html

Offline

#7 2018-10-10 22:41:35

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: GRUB boot menu configuration bug... impossible to display menu

Thank you.

Yes, I tried timeout of -1, and it didn't even stop then either!

I didn't understand what you said about uncommenting any menuentry...?

Offline

#8 2018-10-10 23:04:35

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: GRUB boot menu configuration bug... impossible to display menu

Well, this suggests that actually grub got the time wrong somehow.  If you wanted to verify, you could set a very high value, e.g. 5 * 1000 / 3 =~ 1666.  Assuming there is a linear shift, this should be roughly equivalent to a timeout of 5 seconds.

By uncommenting (probably it's rather commenting), I mean to put a `#' at any line in the `/etc/grub.d/10_linux' section (Also on might just remove it, since it's autogenerated anyways).  This would prevent grub from loading the menu and hence prevent the enter key from triggering the boot process.  But since the problem is apparently not related to the enter key, there is no longer any point in trying that.

EDIT:  Also, in the console (reachable by pressing `c' in the GRUB menu) you could try the sleep command with various values.

Last edited by respiranto (2018-10-10 23:09:11)

Offline

#9 2018-10-11 12:35:01

rogerthat
Member
Registered: 2016-11-15
Posts: 56

Re: GRUB boot menu configuration bug... impossible to display menu

Thanks for the ideas, respiranto...

respiranto wrote:

Well, this suggests that actually grub got the time wrong somehow.

A value of -1 should be an infinite timeout. And since the boot menu still disappears instantly, I don't see the logic here that would point to grub getting the timeout wrong?

respiranto wrote:

If you wanted to verify, you could set a very high value, e.g. 5 * 1000 / 3 =~ 1666.  Assuming there is a linear shift, this should be roughly equivalent to a timeout of 5 seconds.

Anything is worth a try. I put the timeout to 50000, and still the menu disappeared instantly.

respiranto wrote:

Also, in the console (reachable by pressing `c' in the GRUB menu) you could try the sleep command with various values.

I cannot interact with the GRUB menu. ;-) That's my problem.

Last edited by rogerthat (2018-10-11 12:35:30)

Offline

#10 2018-10-11 15:44:50

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: GRUB boot menu configuration bug... impossible to display menu

What if you garble the Archlinux entry, ie. eg. change "24d7cf20-7239-476e-8144-8fa204bea41f" to "24d7cf20-7239-476e-8144-8fa204bea410" (only the last f -> 0)

BE WARNED! That this could prevent you from booting if grub doesn't throw you into a shell or the keyboard doesn't work there, so be sure to have a usb key around to boot from and undo this change if required.

Offline

#11 2018-10-11 22:51:59

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: GRUB boot menu configuration bug... impossible to display menu

rogerthat wrote:

A value of -1 should be an infinite timeout. And since the boot menu still disappears instantly, I don't see the logic here that would point to grub getting the timeout wrong?

Sorry, I appear to have inverted your statement in my head, hence completetly misunderstood you.  Disregard what I said in my last post.


Still, I'd suggest to disable the menu.  You could also simply delete the grub.cfg (or rather rename it to something else).  You should then be dropped to GRUB's CLI.  If the enter key is the problem, you should notice then.
Though be warned here as well:  This might prevent you from booting the machine.

Offline

Board footer

Powered by FluxBB