Here is a more precise statement of the problem. Remember that my machine is 64-bit AMD .
1- I uninstall the grub package, to start from a clean state.
2- I install the official grub-0.97-13.x86_64.rpm package. Then perform the following checks :
[root@lauimldsoes04 orig]# ls -l /sbin/grub
-rwxr-xr-x 1 root root 579932 Oct 1 2006 /sbin/grub
[root@lauimldsoes04 orig]# file /sbin/grub
/sbin/grub: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, for GNU/Linux 2.6.9, stripped
[root@lauimldsoes04 orig]# /sbin/grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
3- I rebuild the package from the grub-0.97-13.src.rpm source :
# rpmbuild --rebuild grub-0.97-13.src.rpm
This produces two binary packages : grub-0.97-13.i386.rpm and grub-0.97-13.x86_64.rpm
I omitted this time the --target=i86 argument in order to produce both 32 and 64 bit versions of the binary package. I also went straight to the --rebuild option, since it
is cleaner and simpler than specifying the spec path. I do not think it makes a difference with "--ba path/to/spec ".
4- I uninstall grub to make sure, then install the newly generated grub-0.97-13.x86_64.rpm package.
5- I reexecute the previous checks, and here is what I get :
[root@lauimldsoes04 redhat]# ls -l /sbin/grub
-rwxr-xr-x 1 root root 287488 Feb 3 08:13 /sbin/grub
[root@lauimldsoes04 redhat]# file /sbin/grub
/sbin/grub: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
[root@lauimldsoes04 redhat]# /sbin/grub
-bash: /sbin/grub: No such file or directory
Note the differences. The new /sbin/grub is not statically linked, and worst, it does not even want to execute.
6- If I uninstall grub and then install the newly generated 32bit package, I get the same picture as above.
The /sbin/grub executable is dynamically linked, but at least it executes correctly.
This is all done on the same machine and te same 64 bit RHE5.1 (Centos 5.1 if you like).
So I am surely missing something in the way I regenerate the 64bit vesion of the package. (extra options, etc)
This is why it would be interesting to see the build log of this package.