Analysing differences in images produced with mkimg and makefs
Chris Lamb
lamby at debian.org
Tue Dec 7 00:45:25 UTC 2021
Fabian Keil wrote:
(Noting the issues you mention with ElectroBSD binaries so will
proceed using FreeBSD memstick images as you suggest.)
> 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.
Sure thing. Although instead of modifying a few bytes which might
damage the file beyond sensible comparison I'm just going to compare
two pristine FreeBSD memstick images, specifically:
$ sha1sum *
ff3bac56a48161a175ebe340f2d094f864183c33 FreeBSD-12.3-STABLE-amd64-20211125-r371091-mini-memstick.img
842b252835975d21334f55bc93eb88108f4886e6 FreeBSD-13.0-STABLE-amd64-20211111-7647baa1e8f-248036-mini-memstick.img
However, there seems to be something a little interesting about these
images. Specifically, whilst this works:
$ virt-list-partitions FreeBSD-12.3-STABLE-amd64-20211125-r371091-mini-memstick.img
/dev/sda1
/dev/sda2
/dev/sda5
... the following does not:
$ virt-list-filesystems FreeBSD-12.3-STABLE-amd64-20211125-r371091-mini-memstick.img
list_filesystems: sfdisk exited with status 1: sfdisk: /dev/sda: partition 5: partition table contains only 4 partitions at /usr/bin/virt-list-filesystems line 166.
I'm using these two tools as diffoscope's filesystem image support
uses libguestfs (the library underlying the virt-* tools).
Any ideas about what is different about these images? Getting them mountable by
guestfs first step as I see it.
Best wishes,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org 🍥 chris-lamb.co.uk
`-
More information about the rb-general
mailing list