I found out how to do it in the end by using losetup to associated it
with a device, but in an unmounted state. I could then run resize2fs.
Unfortunately I couldn't then work out how to shrink the img file :(
So, working from what you said Chris, I created a new img file from
scratch and dded/copied stuff across. However I've now noticed there's a
subtle difference in the two ext4 filesystems: the one has a flag of:
unsigned_directory_hash, whereas the other uses signed. The other
difference is that the one has a needs_recovery filesystem feature. I
can't find out how to change/enable either of these options using
tune2fs; does anyone know how to do it?
Leo
--
Please post to: Hampshire@???
Web Interface:
https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL:
http://www.hantslug.org.uk
--------------------------------------------------------------