[Triumf-linux-managers] FYI - gotcha with gparted live, porting ext3 disks

Andrew Daviel advax at triumf.ca
Fri Oct 1 19:36:07 PDT 2010


FYI - an odd gotcha relating to ext3 inode size:
SL5 grub fails if the inode size is 256.
(only really an issue if you format a disk on a different O/S than the 
installer)

I just installed SL55 on an Asus EeeBox PC (EB1501 media centre), which 
had Windows 7 pre-installed. I was originally going to preserve the 
Windows partitions elsewhere, just in case I wanted to re-install it, but 
as it's a 250Gb drive, Kel suggested shrinking the NTFS  partitions 
first. Which I did with a new copy of gparted live. I then changed my 
mind and decided to keep it as a dual-boot system instead of figuring out 
how to do dd|nc or whatever to preserve the image elsewhere.
Having got gparted already running, I used it to delete the 150Gb 
NTFS data partition (this is sold as a media PC; I guess it's for 
downloaded video) and create a Linux swap and ext3 "/".

That worked fine; Windows still booted and I used the kickstart to 
install SL5.5. Which created grub.conf with SL as the default and "Other" 
chaining Windows 7. Everything looked successful, but when I rebooted
Windows came up, not Grub.

I rebooted in rescue mode, chroot, and tried
   grub-install --recheck /dev/sda4
and got
   /boot/grub/stage1 not read correctly
so I presume that the MBR had not got written

I found
http://www.knoppix.net/wiki/USB_Based_FAQ


<quote>
make sure the partition type (set when you partition the drive) matches 
the filesystem you install. (If they differ, grub-install will fail with 
a confusing message "file ...boot/grub/stage1 not read correctly".)

  Newer versions of mke2fs now create filesystems with inode sizes of 256 
by default (instead of 128), which is causing compatibility issues with a 
lot of ext2/ext3 tools out there. If you want to be able to access your 
files from windows (using explore2fs for instance) make sure you do this 
instead:
# mke2fs -j -I 128 /dev/sda1
</quote>

See e.g. "dumpe2fs -h /dev/sda1 |grep Inode"

When I blew away the / partition and reformatted it as ext3 using the SL 
kickstart, everything worked normally.

(BTW, the SL install on the eeebox looks OK - Nvidia graphics, sound, 
eth0, wlan0)


-- 
Andrew Daviel, TRIUMF, Canada
Tel. +1 (604) 222-7376  (Pacific Time)
Network Security Manager


More information about the Triumf-linux-managers mailing list