Bug 6752 - genext2fs: e2fsck must run before tunefs -U random
Summary: genext2fs: e2fsck must run before tunefs -U random
Status: VERIFIED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-05 21:02 UTC by Daniel Mentz
Modified: 2014-01-05 23:25 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
patch (2.10 KB, patch)
2014-01-05 21:02 UTC, Daniel Mentz
Details
Build log (7.10 KB, text/x-log)
2014-01-05 21:03 UTC, Daniel Mentz
Details
defconfig (2.38 KB, application/octet-stream)
2014-01-05 22:30 UTC, Daniel Mentz
Details
This commit to e2fsprogs probably broke buildroot (1.81 KB, patch)
2014-01-05 22:31 UTC, Daniel Mentz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Mentz 2014-01-05 21:02:26 UTC
Created attachment 5138 [details]
patch

In fs/ext2/genext2fs.sh, e2fsck must run after changing filesystem options and before setting the UUID with "tune2fs -U random". Otherwise, the latter command will fail.

I previously got this error message

"tune2fs 1.42.9 (28-Dec-2013)

Please run e2fsck on the filesystem."

It worked for me after moving e2fsck before "tune2fs -U random"

This is based on commit bfbe4dd19e94fb24037e3b6080acd75435adbb67
Comment 1 Daniel Mentz 2014-01-05 21:03:06 UTC
Created attachment 5144 [details]
Build log
Comment 2 Yann E. MORIN 2014-01-05 22:09:06 UTC
This is working fine for me.

Besides, in the comment you moved, there is an explanation
on why adding the UID has to be done *before* calling fsck:

---8<---
# genext2fs does not generate a UUID, but fsck will whine if one is
# is missing, so we need to add a UUID.
# Of course, this has to happend _before_ we run fsck.
---8<---

So, moving this block after fsck is not correct.

Also, I'm using ext2/3/4 quite a lot, and I did not catch
any issue with them so far.

I suspect there is another problem with your filesystem.
One such potential problem is missing space and/or inodes
in the filesystem, which prevents tune2fs and/or e2fsck
to work correctly.

Can you attach your defconfig, please?

You can get a defconfig by running:
    make savedefconfig

Regards,
Yann E. MORIN.
Comment 3 Yann E. MORIN 2014-01-05 22:19:58 UTC
Hmm, it seems that indeed ext4 is broken since the last bump
of e2fsprogs.

Thanks for the report, I'll investigate.
Comment 4 Daniel Mentz 2014-01-05 22:30:13 UTC
Created attachment 5150 [details]
defconfig
Comment 5 Daniel Mentz 2014-01-05 22:31:32 UTC
Created attachment 5156 [details]
This commit to e2fsprogs probably broke buildroot
Comment 6 Yann E. MORIN 2014-01-05 22:37:28 UTC
Yes, this does indeed look like the cause of your issue,
which I am now able to reproduce with ext4.

ext2 and ext3 are not affected by this.

Thank you! :-)
Comment 7 Yann E. MORIN 2014-01-05 22:59:33 UTC
Daniel,

This should be fixed by:
    http://patchwork.ozlabs.org/patch/307025/

Care to check on your side, please?

Thanks again for the report!

Regards,
Yann E. MORIN.
Comment 8 Yann E. MORIN 2014-01-05 23:20:21 UTC
Fix in the repository, with:
http://git.buildroot.org/buildroot/commit/?id=9e680d0ada829f1cd7e2e1bff138d5e3ec32d0fd

Regards,
Yann E. MORIN.
Comment 9 Daniel Mentz 2014-01-05 23:25:38 UTC
It works for me with the fix in the repository. Thanks!