Opened 19 years ago

Closed 19 years ago

#1047 closed defect (fixed)

Fedora Core 3's mke2fs uses extra attributes not found in stock e2fsprogs - makes booting into LFS impossible until fixed

Reported by: gerard@… Owned by: lfs-book@…
Priority: lowest Milestone:
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

Text by Steve Crosby. Edit appropriate (after testing) and add to chapter2-creating new partition.

---

When creating the LFS partition, you may need to make some slight adjustments if your host system uses certain filesystem features that won't be supported by LFS later on in the build process. To check if this is the case, run the following command:

tune2fs -l /dev/<yourLFSpartition> | grep features

you should see output similar to the following:

Filesystem features: filetype sparse_super

The only LFS supported Filesystem features are (from the e2fsprogs 1.36 tune2fs man page):

dir_index filetype has_journal sparse_super

If you have any other features listed, you'll need to remove them from your new LFS partition before you proceed. This is done using the following command:

tune2fs -O <feature1>,<feature2> /dev/<yourLFSpartition>

You may also need to run fsck on the partition you just modified to make the changes effective - tune2fs will let you know if thats the case.

Some common features added by host systems that are not supported are:

ext_attr resize_inode large_file

To remove these, assuming your LFS partition is on /dev/hdb1

tune2fs -O ext_attr,resize_inode,large_file /dev/hdb1

==============

Feel free to mangle that blurb into something useful - probably best placed in the creating your LFS partition section if it goes directly into the book. Note that this is *untested* by me, I don't have a borked e2fsprogs to create such partitions with - someone should confirm the documented command syntax for removing the features works as advertised by the man pages.

Change History (10)

comment:1 by Matthew Burgess, 19 years ago

I thought this was fixed with the upgrade to the 1.36 release of e2fsprogs? I thought they'd included all the distro specific changes into that upstream release?

comment:2 by gerard@…, 19 years ago

That I'm not sure of to be honest.

comment:3 by alexander@…, 19 years ago

The bug _will_ reappear sooner or later if we ignore it now.

comment:4 by gerard@…, 19 years ago

Something I forgot to mentio: if it is indeed fixed in e2fsprogs-1.36 that would take care of some of the problems. However, LFS-6 uses the older e2fsprogs and that's probably where most of the problems will be coming from. A FAQ entry at the very least is required.

More info from Steve Crosby at lfs-support:

Downloaded and checked e2fsprogs source from Fedora 3

yuck! The FC3 patches to add resize_inode don't add the capability to remove the feature, and enable it by default. sigh. Haven't looked for the large_file capability, since the fix below solves both.

<first attempted fix deleted>

Double yuck! Not only is resize_inode set as the default, it is ignoring the -O flag to mke2fs, so you can't even disable it if you want to...

This is very ugly, but does work (tested here with FC3 e2fsprogs)

echo "features -<featurename>" | debugfs -w -f- /dev/{xxx}

followed by an e2fsck to remove any resize_inode remnants from the actual FS.

for example, to remove large_file and resize_inode from /dev/sdc1

echo "features -resize_inode" | debugfs -w -f- /dev/sdc1 echo "features -large_file" | debugfs -w -f- /dev/sdc1 e2fsck -p /dev/sdc1


That's ugly for sure.

An alternate solution would be adding a note to chapter 2 - creating a new partition and tell people not to use FC3's version of mke2fs and instead build e2fsprogs somewhere on the system and use its mke2fs version instead to format the LFS partition.

Some additional checking would be in order here. *If* an official e2fsprogs release fixes this, we could release a new LFS version (6.0.1) with just that the updated e2fsprogs version. Or an errata page or something of that nature.

comment:5 by Matthew Burgess, 19 years ago

Resolution: fixed
Status: newclosed

http://www.linuxfromscratch.org/pipermail/lfs-support/2005-February/026345.html

  • looks like an upgrade to e2fsprogs-1.36 fixes things and as this is already

fixed (r4634) I'm marking this bug as fixed too. Thanks for your input Steve!

comment:6 by alexander@…, 19 years ago

In the future Fedora will certainly again use some beta version of e2fsprogs with some new incompatible features, and someone will have to reopen the bug as: "Fedora 5 mke2fs uses extra attributes not found in stock e2fsprogs 1.36". So please include text by Steve into the book, although the problem doesn't show up right now.

comment:7 by steve.crosby@…, 19 years ago

Matt,

Your welcome, happy to give back what little I can ;)

There's been quite a few fixes\tests\hacks\text over the last few weeks ;)

The only *guaranteed* workaround is to have the user re-compile e2fsprogs from stock distribution, (only if their host actually has an issue) and re-create the filesystem on the LFS partition using these tools. We would need some instructions on how to do this (sample below)

I'd suggest a note in the "Creating your LFS partition" section (after the mke2fs /dev/[xxx] paragraph) along the lines of:

=============================

NOTE

Some host distributions use custom enhancements in their filesystem creation tools (e2fsprogs). If this is the case for your host distribution, you won't know about it until you attempt to boot into your new LFS in Chapter 9, when you will get an error similar to "unsupported filesystem features, upgrade your e2fsprogs". To check if your host system uses custom enhancements, run the following command:

tune2fs -l /dev/[xxx] | grep features (where [xxx] is the LFS partition - hda5 in our previous example).

If the output contains features other than the following:

Filesystem features: filetype sparse_super resize_inode large_file

then your host system may have these custom enhancements. In that case, to avoid later problems, you should download and install into a temporary directory the stock e2fsprogs and use the resulting binaries to re-create the filesystem on your LFS partition.

For example

cd /tmp tar xjf ${SOURCES}/e2fsprogs-1.36.tar.bz2 cd e2fsprogs-1.36 mkdir build cd build ../configure --prefix=/opt/dummy make (Do NOT run make install - we can run the mke2fs binary directly from the build directory) misc/mke2fs /dev/[xxx] (where XXX is the name of the LFS parition - hda5 in our previous example). cd /tmp rm -rf e2fsprogs-1.36

=====================

As always, feel free to reword as needed. It may make sense to only build mke2fs and dependent libs - I'll leave that as an exercise for the editors if they so choose ;)

Note also that if this or something like it is included, it will need to be updated\tested whenever we change our version of e2fsprogs.

comment:8 by Matthew Burgess, 19 years ago

Resolution: fixed
Status: closedreopened

OK, I was going to say "Not our problem" with regards to dealing with vendors putting such incompatible alpha/beta features in their distros, but I've had a change of heart. Added to that Steve's superb explanatory text in comment 7, I can't see why we shouldn't give folks a "get out of jail free" card. Steve, you're not vying for an editors' role are you? :)

comment:9 by Matthew Burgess, 19 years ago

Status: reopenedassigned

comment:10 by Matthew Burgess, 19 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.