Bug 147392 - grub-install crashes under 2.6.10-1.760_FC3 on x86_64
Summary: grub-install crashes under 2.6.10-1.760_FC3 on x86_64
Alias: None
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
(Show other bugs)
Version: 3
Hardware: x86_64 Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-02-07 20:50 UTC by H.J. Lu
Modified: 2007-11-30 22:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-13 19:55:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description H.J. Lu 2005-02-07 20:50:09 UTC
After I added a disk to my x86_64 machine, I ran
grub-install. I ran into 2 problems:

1. It tried to access floppy driver, which didn't have
a floppy disk in it. I got floppy disk I/O error.
2. It segfaulted.

I had to boot the rescue CD to recover. grub-install
had no problems in rescue mode under 2.6.9-1.681_FC3.
After I booted 2.6.9-1.681_FC3 normally, grub-install
was OK except that it still tried to access floppy,
which didn't happen in rescue mode.

BTW, I have a 40GB IDE HD and 250GB SATA HD. IDE is
the first drive.

Comment 1 David Waring 2005-02-24 17:03:09 UTC
I get this too but I'm booting from my only drive which is a SATA one.

I had a boot floppy and went back to the original install kernel for FC3 and
grub-install worked fine. So now I've removed the newer kernels and I'm
excluding kernel updates for now until this is fixed.

Comment 2 D. Hugh Redelmeier 2005-04-19 04:02:07 UTC
I hit this segfault in grub-install on my FC3-x86_64 system.
  kernel-2.6.10-1.770_FC3.  Also with kernel-2.6.11-1.14_FC3

This looks a lot like the grub bug that is described in Ubuntu's Bugzilla:
Although at one time they thought it was a kernel bug, they decided it is a bug
in Grub .95.  Pretty tricky bug to diagnose.  They said that the patch has been
pushed up to Debian.

I haven't seen the accepted patch, but it might be the same as this one:
Hmm -- this message critiques it severely:

Comment 3 Peter Jones 2005-04-20 18:06:21 UTC
Can you try the grub-0.95-12 in rawhide?  (you may need to rebuild the SRPM, but
"rpmbuild --rebuild grub-0.95-12.src.rpm" should just work).

This sounds like you've got a box with the NX features turned on.

Comment 4 D. Hugh Redelmeier 2005-04-23 03:02:57 UTC
I fetched  
Trying to build it on FC3 x86_64 + updates failed with errors:
checking for C compiler default output file name... configure: error: C compiler
cannot create executables

Reading config.log, I see instead a couple of compiler errors.  Both suggest
that a different version of gcc was expected:
configure:2396: gcc -V </dev/null >&5
gcc: `-V' option must have argument

configure:2425: gcc -m32 -Os -g -fno-strict-aliasing -Wall -Wno-pointer-sign
-Werror -Wno-shadow -static   conftest.c  >&5
cc1: error: unrecognized command line option "-Wno-pointer-sign"

I got the same errors in FC3 i386 + updates.

Comment 5 D. Hugh Redelmeier 2005-05-09 06:09:12 UTC
I changed to grub.spec file in grub-0.95-12.src.rpm: I removed the 
-Wno-pointer-sign from the definition of CFLAGS.  This had been added to support
GCC4, but FC3's GCC3 baulks.

I rebuilt the rpm.  This worked, with one autoreconf warning that I ignored:
  + autoreconf --install --force
  /usr/share/aclocal/gob2.m4:7: warning: underquoted definition of GOB2_HOOK
    run info '(automake)Extending aclocal'
    or see http://sources.redhat.com/automake/automake.html#Extending-aclocal

I installed the rpm.  This worked.

I ran "grub-install /dev/hda".  This failed:
  # /sbin/grub-install /dev/hda
  /sbin/grub-install: /sbin/grub: /usr/lib/libc.so.1: bad ELF interpreter: No
such file or directory
  /sbin/grub-install: /sbin/grub: /usr/lib/libc.so.1: bad ELF interpreter: No
such file or directory
  /sbin/grub-install: /sbin/grub: /usr/lib/libc.so.1: bad ELF interpreter: No
such file or directory
  /sbin/grub-install: /sbin/grub: /usr/lib/libc.so.1: bad ELF interpreter: No
such file or directory
  /sbin/grub-install: /sbin/grub: /usr/lib/libc.so.1: bad ELF interpreter: No
such file or directory
  The file /boot/grub/stage1 not read correctly.

Should grub be using /usr/lib/libc.so.1?  There is no such file on my system;
there is a /usr/lib/libc.so.

Some other interesting details:
  $ file /sbin/grub
  /sbin/grub: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
  $ arch
  $ ldd /sbin/grub
  /usr/bin/ldd: /sbin/grub: /usr/lib/libc.so.1: bad ELF interpreter: No such
file or directory

The grub.spec file does try to statically link grub on x86_64:
  %ifarch x86_64
  CFLAGS="$CFLAGS -static" 
This is being used.  Why then is a dynamic library still being used?

There are a couple of other warnings that I ignored.  Mostly because they were
buried in the middle of the build log.  They didn't stop the build.  Extracts:
  configure: WARNING: ncurses/curses.h: present but cannot be compiled
  configure: WARNING: ncurses.h: present but cannot be compiled
  configure: WARNING: curses.h: present but cannot be compiled

Comment 6 David Waring 2005-05-14 11:54:02 UTC
The problem is the grub-0.95-staticcurses.patch forces the final link to be
dynamic even though the rest has been compiled as static. If you remove the
-Wl,dynamic from that patch (or add a subsequent patch to remove those bits for
x86_64 only) it'll compile properly as a static binary.

Comment 7 Patrice Guay 2005-11-20 02:48:54 UTC
This looks like a duplicate of bug #151834.

Comment 8 Matthew Miller 2006-02-08 20:38:00 UTC
FWIW, this still happens with the FC devel package if you try to rebuild it on

Comment 9 John Thacker 2007-01-13 19:55:27 UTC
(This is a mass update to bugs which have been in NEEDINFO unmodified for over a
year and are for a currently unsupported version of Fedora Core.)

Closing per lack of response to previous request for information.
This bug was originally filed against a much earlier version of Fedora
Core, and significant changes have taken place since the last version
for which this bug is confirmed.

Note that FC3 and FC4 are supported by Fedora Legacy for security
fixes only.  Please install a still supported version and retest.  If
it still occurs on FC5 or FC6, please reopen and assign to the correct
version.  Otherwise, if this a security issue, please change the
product to Fedora Legacy.  Thanks, and we are sorry that we did not
get to this bug earlier.

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