From owner-freebsd-current@freebsd.org Sun Jul 12 18:07:32 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D154F999259 for ; Sun, 12 Jul 2015 18:07:32 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id B00F51077 for ; Sun, 12 Jul 2015 18:07:32 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 84D1E9F9B; Sun, 12 Jul 2015 18:07:31 +0000 (UTC) Message-ID: <55A2ACDD.408@freebsd.org> Date: Sun, 12 Jul 2015 14:07:25 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Andrey V. Elsukov" , freebsd-current@freebsd.org Subject: Re: Lenovo BIOS boot fix References: <55A1FFD5.7080008@freebsd.org> <55A2030B.7010405@freebsd.org> <55A2835F.1030004@yandex.ru> In-Reply-To: <55A2835F.1030004@yandex.ru> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u4MfxjCjNcgFxOfgP972SVveKrkVSkXnl" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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, 12 Jul 2015 18:07:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --u4MfxjCjNcgFxOfgP972SVveKrkVSkXnl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-07-12 11:10, Andrey V. Elsukov wrote: > On 12.07.2015 09:02, Allan Jude wrote: >> I forgot to include the link to the patch as well: >> >> http://www.allanjude.com/bsd/lenovofix_gpart.patch >> >> I will most likely make this patch optional, behind a flag to the 'gpa= rt >> create -s gpt' command, to avoid potentially breaking existing working= >> systems, but if using offset 1 works on all other hardware, having it = as >> the default would be nice. >> >> Another option would be to make a separate standalone program to modif= y >> the pMBR for Lenovo machines, rather than modifying gpart. > > Hi, > > I think Lenovo's BIOS just think that your partition layout is MBR and > uses legacy boot. > > if (MBR_partition[0].type =3D=3D 0xee && gpt_is_ok()) { > UEFI_boot(); > } else { > MBR_boot(); > } > I am not sure what they actually do, but, by making it the MBR_partition[1].type that is 0xee, FreeBSD is still perfectly happy, and the Lenovo boots. Other non-lenovo machines I tested on also worked. Tested Platforms (in BIOS/non-UEFI mode): Lenovo X220 Lenovo X230 (doesn't have the bug, boots fine with MBR[0].type =3D 0xee) Lenovo T530 (also doesn't have the bug) Asus Core2Duo Asus i7 Nehalem desktop Asus i5 Sandy bridge desktop Gigabyte i5 Ivy bridge desktop Intel Ivy bridge NUC Intel Haswell NUC Supermicro i7 Haswell workstation --=20 Allan Jude --=20 Allan Jude --u4MfxjCjNcgFxOfgP972SVveKrkVSkXnl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJVoqzlAAoJEBmVNT4SmAt+F1IQAJVfQORF/Wx6tG+DQQ9bQRkb nWe12ni4TbOqqDz00r5HvSlSU2Uj8mDYCnSMalCDck4b5qzbg3GW1OQZS8fXABky 5Bh95s5AIHyFB6oJdg6XzS0pSP/hJ/49ZH56k6iJ6eHymPFweM2DOh8dHpiX3hFh G/6i4S2KorB2VZ3nDIzO87WYU3Dv+kpXAE2rDyaPbfjeHv8iqL6euWpHy/KK999z F64nDTlVN5gEfnK67LXu8a7VlTHbkW5O2lEWHvuYDb4tCdb2XzXDUPkjhhWeWzrz kibz0ZRdp/oZxBmZguVrLstRpTa3laYOkoesfcJDp+ODAtMh8gKDa11fhSFbPJrO xarn5/oYnlGDxrGWmo1IHEi03HgRbGJcsQT7xqJx8p6RfzNxca9vnkaFd264O8Mh pnHtuATAs9/y6xDZnaVsUQK4UuPWkd4vY40T/OPmbMC2hT1loTO71ywgHOB/Xm93 vDw5+LpvWyReVxiYlB3MYJAFkW1vynkPLA15/4ob7pi4ekEZ29BswXMAjurIBksC +Sg3vyM579mas2JNrDaEj+9AJdjFBSTNhJyCjoWvaMaiLnzZpr46hi6Sv3Q4CoHm LvYy5lZSnDe8bUyWDiAD0yG3Fw/wX0OI7OOGuJY28CDsX72pU5pZPsdZZz+av+1n x2eBQd+ztUQ7JIejIrMg =eBJW -----END PGP SIGNATURE----- --u4MfxjCjNcgFxOfgP972SVveKrkVSkXnl--