FreeBSD_HEAD-tests - Build #1177 - Failure

2015-07-12 Thread jenkins-admin
FreeBSD_HEAD-tests - Build #1177 - Failure:

Check console output at 
https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1177/ to view the results.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Allan Jude
On 2015-07-12 01:49, Allan Jude wrote:
 I have spent my weekend researching why my Lenovo X220s refuse to boot
 from GPT partitioned disks.
 
 Based on this mailing list post:
 https://lists.freebsd.org/pipermail/freebsd-i386/2013-March/010437.html
 
 I have written a patch for gpart to change the way the PMBR is created.
 
 Instead of writing the 0xee partition in the first slot (offset 0), it
 writes it to the 2nd slot (offset 1).
 
 This resolves the issue on my Lenovo X220s, and the installed image
 boots fine on my T530, and various other non-lenovo amd64 machines at my
 house.
 
 If others could please test this image (it is a pre-installed system, so
 just dd it to a memory stick, and see if it boots. Can be safely done
 without touching your disks), that would be most helpful.
 
 compressed (193 MiB):
 http://www.allanjude.com/bsd/lenovofix_20150704-r285132.img.xz
 
 uncompressed (1 GiB):
 http://www.allanjude.com/bsd/lenovofix_20150704-r285132.img
 
 

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 'gpart
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 modify
the pMBR for Lenovo machines, rather than modifying gpart.

Thoughts?

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


Re: libarchive / bsdtar bug

2015-07-12 Thread Kurt Jaeger
Hi!

 I just got bit by this bug in bsdtar:
 
   https://github.com/libarchive/libarchive/issues/464
 
 Since libarchive 3.1.2 is over 2 years old now and there have not been
 any more releases, what is the right way of going about reporting a
 fixed bug so that the FreeBSD version gets a patch downstream?

Please open a problem report here:

https://bugs.freebsd.org/bugzilla/

-- 
p...@opsec.eu+49 171 3101372 5 years to go !
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


FreeBSD_HEAD-tests - Build #1178 - Still Failing

2015-07-12 Thread jenkins-admin
FreeBSD_HEAD-tests - Build #1178 - Still Failing:

Check console output at 
https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1178/ to view the results.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Getting Asus FM200 working with FreeBSD

2015-07-12 Thread Julian Elischer

On 7/11/15 8:29 PM, Daniel Peyrolon wrote:

Hi everyone,

I'm trying to get FreeBSD-CURRENT up and running with anything different
than console-only on an Asus FM200. I created a wiki page for it: [1].

I've tried GhostBSD on it, and everything pretty much worked, except
suspend/resume, and audio.

what about PCBSD?

I've CURRENT [2] installed on it, but so far, I haven't been able to get it
working, vesa is not even being loaded (error 19). Any idea, suggestions?

[1]: https://wiki.freebsd.org/Laptops/ASUS_FM200
[2]: FreeBSD BlackBox 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r285358: Fri Jul
10 18:40:27 CEST 2015 root@BlackBox:/usr/obj/usr/src/sys/GENERIC amd64




___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Tomoaki AOKI
Hi.

As far as I could confirm currently,

  *My ThinkPad didn't boot from decompressed .xz image written in
   memstick.

  *The partition tables (both PMBR and GPT) looks fine.
   (As expected. Verified with `gpart show` and `fdisk -p -v da0`)

  *Overwriting bootcode (gptzfsboot) in GPT partition 1 didn't help.


Not yet confirmed, but possible cause would be

  *Bootcode in PMBR is missing or corrupt.
(I noticed I hadn't tested overwriting it.)

  */boot in ZFS partition or anything related is not proper.


Sorry, I cannot reboot my ThinkPad right now.
Allan, can you confirm above?


On Sun, 12 Jul 2015 11:34:14 +0200
Kurt Jaeger li...@opsec.eu wrote:

 Hi!
 
  I have spent my weekend researching why my Lenovo X220s refuse to boot
  from GPT partitioned disks.
  
  Based on this mailing list post:
  https://lists.freebsd.org/pipermail/freebsd-i386/2013-March/010437.html
  
  I have written a patch for gpart to change the way the PMBR is created.
  
  Instead of writing the 0xee partition in the first slot (offset 0), it
  writes it to the 2nd slot (offset 1).
  
  This resolves the issue on my Lenovo X220s, and the installed image
  boots fine on my T530, and various other non-lenovo amd64 machines at my
  house.
  
  If others could please test this image (it is a pre-installed system, so
  just dd it to a memory stick, and see if it boots. Can be safely done
  without touching your disks), that would be most helpful.
 
 I used the image, put it on a stick, and set the BIOS to boot uefi-only
 or gpt-only and it never booted ? It's early sunday morning, it was
 a long week, so maybe I just missed something I'm supposed to do ?
 
 BIOS is 1.39.
 
 -- 
 p...@opsec.eu+49 171 3101372 5 years to 
 go !
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
 


-- 
Tomoaki AOKIjunch...@dec.sakura.ne.jp
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Kurt Jaeger
Hi!

 I have spent my weekend researching why my Lenovo X220s refuse to boot
 from GPT partitioned disks.
 
 Based on this mailing list post:
 https://lists.freebsd.org/pipermail/freebsd-i386/2013-March/010437.html
 
 I have written a patch for gpart to change the way the PMBR is created.
 
 Instead of writing the 0xee partition in the first slot (offset 0), it
 writes it to the 2nd slot (offset 1).
 
 This resolves the issue on my Lenovo X220s, and the installed image
 boots fine on my T530, and various other non-lenovo amd64 machines at my
 house.
 
 If others could please test this image (it is a pre-installed system, so
 just dd it to a memory stick, and see if it boots. Can be safely done
 without touching your disks), that would be most helpful.

I used the image, put it on a stick, and set the BIOS to boot uefi-only
or gpt-only and it never booted ? It's early sunday morning, it was
a long week, so maybe I just missed something I'm supposed to do ?

BIOS is 1.39.

-- 
p...@opsec.eu+49 171 3101372 5 years to go !
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


FreeBSD_HEAD - Build #2957 - Fixed

2015-07-12 Thread jenkins-admin
FreeBSD_HEAD - Build #2957 - Fixed:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/2957/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/2957/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/2957/console

Change summaries:

285417 by rodrigc:
Add new include path for sha256.h

This fixes the bootstrap build on FreeBSD 10.

Submitted by:   andrew

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Tomoaki AOKI
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)

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.

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


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


On Sun, 12 Jul 2015 02:02:51 -0400
Allan Jude allanj...@freebsd.org wrote:

 On 2015-07-12 01:49, Allan Jude wrote:
  I have spent my weekend researching why my Lenovo X220s refuse to boot
  from GPT partitioned disks.
  
  Based on this mailing list post:
  https://lists.freebsd.org/pipermail/freebsd-i386/2013-March/010437.html
  
  I have written a patch for gpart to change the way the PMBR is created.
  
  Instead of writing the 0xee partition in the first slot (offset 0), it
  writes it to the 2nd slot (offset 1).
  
  This resolves the issue on my Lenovo X220s, and the installed image
  boots fine on my T530, and various other non-lenovo amd64 machines at my
  house.
  
  If others could please test this image (it is a pre-installed system, so
  just dd it to a memory stick, and see if it boots. Can be safely done
  without touching your disks), that would be most helpful.
  
  compressed (193 MiB):
  http://www.allanjude.com/bsd/lenovofix_20150704-r285132.img.xz
  
  uncompressed (1 GiB):
  http://www.allanjude.com/bsd/lenovofix_20150704-r285132.img
  
  
 
 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 'gpart
 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 modify
 the pMBR for Lenovo machines, rather than modifying gpart.
 
 Thoughts?
 
 -- 
 Allan Jude
 


-- 
Tomoaki AOKIjunch...@dec.sakura.ne.jp
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Kurt Jaeger
Hi!

 What model machine is this?

It's a X220:
Intel(R) Core(TM) i5 CPU   M 520
2500 MHz
4096 MB RAM
Serial: R9-GGPAX YY/MM
Type: 42918F6

dmidecode says:

Vendor: LENOVO
Version: 8DET69WW (1.39 )

with more details available at

http://people.freebsd.org/~pi/udog/

 Can you try running:
 
 gpart set -a active da0

Done, no change. If it helps, I can provide ssh access to the box,
it's only a test laptop.

-- 
p...@opsec.eu+49 171 3101372 5 years to go !
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Allan Jude

On 2015-07-12 09:24, Tomoaki AOKI wrote:

Hi.

As far as I could confirm currently,

   *My ThinkPad didn't boot from decompressed .xz image written in
memstick.

   *The partition tables (both PMBR and GPT) looks fine.
(As expected. Verified with `gpart show` and `fdisk -p -v da0`)

   *Overwriting bootcode (gptzfsboot) in GPT partition 1 didn't help.


Not yet confirmed, but possible cause would be

   *Bootcode in PMBR is missing or corrupt.
 (I noticed I hadn't tested overwriting it.)

   */boot in ZFS partition or anything related is not proper.


Sorry, I cannot reboot my ThinkPad right now.
Allan, can you confirm above?



You are correct, the PMBR bootcode was missing, my mistake.

I have uploaded new images (and set the old ones to redirect to the new 
ones)


compressed (193 MiB):
http://www.allanjude.com/bsd/lenovofix_20150712-r285132.img.xz

uncompressed (1 GiB):
http://www.allanjude.com/bsd/lenovofix_20150712-r285132.img



--
Allan Jude
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Andrey V. Elsukov
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 'gpart
 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 modify
 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 == 0xee  gpt_is_ok()) {
   UEFI_boot();
} else {
   MBR_boot();
}

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: Lenovo BIOS boot fix

2015-07-12 Thread Allan Jude
On 2015-07-12 13:52, Kurt Jaeger wrote:
 Hi!
 
 This was a mistake in my image, can you please try one of the new ones?

 compressed (193 MiB):
 http://www.allanjude.com/bsd/lenovofix_20150712-r285132.img.xz
 
 I did this:
 
 xzcat lenovofix_20150712-r285132.img.xz | dd of=/dev/da0 bs=1m
 
 gpart show
 = 34  2097085  diskid/DISK-60A44C3FABFEEDA159663FE7  GPT  (3.7G) 
 [CORRUPT]
 [...]
 
 gpart recover /dev/da0
 gpart show
 = 34  7679933  diskid/DISK-60A44C3FABFEEDA159663FE7  GPT  (3.7G)
 
 I rebooted, changed the BIOS to legacy-only and F12 to boot
 from the USB HDD.
 
 No change, it tries to boot and returns into the F12 boot selection menue.
 

What model machine is this?

Can you try running:

gpart set -a active da0

And try again?


-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


Re: Failed to build 11-CURRENT on 10.1-RELEASE (was: Re: FreeBSD_HEAD - Build #2953 - Still Failing

2015-07-12 Thread John-Mark Gurney
Li-Wen Hsu wrote this message on Sun, Jul 12, 2015 at 11:31 +0800:
 Resend this using another subject for not being overwhelmed by lots of build 
 fail mails :(

This has already been addressed by r285417:
svnweb.freebsd.org/changeset/base/r285417

 On Sun, Jul 12, 2015 at 01:22:48 +0800, Li-Wen Hsu wrote:
  On Sat, Jul 11, 2015 at 17:11:24 +, jenkins-ad...@freebsd.org wrote:
   FreeBSD_HEAD - Build #2953 - Still Failing:
   
   Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/2953/
   Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/2953/changes
   Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/2953/console
  
  [...]
  
   The end of the build log:
  
  [...]
   
   cc -O2 -pipe  -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../contrib/mtree 
   -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../lib/libnetbsd 
   -I/builds/FreeBSD_HEAD/usr.bin/xinstall/../../lib/libmd -std=gnu99  
   -Qunused-arguments 
   -I/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/tmp/legacy/usr/include  
   -static -L/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/tmp/legacy/usr/lib 
   -o xinstall xinstall.o getid.o  -lmd -legacy
   xinstall.o: In function `install':
   /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x133c): 
   undefined reference to `_libmd_SHA256_File'
   /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x1631): 
   undefined reference to `_libmd_SHA256_End'
   /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x186c): 
   undefined reference to `_libmd_SHA256_File'
   xinstall.o: In function `compare':
   /builds/FreeBSD_HEAD/usr.bin/xinstall/xinstall.c:(.text+0x2706): 
   undefined reference to `_libmd_SHA256_End'
   cc: error: linker command failed with exit code 1 (use -v to see 
   invocation)
   *** [xinstall] Error code 1
   
   make[3]: stopped in /builds/FreeBSD_HEAD/usr.bin/xinstall
   1 error
   
   make[3]: stopped in /builds/FreeBSD_HEAD/usr.bin/xinstall
  
  This failure seems due to cannot build 11-CURRENT on 10.1-RELEASE, where
  this job configured to run on.
  
  I have tested building HEAD in 11-CURRENT and 10.1-RELEASE jails,
  the first one succeeded and the other failed.  
  
  I remember we need to support build -CURRENT on latest -RELEASE, right?
  Any comments?

Please keep up w/ commit mail in situations like these...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 All that I will do, has been done, All that I have, has not.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: unp gc vs socket close/shutdown race

2015-07-12 Thread Conrad Meyer
Hi all,

(Sorry In-Reply-To is wrong; gmail isn't the most flexible MUA and I
was not subscribed to FreeBSD-Current until today.)

I have a slightly cleaned up version of this patch in phabricator at
https://reviews.freebsd.org/D3044 . My mentor thinks it looks ok, but
we would appreciate any feedback y'all have. The PR is here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194264 .

Primary changes from MJG's patch:

* Rather than adding PR_DISPOSE2 flag, we just change dom_dispose KPI.
Unix local domain is the only in-tree consumer.

* Use unp_gcflag IGNORED flag to only skip scanning RIGHTS on a socket
during GC mark phase. Unix sockets may refer to other sockets in the
graph while being half shutdown (shutdown(SHUT_RD)), they just won't
have valid RIGHTS.

Thanks,
Conrad
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Kurt Jaeger
Hi!

 This was a mistake in my image, can you please try one of the new ones?
 
 compressed (193 MiB):
 http://www.allanjude.com/bsd/lenovofix_20150712-r285132.img.xz

I did this:

xzcat lenovofix_20150712-r285132.img.xz | dd of=/dev/da0 bs=1m

gpart show
= 34  2097085  diskid/DISK-60A44C3FABFEEDA159663FE7  GPT  (3.7G) [CORRUPT]
[...]

gpart recover /dev/da0
gpart show
= 34  7679933  diskid/DISK-60A44C3FABFEEDA159663FE7  GPT  (3.7G)

I rebooted, changed the BIOS to legacy-only and F12 to boot
from the USB HDD.

No change, it tries to boot and returns into the F12 boot selection menue.

-- 
p...@opsec.eu+49 171 3101372 5 years to go !
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Allan Jude

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
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Lenovo BIOS boot fix

2015-07-12 Thread Allan Jude
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 'gpart
 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 modify
 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 == 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 = 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


-- 
Allan Jude

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature