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.
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.
that ignores the real problem ... grub cant handle diff inode sizes apparently
This was already going to be in the -r5 I was working on - hopefully out later today.
in -r5, please test it from the package.mask.
Confirmed. -r5 fixes this problem. Thanks.
Thanks
*** Bug 217863 has been marked as a duplicate of this bug. ***
Read the following article for explanation: GRUB vs. the Inodes: Who Needs a Bootable System, Anyway? http://www.linuxplanet.com/linuxplanet/tutorials/6480/1/
It should be pointed out that this bug hits everyone who installs from the Gentoo 2008.0 LiveCD (i686) on an ext3 partition. :(