Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2015 13:01:01 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   Re: Lenovo BIOS boot fix
Message-ID:  <55A29D4D.7040008@freebsd.org>
In-Reply-To: <20150712174457.a47abe5bf03b19d8cd21b3b6@dec.sakura.ne.jp>
References:  <55A1FFD5.7080008@freebsd.org>	<55A2030B.7010405@freebsd.org> <20150712174457.a47abe5bf03b19d8cd21b3b6@dec.sakura.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2015-07-12 04:44, Tomoaki AOKI wrote:
> Hi. I'd have to chime in. ;-)
>
> There are at least 4 ways of workarounds, including yours (1).
>
>    1: Offset GPT entry in PMBR. (First posted by Chris Torek.)
>    2: Mimic ESP [use 0xEF instead of 0xEE] (Need patch for loader.)
>    3: Use UEFI loader. (Currently clean root-on-ZFS is NOT supported)
>    4: Use MBR instead of GPT. (No large disk support)
>

5. Some machines also require the 0xEE partition be set active

Separately, I have also used: 6. 'Use BSD partitioning instead of GPT'
This happens to be what the FreeBSD installer memsticks use, and why 
they never had problems booting on the Lenovos

> My first solution was 2, but the patched loader possibly misbehave if
> separate ESP (EFI System Partition) exists. (Hybrid MBR case, not
> tested.)
>
> I've tested 3 only with memstick.img built with head. Not with actual
> HDD installation. (ThinkPad T420)
>
>
> The important thing is that some problematic computers other than
> Lenovo's can require the way other than 1. And some won't need anything
> above, but setting active flag with gpart.

Yes, I will be adding this as an option to bsdinstall

>
> So, as you already mentioned, these workarounds should be optional.
> Ideally, prepare options for gpart, and menus for bsdinstall to choose
> whichever.
>

Yes, my plan is to add an option during 'gpart create -s gpt' to apply 
the #1 fix.

In bsdinstall, there will be the following options:
GPT
MBR
GPT + Active (#5)
GPT + Lenovo Fix (#1)

>
> Please see also my related page[1]. It includes loader patch for 2 (but
> not separate files). Newer entry on top.
>
> As I'm using solution 1 currently, the patch isn't tested for a long
> time. I'm testing if it's applicable to stable/10 or not (no build
> test), and now applicable with fuzz.
>
> [1]http://www.dec.sakura.ne.jp/~junchoon/machine/freebsd-e.html
>
>

Thank you for sharing your research

-- 
Allan Jude



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