Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2014 12:11:18 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Craig Rodrigues <rodrigc@freebsd.org>
Cc:        freebsd-current Current <freebsd-current@freebsd.org>
Subject:   Re: mkimg used to create gpt image, problem booting
Message-ID:  <7CE168C1-6AF3-4AD2-80DB-192AEC49FD2B@xcllnt.net>
In-Reply-To: <CAG=rPVes3Eq87hOE6W135yGvzRiAzHTbCGSxiyd0JBAs2ufqmA@mail.gmail.com>
References:  <CAG=rPVeucq%2BsMxe_NPe3Og939o=Sg4WGfYL7PjA1uXGU8uL=8g@mail.gmail.com> <853B0396-2C19-49DF-A8E8-8EB43D107597@xcllnt.net> <CAG=rPVes3Eq87hOE6W135yGvzRiAzHTbCGSxiyd0JBAs2ufqmA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_72F5DFAB-2007-40D3-9E88-2E5E869EF04C
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=iso-8859-1


On Aug 23, 2014, at 12:00 PM, Craig Rodrigues <rodrigc@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@xcllnt.net



--Apple-Mail=_72F5DFAB-2007-40D3-9E88-2E5E869EF04C
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAlP451YACgkQpgWlLWHuifZqqQCdHdmnk/f8+4/on3uzN1d4XyjY
+moAniCJF67+zqrFakevViiBqNYEg03A
=AYkU
-----END PGP SIGNATURE-----

--Apple-Mail=_72F5DFAB-2007-40D3-9E88-2E5E869EF04C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7CE168C1-6AF3-4AD2-80DB-192AEC49FD2B>