Bug 1275101 - grub.cfg: bug and poor choices by 30_os-prober for menuentry, command, root, parameters
grub.cfg: bug and poor choices by 30_os-prober for menuentry, command, root, ...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-25 17:54 EDT by John Reiser
Modified: 2016-12-20 10:09 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 10:09:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2015-10-25 17:54:50 EDT
Description of problem: Installing a new Fedora 23 alongside previous Fedora systems (in other harddrive partitions) results in a /boot/efi/EFI/fedora/grub.cfg that fails to boot the previous systems.  Also, the structure and organization of the boot menus is not friendly to common use.


Version-Release number of selected component (if applicable):
grub2-tools-2.02-0.23.fc23.x86_64

How reproducible: always


Steps to Reproduce:
1. UEFI boot Fedora-Live-Workstation-x86_64-23_Beta-3.iso from USB in "Try Fedora" mode on a system that already has previous Fedora systems (such as Fedora 22) installed on other partitions.
2. Install Fedora 23 to harddrive on a new partition, and install new bootloader.
3. Try to boot the old Fedora 22.

Actual results: Fails to boot, with complaints: 'linux': command not found; 'initrd': command not found

Expected results: successful boot of old Fedora 22


Additional info:
The Live USB was booted in UEFI mode on a bare hardware box [no virtualization] with UEFI firmware, and the menuentries for Fedora 23, which were composed by /etc/grub.d/10_linux, have 'linuxefi' and 'initrdefi' for commands, and they work.  However, the menuentries for the previous Fedora sytems, composed by /etc/grub.d/30_os-prober, use 'linux' and 'initrd' instead; and those commands are not in the newly-installed grub2.  That's a bug, perhaps two bugs.  Any command name that is chosen must have an actual implementation installed, and if Fedora 23 boots with linuxefi then 'linuxefi' is the best choice for any other Linux, too.

The Fedora 23 grub command looks like
   linuxefi /boot/vmlinuz-4.2.3-300.fc23.x86_64 root=UUID=<the-correct-UUID> ro rhgb quiet LANG=en_US.UTF-8
while the Fedora 22 command looks like
   linux /boot/vmlinuz-4.1.10-200.fc22.x86_64 root=/dev/sdb6
Here 30_os-prober has made poor choices:
   1) Using /dev/sdb6 instead of UUID=<the-correct-UUID>.  There is no guarantee that a device name such as "/dev/sdb6" is stable from boot to boot, even with no hardware changes.  Using UUID= protects against this, and also still works if a new drive is installed or if drives are re-arranged.
   2) Not supplying the same parameters "ro rhgb quiet LANG=en_US.UTF-8" for other systems.  "ro" has been valid and useful for around 20 years.  LANG= is newer and perhaps not always recognized [but is for Fedora 22], but causes no harm.  Similarly, other unknown parameters are most likely ignored.

The layout of menuentries is poor.  They should be sorted in reverse chronological order: newest first.  Instead, the 'rescue' entry appears at the top level despite almost never being used.  The current sort is by strcmp, so that "4.1.10" comes before "4.1.8", which is a bug in sorting version numbers.  Also, the chosen names for sibling submenu entries are all the same, despite being different kernel versions.  Thus the user must type 'e' at boot to edit the entry in order to find out which kernel is which.  Put the kernel version into the title.
Comment 1 Tore Anderson 2015-11-20 09:55:20 EST
I think this is a duplicate of bug #1274288 (regarding the broken use of "linux"/"initrd" commands instead of "linuxefi"/"initrdefi" in config generated by 30_os-prober).
Comment 2 Fedora End Of Life 2016-11-24 07:54:42 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 3 Fedora End Of Life 2016-12-20 10:09:21 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.