You are not logged in.

#1 2020-06-03 15:04:13

stefano
Member
Registered: 2011-04-09
Posts: 194

Can't see GRUB menu [SOLVED]

I have added two new additional kernels (rt, and lts) to my installation, but I can't get to them because GRUB won't show me the menu at boot.
All I see is the black screen, I wait the required 5 seconds timeout, and then the first kernel in the grub.cfg starts to boot.

I can't quite figure out what's wrong---are there parameters to hide the menu? I could not find any such in the wiki GRUB page.

Here is my 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,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,gpt2' --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  ef03e6df-150b-477f-823b-3e62ec120ac2
else
  search --no-floppy --fs-uuid --set=root ef03e6df-150b-477f-823b-3e62ec120ac2
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=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-ef03e6df-150b-477f-823b-3e62ec120ac2' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  15D0-1DEA
	else
	  search --no-floppy --fs-uuid --set=root 15D0-1DEA
	fi
	echo	'Loading Linux linux-rt ...'
	linux	/vmlinuz-linux-rt root=UUID=ef03e6df-150b-477f-823b-3e62ec120ac2 rw  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux-rt.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-ef03e6df-150b-477f-823b-3e62ec120ac2' {
	menuentry 'Arch Linux, with Linux linux-rt' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-rt-advanced-ef03e6df-150b-477f-823b-3e62ec120ac2' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  15D0-1DEA
		else
		  search --no-floppy --fs-uuid --set=root 15D0-1DEA
		fi
		echo	'Loading Linux linux-rt ...'
		linux	/vmlinuz-linux-rt root=UUID=ef03e6df-150b-477f-823b-3e62ec120ac2 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/intel-ucode.img /initramfs-linux-rt.img
	}
	menuentry 'Arch Linux, with Linux linux-rt (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-rt-fallback-ef03e6df-150b-477f-823b-3e62ec120ac2' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  15D0-1DEA
		else
		  search --no-floppy --fs-uuid --set=root 15D0-1DEA
		fi
		echo	'Loading Linux linux-rt ...'
		linux	/vmlinuz-linux-rt root=UUID=ef03e6df-150b-477f-823b-3e62ec120ac2 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux-rt-fallback.img
	}
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-ef03e6df-150b-477f-823b-3e62ec120ac2' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  15D0-1DEA
		else
		  search --no-floppy --fs-uuid --set=root 15D0-1DEA
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=ef03e6df-150b-477f-823b-3e62ec120ac2 rw  loglevel=3 quiet
		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-ef03e6df-150b-477f-823b-3e62ec120ac2' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  15D0-1DEA
		else
		  search --no-floppy --fs-uuid --set=root 15D0-1DEA
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=ef03e6df-150b-477f-823b-3e62ec120ac2 rw  loglevel=3 quiet
		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.
### 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+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root --hint-ieee1275='ieee1275//disk@1,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  15D0-1DEA
        linux16 /memtest86+/memtest.bin 
    }
fi
### END /etc/grub.d/60_memtest86+ ###

Last edited by stefano (2020-06-17 16:02:02)

Offline

#2 2020-06-17 09:01:40

automne
Member
From: /dev/md/kumiko
Registered: 2020-06-14
Posts: 19
Website

Re: Can't see GRUB menu [SOLVED]

Did you refresh your grub with

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

or did you manually edited your grub.cfg ?

Offline

#3 2020-06-17 09:52:50

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,523
Website

Re: Can't see GRUB menu [SOLVED]

stefano wrote:

are there parameters to hide the menu?

Yes, "GRUB_TIMEOUT_STYLE=hidden" in /etc/default/grub but your grub.cfg doesn't have that:

stefano wrote:
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

Are you sure the GRUB screen is controlled from Arch? Does pressing the <escape> key show the menu? Does pressing <c> show the GRUB command line? If so then the set command will show where GRUB is looking for the configuration file.

If this is a UEFI system then this will show the active boot entry:

efibootmgr -v

Offline

#4 2020-06-17 14:24:42

stefano
Member
Registered: 2011-04-09
Posts: 194

Re: Can't see GRUB menu [SOLVED]

automne wrote:

Did you refresh your grub with

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

or did you manually edited your grub.cfg ?

I did not manually edit grub.cfg, I generated it from grub-mkconfig

Offline

#5 2020-06-17 14:39:32

stefano
Member
Registered: 2011-04-09
Posts: 194

Re: Can't see GRUB menu [SOLVED]

Head_on_a_Stick wrote:

Are you sure the GRUB screen is controlled from Arch? Does pressing the <escape> key show the menu? Does pressing <c> show the GRUB command line? If so then the set command will show where GRUB is looking for the configuration file.

If this is a UEFI system then this will show the active boot entry:

efibootmgr -v

I do think I am on a UEFI system (I installed Arch on this box more than 5 years ago, so my memory is fuzzy). I am not sure what the output of efibootmgr means:

stefano@gorgias ~ $ efibootmgr -v
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0000,0001,0003,0004,0005,0007,0008,0006
Boot0000* Diskette Drive        BBS(Floppy,,0x0)
Boot0001* SAS_0_0:WDC WD10EZEX-75ZF5A0  BBS(HD,,0x0)SAS_0_0:WDC WD10EZEX-75ZF5A0.
Boot0003* USB Storage Device    BBS(USB,,0x0)USB Storage Device.
Boot0004* CD/DVD/CD-RW Drive    BBS(CDROM,,0x0)P0: HL-DT-ST DVD+-RW GT80N    .
Boot0005* Onboard NIC   BBS(Network,,0x0)IBA GE Slot 00C8 v1381.
Boot0006* UEFI: Hard Drive      PciRoot(0x0)/Pci(0x11,0x0)/Pci(0x0,0x0)/VenMsg(b4dd87d4-8b00-d911-afdc-001083ffca4d,00000000ffffffffffffffff010000000200000000000000)/HD(1,GPT,3a08cb35-dd7e-4cf3-b067-4b727790ce3d,0x800,0x100000)
Boot0007* CD/DVD/CD-RW Drive    BBS(CDROM,,0x0)P1: HL-DT-ST BD-RE  WH16NS40  .
Boot0008* SAS_0_1:WDC WD10EZEX-00BN5A0  BBS(HD,,0x0)SAS_0_1:WDC WD10EZEX-00BN5A0.

But even if I am on UEFI, shouldn't the choice of kernels be GRUB's responsibility, and doesn't UEFI defer to GRUB once it has loaded it from the EFI partition? That's was my understanding from Arch's wiki page.

And to answer your previous question: No, I cannot get to GRUB's menu by pressing ESC. In fact, I cannot get out from the blank screen at at all. My boot sequence is: BIOS screen ---> black screen --> Linux boot process. The system is completely unresponsive to user input from the  moment the boot down process starts until boot up is completed  and I have a login prompt (except for the BIOS interrupt early on, of course).

Offline

#6 2020-06-17 14:54:39

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 491

Re: Can't see GRUB menu [SOLVED]

Offline

#7 2020-06-17 15:04:06

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,523
Website

Re: Can't see GRUB menu [SOLVED]

stefano wrote:

But even if I am on UEFI, shouldn't the choice of kernels be GRUB's responsibility, and doesn't UEFI defer to GRUB once it has loaded it from the EFI partition?

Yes but only if the UEFI firmware is actually loading Arch's GRUB.

From the efibootmgr output it looks like the firmware is loading a default boot manager from the EFI system partition. That will be either $ESP/EFI/BOOT/BOOTX64.EFI or perhaps even $ESP/EFI/Microsoft/Boot/bootmgfw.efi. Can you remember the exact command(s) you used when installing the bootloader?

You could check the contents of the ESP:

# mount /dev/sdXY /mnt
find /mnt

Replace X & Y with the relevant drive letter and partition number, the ESP will show the "boot,esp" flags in the output of

# parted --list

It will probably be simplest to just attempt re-installation of the bootloader so that you're sure Arch's GRUB is actually being used: https://wiki.archlinux.org/index.php/GR … allation_2

paulkerry wrote:

Try disabling legacy boot?

The OP is already booting in UEFI mode, the efibootmgr command wouldn't work otherwise.

Last edited by Head_on_a_Stick (2020-06-17 15:04:38)

Offline

#8 2020-06-17 16:01:46

stefano
Member
Registered: 2011-04-09
Posts: 194

Re: Can't see GRUB menu [SOLVED]

Head_on_a_Stick wrote:
stefano wrote:

But even if I am on UEFI, shouldn't the choice of kernels be GRUB's responsibility, and doesn't UEFI defer to GRUB once it has loaded it from the EFI partition?

Yes but only if the UEFI firmware is actually loading Arch's GRUB.

From the efibootmgr output it looks like the firmware is loading a default boot manager from the EFI system partition. That will be either $ESP/EFI/BOOT/BOOTX64.EFI or perhaps even $ESP/EFI/Microsoft/Boot/bootmgfw.efi. Can you remember the exact command(s) you used when installing the bootloader?

You could check the contents of the ESP:

# mount /dev/sdXY /mnt
find /mnt

Replace X & Y with the relevant drive letter and partition number, the ESP will show the "boot,esp" flags in the output of

# parted --list

It will probably be simplest to just attempt re-installation of the bootloader so that you're sure Arch's GRUB is actually being used: https://wiki.archlinux.org/index.php/GR … allation_2

That was it! I had a BOOTX64.EFI in a ESP partition on the boot drive that was loading instead of Arch's Grub. Re-installing the bootloader in the esp partition with

# grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB

as per  Arch's GRUB page solved the issue. Now Arch's GRUB takes over and I can finally get to the menu.

Problem solved.

Thanks!

Offline

Board footer

Powered by FluxBB