Hi,
sorry I have to write in english.
I have tested this:
dd if=/dev/root bs=1024 > /media/hdd/hd51/rootfs1.bin
e2fsck -f /media/hdd/hd51/rootfs1.bin
resize2fs -M /media/hdd/hd51/rootfs1.bin
First using dd when filesystem is mounted is not the best idea. E.g. ext4 might have data in memory which is not written to disk yet. I guess that's the reason why e2fsck shows several errors. Don't know whether e2fsck can always fix these errors.
Second resize2fs -M has resized my file to around 266MB. Used according to df -h is only around 165MB. Don't know why resize2fs don't make it smaller. But this is only a minor problem.
The second big problem is that after flashing the filesystem stays that small.
Before
root@ax51:/media/hdd/hd51# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 987.7M 162.8M 769.7M 17% /
After
root@ax51:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 242.2M 157.7M 67.8M 70% /
So you can only use 242MB after flashing instead of 1GB.
@WTE: Can't you just support rootfs.tar.bz2 files for usb flashing? Then we wouldn't have any problems...
Edited by betacentauri, 22 November 2016 - 19:26.