From owner-freebsd-current@FreeBSD.ORG Sat Aug 23 19:11:27 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4333F7E3; Sat, 23 Aug 2014 19:11:27 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F113933D9; Sat, 23 Aug 2014 19:11:26 +0000 (UTC) Received: from rdelancy-sslvpn-nc.jnpr.net ([66.129.239.10]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id s7NJBNWd001165 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 23 Aug 2014 12:11:25 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_72F5DFAB-2007-40D3-9E88-2E5E869EF04C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: mkimg used to create gpt image, problem booting From: Marcel Moolenaar In-Reply-To: Date: Sat, 23 Aug 2014 12:11:18 -0700 Message-Id: <7CE168C1-6AF3-4AD2-80DB-192AEC49FD2B@xcllnt.net> References: <853B0396-2C19-49DF-A8E8-8EB43D107597@xcllnt.net> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-current Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 19:11:27 -0000 --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 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--