Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2015 14:07:25 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>, freebsd-current@freebsd.org
Subject:   Re: Lenovo BIOS boot fix
Message-ID:  <55A2ACDD.408@freebsd.org>
In-Reply-To: <55A2835F.1030004@yandex.ru>
References:  <55A1FFD5.7080008@freebsd.org> <55A2030B.7010405@freebsd.org> <55A2835F.1030004@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55A2ACDD.408>