Bug 198064 - rescue mode cannot install grub via grub-install
rescue mode cannot install grub via grub-install
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Depends On:
Blocks: 201895
  Show dependency treegraph
Reported: 2006-07-08 20:07 EDT by John Reiser
Modified: 2008-05-06 12:05 EDT (History)
2 users (show)

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

Attachments (Terms of Use)
strace.out from "strace -o strace.out grub-install /dev/hda" (85.58 KB, text/plain)
2006-07-08 20:07 EDT, John Reiser
no flags Details
/tmp/grub-install.log.aoV921 (364 bytes, text/plain)
2006-07-08 20:12 EDT, John Reiser
no flags Details

  None (edit)
Description John Reiser 2006-07-08 20:07:28 EDT
Description of problem:
After working around bug 198063 (rescue mode fails to mount non-root
filesystems), and being chroot'ed to /mnt/sysimage with / and /boot mounted
correctly, and with a correct mknod for /dev/hda, [and incidentally having good
stuff left over in /boot/grub from a previous install] then running
"grub-install /dev/hda" fails with "The file /boot/grub/stage1 not read
correctly" and indeed the bootloader has not been installed on /dev/hda.

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

How reproducible:

Steps to Reproduce:
1. On /dev/hda, erase the bootloader portion of the first sector (the first 446
bytes [512 - 4*16 - 2]), and sectors 2 through 63 of /dev/hda [origin is 1].  Be
sure to keep the last 66 bytes of the first sector, which are the head of the
DOS partition table.
2. "boot: linux rescue", language, keyboard, no network
3. Choose a system to rescue that is already OK [/boot/grub/* is good]
4. chroot /mnt/sysimage [and evade bug 198063 if necessary] and be sure that
the root and /boot are correct.
5. grub-install /dev/hda
Actual results:
"The file /boot/grub/stage1 not read correctly" and the boot loader has not been
installed at the beginning of /dev/hda.  The disks FC6-development-i386-rescuecd
(2006-07-08), FC5-i386-rescuecd (2006-04-11), and FC5-i386-DVD.iso (2006-03-20)
all fail in the same way.  I finally suceeded with  KNOPPIX_V4.0.2.CD-2006-09-23-EN.

Expected results:
grub installed correctly on /dev/hda1

Additional info:
I tried running it again with "strace -o strace.out grub-install /dev/hda", and
will attach the strace.out.  I notice that there are [non-consecutive] lines
stat64("/usr/share/grub/i386-redhat/stage1", {st_mode=S_IFREG|0644, st_size=512,
...}) = 0
read(3, "/grub/stage1\n", 128)          = 13
write(1, "The file /boot/grub/stage1 not r"..., 47) = 47
which tend to indicate confusion between /boot/grub/stage1 and /grub/stage1.
Comment 1 John Reiser 2006-07-08 20:07:28 EDT
Created attachment 132115 [details]
strace.out from "strace -o strace.out grub-install /dev/hda"
Comment 2 John Reiser 2006-07-08 20:12:10 EDT
Created attachment 132116 [details]

There were 5 files all 364 bytes long, from each of my unsuccessful attempts. 
They all had essentially the same error message, differing only in the
randomized filename for /tmp/grub-install.img.* .
Comment 3 John Reiser 2006-07-08 20:22:52 EDT
Silly me; "grub-install" was from the system I had chosen to rescue (and was
chroot'ed into), not from the rescue CD.  So my original complaint above is a
"No bug."

But there is a functionality and usability issue with rescue mode: it should be
easy to install grub from rescue mode, and it should be obvious how to do it,
and probably there should be good "hand holding" available.  So please turn this
into a Request For Enhancement so that installing/re-installing/fixing the grub
boot loader is easy from rescue mode.
Comment 4 Jeremy Katz 2006-07-10 20:39:40 EDT
You really need to be in the chroot to install grub unless you're really really
clever.  We've talked a bit about adding a menu of common rescue mode "tasks"
like reinstalling the bootloader, but haven't actually gotten to doing so due to
higher priority things.
Comment 5 Matthew Miller 2007-04-06 12:24:14 EDT
Fedora Core 5 and Fedora Core 6 are, as we're sure you've noticed, no longer
test releases. We're cleaning up the bug database and making sure important bug
reports filed against these test releases don't get lost. It would be helpful if
you could test this issue with a released version of Fedora or with the latest
development / test release. Thanks for your help and for your patience.

[This is a bulk message for all open FC5/FC6 test release bugs. I'm adding
myself to the CC list for each bug, so I'll see any comments you make after this
and do my best to make sure every issue gets proper attention.]
Comment 6 Red Hat Bugzilla 2007-06-11 23:12:22 EDT
requested by Jams Antill
Comment 7 Bug Zapper 2008-04-03 23:15:00 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 8 Bug Zapper 2008-05-06 12:05:10 EDT
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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