Analysing differences in images produced with mkimg and makefs

Fabian Keil fk at fabiankeil.de
Mon Dec 6 09:57:13 UTC 2021


"Chris Lamb" <chris at reproducible-builds.org> wrote on 2021-12-05:

> > Is anyone aware of a tool that can parse images created with
> > mkimg that contain an UFS file system created with makefs,
> > or a tool that can't deal with the whole image but can work
> > with an UFS file system image?
> [..]
> > BTW, the diffoscope output isn't particularly helpful either:
> 
> This is something that diffoscope should or could support — indeed, it
> already does support a number of filesystem types. Would it be
> possible for you to share your two .img files, or at the very least
> provide the output of running "file" on them? Comparing bytes manually
> is unlikely to be as efficient as getting diffoscope to address your
> files in a more human-readable way.

Hi Chris,

thanks a lot for looking into this.

I agree that it would be great if diffoscope would support
memstick images.

Due to (somewhat theoretical) license issues [0] ElectroBSD
binaries currently aren't available online but if you need
actual ElectroBSD memstick images for testing purposes I
could make them available online and send you the URLs privately.

However, ElectroBSD's memstick images are pretty similar to
FreeBSD's memstick images and the latter are available online
already (as the upstream isn't too concerned about those license
issues).

You could download a FreeBSD 12.3 memstick image from
<https://download.freebsd.org/ftp/snapshots/amd64/amd64/ISO-IMAGES/12.3/>,
copy it and modify a couple of bytes in the copy and try to
compare them.

Would this work for you, or would you prefer actual ElectroBSD images?

BTW, here's the file output for two ElectroBSD memstick images
and an official FreeBSD memstick image I downloaded:

[fk at elektrobier3 ~]$ file /dpool/images/elektrobier3/ElectroBSD-20211130-817fe7d130ce-j2/ElectroBSD-20211130-817fe7d130ce.img
/dpool/images/elektrobier3/ElectroBSD-20211130-817fe7d130ce-j2/ElectroBSD-20211130-817fe7d130ce.img: DOS/MBR boot sector; partition 1 : ID=0xef, start-CHS (0x3ff,255,63), end-CHS (0x3ff,255,63), startsector 1, 1600 sectors; partition 2 : ID=0xa5, active, start-CHS (0x3ff,255,63), end-CHS (0x3ff,255,63), startsector 1601, 1894992 sectors
[fk at elektrobier3 ~]$ file /dpool/images/test-vm/ElectroBSD-20211130-817fe7d130ce-2021-12-01-18\:47/ElectroBSD-20211130-817fe7d130ce.img
/dpool/images/test-vm/ElectroBSD-20211130-817fe7d130ce-2021-12-01-18:47/ElectroBSD-20211130-817fe7d130ce.img: DOS/MBR boot sector; partition 1 : ID=0xef, start-CHS (0x3ff,255,63), end-CHS (0x3ff,255,63), startsector 1, 1600 sectors; partition 2 : ID=0xa5, active, start-CHS (0x3ff,255,63), end-CHS (0x3ff,255,63), startsector 1601, 1894992 sectors
[fk at elektrobier3 ~]$ file ~/scratch/freebsd-12.3/FreeBSD-12.3-STABLE-amd64-20211125-r371091-memstick.img
/home/fk/scratch/freebsd-12.3/FreeBSD-12.3-STABLE-amd64-20211125-r371091-memstick.img: DOS/MBR boot sector; partition 1 : ID=0xef, start-CHS (0x3ff,255,63), end-CHS (0x3ff,255,63), startsector 1, 1600 sectors; partition 2 : ID=0xa5, active, start-CHS (0x3ff,255,63), end-CHS (0x3ff,255,63), startsector 1601, 2100304 sectors

Fabian

[0]:
https://www.fabiankeil.de/talks/lizenz-probleme-im-freebsd-umfeld/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20211206/dcf26d4a/attachment.sig>


More information about the rb-general mailing list