genext2fs problem ?

Eric Malkowski eric at bvwireless.net
Wed Sep 14 19:57:45 UTC 2005


For some reason I didn't get mailing list digests volume 16 and 17 so I
would have replied earlier as I feel your pain on this.  Now that I've
read the whole thread -- here's a summary of my fix for this:

In my top level dir, I have this script rebuild_root.sh I run to rebuild
the rootfs quickly once a complete buildroot make has been done once --
create rebuild_root.sh:

#!/bin/sh

set -x

rm -rf build_i386/root
rm -f build_i386/staging_dir/fakeroot.env
make 2>&1 | tee build.log


Obviously adjust i386 for your target architecture.  Then add the sync to
the end of the code in target/makedevs/makedevs.c:

Index: makedevs.c
===================================================================
--- makedevs.c  (revision 7)
+++ makedevs.c  (working copy)
@@ -527,5 +527,7 @@
        }
        fclose(table);

+    system("/bin/sync");
+
        return 0;
 }

Make sure makedevs gets rebuilt:

rm build_i386/staging_dir/bin/makedevs
rm -rf build_i386/makedevs

(change i386 above to your arch again)

Now if your run the rebuild_root.sh each time you want to re-make your
root filesystem, you shouldn't have any oddities w/ regards to missing
device nodes or an old fakeroot.env hosing things.  This all stems from my
adventure with this described in bug 371:

http://bugs.uclibc.org/view.php?id=371

Hope this helps.

-Eric Malkowski

> On 11 Sep 2005 at 17:10, yahoo_groups at rovoreed.com wrote:
>
>> Not sure I know what is going on here, but I'm getting differences
>> between my  buildroot file
>> system and the file system when running on the target system.
>
> I've not had much more time to look at this but it seems that the file
> created by genext2fs is corrupt, and it appears to be some sort of
> interaction with fakeroot that is causing the problem. This
> observation is based on using 'dumpfs' to inspect the contents of
> the created filesystem.
>
> If I use genext2fs on it's own, the file created is OK - i.e not corrupt,
> but there's some sort of problem booting it. the boot finishes like
> this ...
>
> RAMDISK: Compressed image found at block 0
> Freeing initrd memoery: 1068k freed
> VFS: mount root (ext2 filesystem) readonly.
> Freeing unused kernel memoery: 76k freed
> Warning: unable to open initial console
>
> and it just seems to die.
>
> I don't really understand why no-one else has this problem. I've got
> 5280 blocks and 896 inodes.
>
> I don't want to get bogged down in trying to understand/debug this
> buildroot stuff, so it looks like I'm going to have to stop using it.
>
> Mike
>
>




More information about the uClibc mailing list