Grub2 doesn't auto-boot kernels in submenus

Bug #883831 reported by Tony Green
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Xubuntu 11.10 X86_64

Installed:
grub-common 1.99-12ubuntu5
grub-gfxpayload-lists 0.5
grub-pc 1.99-12ubuntu5
grub-pc-bin 1.99-12ubuntu5
grub2-common 1.99-12ubuntu5

I have previous kernels installed, one of which I want to boot from by default.
By setting GRUB_DEFAULT in /etc/default/grub and running update-grub (or similarly via startup-manager, though that has a bug I'll be reporting separately) I can tell Grub which kernel to boot.

However. When the grub.cfg file is built, my old kernels appear in a submenu (copy of file attached). It seems that the default number is taken as to mean the default number on the main menu and the submenu is ignored. So instead of booting my chosen kernel, my computer boots into memtest instead.

Kernels should be auto-bootable whether or not they're in a Grub submenu

Revision history for this message
Tony Green (mrzx4-c4uxxu-hwbqs) wrote :
Revision history for this message
Tony Green (mrzx4-c4uxxu-hwbqs) wrote :

Please ignore my comment about a bug in startup-manager. On further investigation I understand how this is working and the but I thought existed doesn't.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Pavel A (pavela) wrote :

There is a solution - don't use numbers. See below for details.

As of Ubuntu 12.10 this was also the case for me, when I did:
grub-set-default 3 # In /boot/grub/grub.cfg the desired entry was the forth 'menuentry' directive.

But I actually ended up in memtest, which means the items in submenu are not counted, just the submenu itself. So I have tried changing a number to the entry name: 'Ubuntu, with Linux 3.5.0-17-generic', which gave me a warning, pointing to how it is supposed to be done:

Warning: Please don't use old title `Ubuntu, with Linux 3.5.0-17-generic' for GRUB_DEFAULT, use `Advanced options for Ubuntu>Ubuntu, with Linux 3.5.0-17-generic' (for versions before 2.00) or `gnulinux-advanced-...>gnulinux-3.5.0-17-generic-advanced-...' (for 2.00 or later)

Therefore, to set grub 2 to load from a submenu entry by default, do the following:
sudo grub-set-default 'menuentry id for the submenu>menuentry id for the item'
sudo update-grub

I'm not sure as of 11.10, but this doesn't really seem to be a bug afterall.

p.s. I see it is an old bug, but I guess the post can be used for reference (I've got here looking for an answer actually).

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.