mkimg used to create gpt image, problem booting

Marcel Moolenaar marcel at
Sat Aug 23 19:11:27 UTC 2014

On Aug 23, 2014, at 12:00 PM, Craig Rodrigues <rodrigc at> wrote:
> I ran the following crazy experiment, just to see what would happen:
> dd if=/dev/md1s2 of=/dev/md0s2 bs=8192
> I then tried to boot the first image with QEMU, and it booted successfully,
> with my UFS file system that I had previously created with makefs.
> I'm not sure where to look for the problem.  I notice that
> in the non-working image, the offset starts at block 3,
> while in the working image, the offset starts at block 34.
> Is that enough to make things not boot?

Could be. Try the -P option to mkimg. It sets the
underlying (unexposed) physical sector size while
still working with the visible 512 bytes sectors.
The net effect is that for the GPT scheme things
get aligned to the physical sector size and that
it also causes the image size to be rounded.

You can also try emitting vmdk directly to see if
that makes a difference. vmdk also has the side-
effect of rounding the image to the grain size.

Marcel Moolenaar
marcel at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the freebsd-current mailing list