Bug 741300

Summary: grub-install: incorrect grub_shell path
Product: Red Hat Enterprise Linux 5 Reporter: Lubos Kocman <lkocman>
Component: grubAssignee: Peter Jones <pjones>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: atodorov, jreed
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 817971 (view as bug list) Environment:
Last Closed: 2012-07-24 17:24:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 817971    

Description Lubos Kocman 2011-09-26 14:29:08 UTC
Description of problem:

/usr/sbin/grub-install script on RHEL5U7 installation media contains incorrect path (/sbin/grub) to grub shell. Correct path on installmedia is /usr/sbin/grub.

Version-Release number of selected component (if applicable):

RHEL5U7 installmedia from pxe
http://download.englab.brq.redhat.com/pub/rhel/released/RHEL-5-Client/U7/x86_64/os/

How reproducible:


Steps to Reproduce:
1. boot installmedia
2. execute e.g. /usr/sbin/grub-install /dev/sda
  
Actual results:

/sbin/grub: Not found.

Expected results:

path to grub shell should be correct. Binary should have been found.

Additional info:

Comment 1 Lubos Kocman 2011-09-26 14:30:14 UTC
Why this need to be fixed: grub-install is often used to fix damaged mbr or just wrongly written bootloader (like in my case).

Comment 2 RHEL Program Management 2011-09-26 14:38:16 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2012-04-02 09:00:00 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 4 Peter Jones 2012-07-24 17:24:40 UTC
You don't list a specific version, but in the most recent version in RHEL 5 (and in the repo you point to), this doesn't appear to be an issue:

pjones4:~/Download/tmp$ rpm -qlp ../grub-0.97-13.5.x86_64.rpm | grep sbin
/sbin/grub
/sbin/grub-install
/sbin/grub-md5-crypt
/sbin/grub-terminfo
pjones4:~/Download/tmp$ rpm2cpio ../grub-0.97-13.5.x86_64.rpm | cpio -di 
3542 blocks
pjones4:~/Download/tmp$ grep -e '^sbindir=\|grub_shell' sbin/grub-install 
sbindir=/sbin
grub_shell=${sbindir}/grub
    $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
    $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >>$log_file
	grub_shell=`echo "$option" | sed 's/--grub-shell=//'` ;;
set $grub_shell dummy
    $grub_shell --batch $no_floppy --device-map=$device_map <<EOF >$log_file
pjones4:~/Download/tmp$ 

Additionally, it's unclear how invoking /usr/sbin/grub-install can have any result other than "-bash: /usr/sbin/grub-install: No such file or directory".