Bug 443289 - grub error 2 on new installation of fedora 9
grub error 2 on new installation of fedora 9
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
9
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-20 05:14 EDT by Rand All
Modified: 2009-05-04 15:01 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-04 15:01:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fedora 8's copy of menu.lst (1.40 KB, text/plain)
2008-04-20 05:14 EDT, Rand All
no flags Details
Fedora 9's copy of menu.lst (689 bytes, text/plain)
2008-04-20 05:14 EDT, Rand All
no flags Details

  None (edit)
Description Rand All 2008-04-20 05:14:17 EDT
Description of problem:
I already have Fedora 8 installed.  I installed Fedora 9 Preview to a different
partition on the same drive as 8.  I wanted to preserve my grub from 8, so I
told 9 to install grub to its own root partition, not the mbr.  I then copied
the entry from F9's grub file to F8's grub file.  When I attempted to boot to
F9, I got
Error 2: Bad file or directory type

Version-Release number of selected component (if applicable):
grub of F8, which is doing the booting is 0.97-19
grub of f9 is 0.97-33

Steps to Reproduce:
1.install f8
2.on separate partition, install f9 preview
3.in f9 installation, tell grub to install to sda2, not sda
4.copy relevant entry from f9's grub menu.lst to f8's
5.try to boot f9
  
Actual results:
grub gives Error 2: Bad file or directory type

Expected results:
f9 should boot


Results of /sbin/fdisk -l are:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3824    30716248+  83  Linux
/dev/sda2            3825        5099    10241437+  83  Linux
/dev/sda3            5100        9219    33093900   83  Linux
/dev/sda4            9220        9729     4096575   82  Linux swap / Solaris

Fedora 8 is on sda1.  Fedora 9 is on sda3.
Attatched are both grub config files.
Comment 1 Rand All 2008-04-20 05:14:17 EDT
Created attachment 303044 [details]
Fedora 8's copy of menu.lst
Comment 2 Rand All 2008-04-20 05:14:58 EDT
Created attachment 303045 [details]
Fedora 9's copy of menu.lst
Comment 3 João Valverde 2008-04-20 19:31:17 EDT
I confirm this bug. Older grub can't read new partition created by the F9 installer.
Comment 4 Brandon Mayes 2008-04-30 10:47:17 EDT
I am also getting the same error.  I currently have Ubuntu installed and it
controls grub, so I chose not to install grub during the Fedora 9 installation.
 Some folks on fedoraforum.org have confirmed that this occurs only when the
Fedora 9 installer is told not to install a bootloader.  If the default option
is selected (install grub) then it will boot properly.

The file not being found is the kernel.  This can be seen by booting up,
pressing 'C' to enter into grub command mode.  Entering the "root (hdx,x)"
command is fine.  When entering the kernel command, it will give state: "Error
2: Bad file or directory type."
Comment 5 Brandon Mayes 2008-05-03 16:03:02 EDT
I have confirmed that this only occurs if the installer is told NOT to write to
the MBR.  I went ahead and ran the Fedora 9 installer again (using the live DVD
for x86_64) and told it to install to the MBR.  After installation it was able
to boot without any problem.  When I put in my Ubuntu live CD and reinstalled
grub  like this:

$ sudo grub
> root (hd1,2)
> setup (hd0)
> quit

I was no longer able to boot Fedora 9 using the grub installed by Ubuntu.  I
received the same "Error 2" message whenever Fedora was selected in the grub menu.

A workaround for this is possible.  Prior to running the Fedora installer, use a
partitioning tool such as gparted to create a separate partition for /boot. 
During F9 installation, do NOT let anaconda reformat the /boot partition (and of
course, do NOT write F9 to the MBR).

Since the /boot partition was created by gparted and not anaconda, other
instances of grub should be capable of reading it, and thus, Fedora 9 will boot
even though the installer did not write to the MBR.
Comment 6 Bug Zapper 2008-05-14 05:46:13 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 stanl 2008-05-16 16:43:58 EDT
I confirm this is happening with the i386 fedora 9 live CD.  I use a MBR on
another disk to bring up a grub menu.  I then select the boot partition I want
to run using configfile /grub/menu.lst.  Fails with the above error.
Comment 8 stanl 2008-05-16 21:56:35 EDT
Found this link on the web that seems to describe the problem accurately.

http://www.linuxplanet.com/linuxplanet/tutorials/6480/1/
Comment 9 stanl 2008-05-16 22:00:18 EDT
Also found this link saying it is not a problem because Fedora has patched the
version of grub they use to recognize the 256 byte inodes.

http://www.fedoraforum.org/forum/archive/index.php/t-187405.html

Perhaps, if a patched version is used to do a grub-install on the mbr it will
fix the problem?  Using older grub created menus is the issue?
Comment 10 Jeremy Katz 2009-05-04 15:01:36 EDT
This is a problem in the non-Fedora versions of grub not supporting the newer kernel features (256 byte inodes) and so there's really not anything that we can do in Fedora to fix it.  Instead, you'll have to get fixes to the grub included in the other distributions

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