Bug 429785 - in rescue mode grub-install fails since /sbin/grub doesn't exist
Summary: in rescue mode grub-install fails since /sbin/grub doesn't exist
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F9PR
TreeView+ depends on / blocked
 
Reported: 2008-01-22 23:37 UTC by Charles R. Anderson
Modified: 2013-09-04 03:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-11 15:35:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Charles R. Anderson 2008-01-22 23:37:31 UTC
Description of problem:

In rescue mode (rawhide-20080121) the grub-install command fails since it cannot
exec /sbin/grub.

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

How reproducible:
didn't try

Steps to Reproduce:
1. boot rescue mode of rawhide-20080121 CD
2. grub-install /dev/foo
  
Actual results:

sh-3.2# grub-install --root-directory=/mnt/sysimage /dev/sda3
/sbin/grub: Not found.

It appears that grub was moved to /usr/sbin and grub-install wasn't
updated.  Symlinking fixes it:

sh-3.2# ln -s /usr/sbin/grub /sbin/grub
sh-3.2# grub-install --root-directory=/mnt/sysimage /dev/sda3
The file /mnt/sysimage/boot/grub/stage1 not read correctly.
(this error is unrelated and due to bug #429782)

Expected results:
grub-install should work on the rescue image.

Comment 1 Charles R. Anderson 2008-04-04 02:46:39 UTC
This bug still exists as of rawhide 20080403.

Comment 2 Jeremy Katz 2008-04-11 15:35:14 UTC
"Fixed".  Decided to just pull grub-install -- getting it to work is actually
going to require reworking the way grub-install works a bit (or alternately,
changing the way we lay out the installer images) which isn't practical for this
release.  And it's not like it's been there in the past

Comment 3 Charles R. Anderson 2008-04-11 15:40:59 UTC
Really?  I thought it was there in the past.  How else do you repair the very
common problem of needing to reinstall grub?  Can we release-note how to repair
grub from the rescue environment please?



Comment 4 Ed Avis 2009-08-16 15:16:32 UTC
I still see exactly the same result in the Fedora 11 rescue mode, which suggests that grub-install was not removed, and that the bug is still there.

I have seen various warnings that running grub-install requires chrooting into the installed system, but I just ran it (after making a /sbin/grub symlink to work around this bug) and it got my machine up and running.  So I would suggest that even though grub-install from the rescue system may not work in all cases, it is worth keeping around.

Could you reopen this bug please?  The fix documented in the comments doesn't seem to have happened, and the bug is still there.  Please update the version to 11.

Comment 5 Stefan Lasiewski 2009-11-13 19:55:54 UTC
This is still a bug as of RHEL 5.4. And 'grub-install' does exist on the RHEL 5.4 DVD image, and on a RHEL 4.x DVD image.

'grub-install' has been around for a while (Try googling for it), and is even referenced in  the Grub documentation at http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html 

I wish I could cut and paste the text for you, or provide a screen shot.

Please reopen this bug. It has not been fixed.

Comment 6 daryl herzmann 2012-10-15 20:35:54 UTC
I believe this issue still exists in RHEL 6.3

Comment 7 Zhu Sheng Li 2013-09-04 03:48:32 UTC
Still exist.You can reproduce it by yourself with the latest iso.


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