Error 2: Bad file or directory type for other OS on same disk

Bug #207001 reported by Taleman
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub
Invalid
Undecided
Unassigned
grub (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: grub

I removed all partitions from disk and created 4 primary partitions:
hda1 swap
hda2 Finnish Debian GNU/Linux Lenny
hda3 English Debian GNU/Linux Lenny
hda4 XUbuntu 8.04 Beta

I installed XUbuntu last, and the boot menu it created fails to start the Debian installations. For both I get

Error 2: Bad file or directory type
Press any key to continue...

I had this same problem previously with XUbuntu Alpha 6, but I thought it was because I had resized partitions to make room for the installed new systems, and maybe that had messed up the partition table somehow. But now partitions were made with Lenny installer, and have not been resized.

Revision history for this message
Taleman (tapio-lehtonen) wrote :
Revision history for this message
poborskiii (poborskiii) wrote :

I don't know if it there are same problems:
From http://sidux.com/Article416.html :
"...
- e2fsprogs ≥ 1.40.5 creates ext3 filesystems with 256 byte large inodes by default (in contrast to 128 byte used before), to accommodate for further ext4 related changes ( http://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.40.5 )
...
Using any of these new features requires updating the bootsector of your system. Bootsectors written by "grub or earlier versions of "grub-gfxboot" are not able to boot or even access partitions using any of these new features!
 While these changes don't affect existing systems, we strongly recommend updating your bootsectors using:
grub-install --recheck --no-floppy <raw device or partition>
 to get access to newly created ext3 (with inode sizes exceeding 128 byte) partitions, ..."

I have the problem with new installation of sidux-2008-1 and mandriva-2008.1 alongside my Kubuntu Gutsy (GRUB Error 2: Bad file or directory type). If new distribution versions are using e2fsprogs ≥ 1.40.5 for formatting of partitions during installation, then current GRUB installation doesn't recognize these partitions. But in my Gutsy installation "sidux" solution "grub-install --recheck --no-floppy <raw device or partition>" is not efficient (i don't know why). I did workaround: formatting partition selected for installation inside my actual old distribution (provide 128 byte large inodes) and then installation of new distribution on this partition without(!) formatting. This solution is working in my case for sidux-2008-1 and also mandriva-2008.1 with GRUB provided by Gutsy. But actual versions of Hardy and Lenny are both using e2fsprogs=1.40.8. Maybe is not in one of them creating 256 byte large inodes set by default, i don't know and i don't understand why is this problem in GRUB.

Revision history for this message
poborskiii (poborskiii) wrote :

From changelog of GRUB:

"grub (0.97-29ubuntu19) hardy; urgency=low
...
  [ Steve Langasek ]
  * debian/patches/ext3_256byte_inode.diff: new patch cherry-picked from
    Debian to support 256-byte inodes in ext3, for compatibility with recent
    e2fsprogs upstream defaults. Thanks Stefan Lippers-Hollmann.

 -- Steve Langasek <email address hidden> Wed, 19 Mar 2008 12:12:40 -0700"

Unluckily Gutsy has grub-0.97-29ubuntu4 without this new patch.

Revision history for this message
wirechief (wirechief) wrote :

I have kanotixrc7 installed along with Kbuntu 8.04, the latter being installed last however have not experienced this bug. although on a
different computer i had kanotixrc7 with sidux's latest 2008 release installed and when i fixed the boot grub with grub-install --recheck --no-floppy '(hd0)' I was able to restore kanotix boot grub but got the error 2 badfile or directory type with try to boot the sidux.
so on that system only kanotix and vista are bootable.

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the final release of Intrepid Ibex 8.10. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. Thanks again and we appreciate your help.

Changed in grub:
status: New → Incomplete
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug. As there has been no activity in some time, and there appears to be no further issues with grub, I am marking this fix-released in the final version of Ubuntu 8.04.1

Changed in grub:
status: Incomplete → Fix Released
Revision history for this message
Yves Bellefeuille (yan-storm) wrote :

I have the same problem with Xubuntu 8.10. Using Grub from CentOS 5.2, Grub can't recognize the directories Xubuntu created.

The solution "grub-install --recheck --no-floppy" proposed above didn't work. I ended up creating the partition with CentOS, and having the Xubuntu installation program use it without formating it.

It does seem that the problem is that Xubuntu creates file systems with 256-byte inodes rather than 128 bytes.

Changed in grub:
importance: Undecided → High
status: Fix Released → New
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in grub:
importance: High → Medium
status: New → Triaged
Revision history for this message
Colin Ian King (colin-king) wrote :

It may be worth trying with the latest Jaunty version of grub - I recently added in a patch that fixes an assumption with ext2/3/4 that inodes were of a fixed 256 byte size and hence doing block address calculation incorrectly.

The patch in question is:

http://bazaar.launchpad.net/~ubuntu-core-dev/grub/ubuntu/revision/882

This code now handles inodes of sizes other than 256 bytes for ext2/3/4, so it may address this bug.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

grub (0.97-29ubuntu51) jaunty; urgency=low

  [ Colin Watson ]
  * more_scsi_disks.diff: Add support for up to 256 SCSI disk devices on
    Linux (LP: #335174). Due to BIOS disk numbering only at most 128 can be
    bootable, so ensure we don't crash if there are more.

  [ Colin King ]
  * ext4_fix_variable_sized_inodes.diff: Add support for ext4 variable
    sized inodes (LP: #345488). This is backwardly compatible with ext2
    ext3 fixed sized inodes.

 -- Colin Watson <email address hidden> Fri, 20 Mar 2009 16:12:22 +0000

Changed in grub (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Marking the upstream task invalid; issue should be fixed with the patch from ubuntu.

Changed in grub:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.