Re: mkimg used to create gpt image, problem booting

From: Marcel Moolenaar <marcel_at_xcllnt.net>
Date: Sat, 23 Aug 2014 12:11:18 -0700
On Aug 23, 2014, at 12:00 PM, Craig Rodrigues <rodrigc_at_freebsd.org> 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_xcllnt.net



Received on Sat Aug 23 2014 - 17:11:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC