FS#25509 - [grub2-efi-x86_64] 1:1.99-2 loading grub.cfg from wrong directory

Attached to Project: Arch Linux
Opened by Darklighter (Darklighter) - Thursday, 11 August 2011, 13:24 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 16 August 2011, 04:04 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

GRUB looks for grub.cfg in the directory specified by the $prefix variable, which by default is the location of the grub.efi image. However, the install script (grub_efi_x86_64-install) creates grub.cfg in another directory (/boot/grub). The result is that GRUB cannot find grub.cfg, so it displays a prompt instead of the menu.

The correct way to fix this, according to the GRUB documentation, is to generate the GRUB image with an embedded configuration file that changes $prefix to /boot/grub. This can be done by adding a command-line option to grub-mkimage in grub_efi_x86_64-install, as described here:

http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.html

(See also https://bbs.archlinux.org/viewtopic.php?id=124213)
This task depends upon

Closed by  Dave Reisner (falconindy)
Tuesday, 16 August 2011, 04:04 GMT
Reason for closing:  Not a bug
Additional comments about closing:  see comments
Comment by Darklighter (Darklighter) - Thursday, 11 August 2011, 19:26 GMT
Upon further inspection, this is not a bug. For EFI setups, grub.cfg must be created on the EFI system partition via grub-mkconfig. However, grub2-common installs /boot/grub/grub.cfg, which does not apply to EFI setups. Could this file be moved to grub2-bios instead?

EDIT: Actually, I think this file should be removed from grub2-common. It's useless, as the user always has to run grub-mkconfig anyway.
Comment by Anonymous Submitter - Friday, 12 August 2011, 08:45 GMT
This is not at all a bug. But the /boot/grub/grub.cfg exists just as an example config file and for the sake of the backup array in the PKGBUILD. grub2-common is splitted from grub2-bios compilation but the scripts are firmware independent.

And just FYI the install script (grub_efi_x86_64-install or grub_bios-install) never runs grub-mkconfig. grub.cfg is either generated manually by the user or created in grub2-common pkg post_install script.

Loading...