Re: Lenovo BIOS boot fix

From: Allan Jude <allanjude_at_freebsd.org>
Date: Sun, 12 Jul 2015 13:01:01 -0400
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
Received on Sun Jul 12 2015 - 15:01:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC