Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214563 - sys-boot/grub can't read files on ext partitions with inode size != 128
Summary: sys-boot/grub can't read files on ext partitions with inode size != 128
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 217863 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-24 17:47 UTC by kaergel.s
Modified: 2008-07-14 12:05 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Set default inode size to 128 instead of 256 (fix_inode_size.diff,308 bytes, patch)
2008-03-24 17:49 UTC, kaergel.s
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kaergel.s 2008-03-24 17:47:03 UTC
After updating e2fsprogs from 1.40.4 to 1.40.6 grub can no longer read files that are on a partition created with e2fsprogs 1.40.6.

Reproducible: Always

Steps to Reproduce:
1. emerge "=sys-fs/e2fsprogs-1.40.6"
2. mkfs.ext3 /dev/sda1
3. mount /dev/sda1 /foo
4. cp -r /boot /foo
5. open grub with "grub"
6. type "root (hd0,0)"
7. type "setup (hd0)"
Actual Results:  
grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no
 
Error 2: Bad file or directory type

Expected Results:  
grub> setup (hd0)  
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.

grub> 


The problem only exists with e2fsprogs 1.40.6. With 1.40.4 everything is working as expected. The problem is related to changes in /etc/mke2fs.conf shipped with 1.40.6. Running 1.40.6 with the default config from 1.40.4 does work.

In mke2fs.conf for 1.40.6 the default inode size is 256. In 1.40.4 it was 128.

Running 1.40.6 with the default inode size of 128 does not produce any problem.

"Error 2: Bad file or directory type" means:
This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO.
Comment 1 kaergel.s 2008-03-24 17:49:22 UTC
Created attachment 147148 [details, diff]
Set default inode size to 128 instead of 256

This patches fixes mke2fs.conf shipped with e2fsprogs 1.40.6. It changes the default inode size back to 128 as in 1.40.4.
Comment 2 SpanKY gentoo-dev 2008-03-24 20:03:04 UTC
that ignores the real problem ... grub cant handle diff inode sizes apparently
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-03-24 20:10:17 UTC
This was already going to be in the -r5 I was working on - hopefully out later today.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-03-25 06:17:54 UTC
in -r5, please test it from the package.mask.
Comment 5 kaergel.s 2008-03-26 21:19:50 UTC
Confirmed. -r5 fixes this problem. Thanks.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-03-30 06:25:37 UTC
Thanks
Comment 7 SpanKY gentoo-dev 2008-04-15 22:18:38 UTC
*** Bug 217863 has been marked as a duplicate of this bug. ***
Comment 8 Wiktor Wandachowicz 2008-05-02 04:27:58 UTC
Read the following article for explanation:

GRUB vs. the Inodes: Who Needs a Bootable System, Anyway?
http://www.linuxplanet.com/linuxplanet/tutorials/6480/1/
Comment 9 Andreas K. Hüttel gentoo-dev 2008-07-14 12:05:26 UTC
It should be pointed out that this bug hits everyone who installs from the Gentoo 2008.0 LiveCD (i686) on an ext3 partition. :(