Bug 857936

Summary: No modules are loaded on grub2 network boot
Product: [Fedora] Fedora Reporter: IBM Bug Proxy <bugproxy>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: dcantrell, dennis, gustavold, jkachuck, mads, pjones, wgomerin
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: All   
Fixed In Version: grub-2.00-8.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-30 16:16:58 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 846990    
Description Flags
A revision of grub-2.00-add-fw_path-search.patch
Resubmitting patch using pjones's guideline none

Description IBM Bug Proxy 2012-09-17 10:30:43 EDT
No modules are loaded during grub2 network boot on ppc64.

After fetching grub2 from the network, the grub menu is presented. If I go to the grub console and try to fire a few commands I get following output:

grub> echo 'foo'
error: can't find command `echo'.
grub> help
error: can't find command `help'.

The same behavior happens if I choose one of the grub menu entries. It fails to boot because there is no 'linux' command.

It can be workaround adding a few insmod's to the grub config file, like:
insmod echo
insmod linux

This is the command line I used to generate grub's elf and modules directory:

grub-mknetdir --net-directory=/tftpboot --subdir=gustavold


This is a revision of Matthew Garrett's patch 
grub-2.00-add-fw_path-search.patch. This should fix the "no modules 
loaded" issue.

Matthew's patch looks for the grub.cfg file in the bootlocation. In case 
the file is not found, it continues the normal path, which is to look 
for the grub.cfg using the prefix.

The issue comes from the fact that the original patch does not clear the 
grub_errno in case the grub.cfg is not found in the bootlocation. This 
leads to a fake error later when grub tries to open the file "command.lst".
Comment 1 IBM Bug Proxy 2012-09-17 10:31:02 EDT
Created attachment 613684 [details]
A revision of grub-2.00-add-fw_path-search.patch
Comment 2 Mads Kiilerich 2012-09-17 10:59:02 EDT
I have seen a similar problem caused by grub-2.00-add-fw_path-search.patch when using grub2-install --removable to make a USB boot 'disk' for the OS/grub2 on the harddrive of an EFI Mac. Let's hope the updated patch fixes this issue too.
Comment 3 IBM Bug Proxy 2012-09-19 13:54:40 EDT
Created attachment 614509 [details]
Resubmitting patch using pjones's guideline

------- Comment (attachment only) From pfsmorigo@br.ibm.com 2012-09-19 17:37 EDT-------
Comment 4 Gustavo Luiz Duarte 2012-10-30 16:18:02 EDT
grub2-2.00-10.fc18 works fine.