[lug] Convertion of ext4 Sparse Files

stimits at comcast.net stimits at comcast.net
Sat Jan 6 08:33:44 MST 2018


Interesting results on "file" used on the image:
Android sparse image, version: 1.0, Total of 3732480 4096-byte output blocks in 3218 input chunks.
 
Apparently the stock tools in Fedora and Ubuntu don't work with an "android" flavor. I have no idea what the difference is, I'm looking now to see what the "android-tools" package might do...there is an img2simg application which looks promising. Meanwhile, does anyone here know if there is a difference between an "Android" sparse file and a "Linux" sparse file??
 
----- Original Message -----From: Aaron D. Johnson <adj at fnord.greeley.co.us>To: Boulder (Colorado) Linux Users Group -- General Mailing List <lug at lug.boulder.co.us>Sent: Sat, 06 Jan 2018 04:05:04 -0000 (UTC)Subject: Re: [lug] Convertion of ext4 Sparse Files

stimits at comcast.net writes:

> If I run fsck -v -n directly on the file it just spits out the help> menu of fsck. If I run this on a loopback device covering the file:> > # fsck -v -n /dev/loop0> fsck from util-linux 2.30.2 e2fsck 1.43.5 (04-Aug-2017)> ext2fs_open2: Bad magic number in super-block> fsck.ext2: Superblock invalid, trying backup blocks...> fsck.ext2: Bad magic number in super-block while trying to open /dev/loop0> > The superblock could not be read or does not describe a valid ext2/ext3/ext4> filesystem. If the device is valid and it really contains an ext2/ext3/ext4> filesystem (and not swap or ufs or something else), then the superblock> is corrupt, and you might try running e2fsck with an alternate superblock:> e2fsck -b 8193 <device>> or> e2fsck -b 32768 <device>>> So it seems to be as feared...this must be a custom sparse image and> not standard.

We can be sure it's not an image of an ext2/3/4 file system, yes.

It could be that it is an image of a partitioned blocked device ofsome sort and your ext filesystem does not start on block 0. Or afilesystem that isn't ext2/3/4. (You mentioned flash, so maybe JFFS2or something.) What does "file /path/to/image" say? Or "file -s/dev/loop0"? Or "/sbin/blkid /path/to/image" ?

- Aaron_______________________________________________Web Page: http://lug.boulder.co.usMailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lugJoin us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180106/518cf5b6/attachment.html>


More information about the LUG mailing list