From owner-freebsd-current@FreeBSD.ORG Sun Aug 24 19:05:21 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15655A33; Sun, 24 Aug 2014 19:05:21 +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 BE3CB3AA3; Sun, 24 Aug 2014 19:05:20 +0000 (UTC) Received: from [192.168.2.22] (atc.xcllnt.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id s7OJ5GOl004820 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 24 Aug 2014 12:05:17 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: multipart/signed; boundary="Apple-Mail=_51B92DC2-C176-461C-B6E6-FEA56311AFAB"; 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: Sun, 24 Aug 2014 12:05:15 -0700 Message-Id: <82000B55-10E5-4348-9F35-38962965A63C@xcllnt.net> References: <853B0396-2C19-49DF-A8E8-8EB43D107597@xcllnt.net> <7CE168C1-6AF3-4AD2-80DB-192AEC49FD2B@xcllnt.net> <53F9AC50.1000000@yandex.ru> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) Cc: "Andrey V. Elsukov" , 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: Sun, 24 Aug 2014 19:05:21 -0000 --Apple-Mail=_51B92DC2-C176-461C-B6E6-FEA56311AFAB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On Aug 24, 2014, at 9:59 AM, Craig Rodrigues = wrote: > On Sun, Aug 24, 2014 at 2:11 AM, Andrey V. Elsukov = wrote: >>=20 >> Yes, the problem is in the ptable_gptread() function. I'll commit the = fix. >=20 > Should mkimg be changed to create a partition table with 128 entries > by default, to match older versions of FreeBSD which do not have this = fix? Maybe. 128 is the suggested default. It's not a hard lower limit. Technically speaking, it's perfectly fine to create just enough entries to fill a single sector. Then again, code makes all kinds of assumptions or has all kinds of bugs -- just like the logic in the loader apparently. By having mkimg create a large table, even if it's knows up front that it doesn't have to may prevent broken code from tripping over, bit it surely bloats the image for no reason. --=20 Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_51B92DC2-C176-461C-B6E6-FEA56311AFAB 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 iEYEARECAAYFAlP6N2sACgkQpgWlLWHuifb8MQCghAhFOuY+CJ/VldhoNGXwOktM 5n0AnjAsPVijsT0j7dnvXgPsZPpLF3zs =LCRJ -----END PGP SIGNATURE----- --Apple-Mail=_51B92DC2-C176-461C-B6E6-FEA56311AFAB--