Bug 429785 - in rescue mode grub-install fails since /sbin/grub doesn't exist
in rescue mode grub-install fails since /sbin/grub doesn't exist
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
Blocks: F9PR
  Show dependency treegraph
Reported: 2008-01-22 18:37 EST by Charles R. Anderson
Modified: 2013-09-03 23:48 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-11 11:35:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Charles R. Anderson 2008-01-22 18:37:31 EST
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):

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-03 22:46:39 EDT
This bug still exists as of rawhide 20080403.
Comment 2 Jeremy Katz 2008-04-11 11:35:14 EDT
"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 11:40:59 EDT
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 11:16:32 EDT
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 14:55:54 EST
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 16:35:54 EDT
I believe this issue still exists in RHEL 6.3
Comment 7 SL Zhu 2013-09-03 23:48:32 EDT
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.