Bug 213983

Summary: Lenovo B590 does not boot in EFI mode
Product: Base System Reporter: snthibaud
Component: kernAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Many People CC: kevans
Priority: ---    
Version: 11.0-RELEASE   
Hardware: amd64   
OS: Any   

Description snthibaud 2016-11-01 18:28:51 UTC
When booting my Lenovo B590 laptop, the only thing I see before the system hangs is is:

Consoles: EFI console
_

When I use non-UEFI mode, I get a little further, but then I run into ACPI errors (probably bug 212260). I need to boot in UEFI mode anyway, since I have other OS's that use it. Any ideas?
Comment 1 snthibaud 2016-11-02 06:09:34 UTC
The problem also occurs in FreeBSD-12.0-CURRENT.
Comment 2 snthibaud 2016-11-02 06:10:15 UTC
If I can provide any more information, I would be glad to do so!
Comment 3 Kyle Evans freebsd_committer 2018-04-22 01:02:35 UTC
Hi,

Sorry for the radio silence. =-( Can you try one of the latest 11.1-STABLE or -CURRENT snapshots and let me know if this still persists (assuming you have the hardware still)?

The bootloader code has been pretty thoroughly rototilled since this PR was created.
Comment 4 snthibaud 2018-06-24 12:31:13 UTC
Sorry for taking so long to verify it. I used the latest image today and the issue does still occur for me.
Comment 5 Kyle Evans freebsd_committer 2018-06-24 13:18:33 UTC
(In reply to snthibaud from comment #4)

Interesting! Can you try installing /boot/loader.efi to your ESP in place of the boot1.efi we install there as BOOTx64.efi?
Comment 6 snthibaud 2018-06-24 14:06:56 UTC
Thanks for your answer! I will try, but I am not sure what an ESP is. /boot/loader.efi is included in the USB image?
Comment 7 Kyle Evans freebsd_committer 2018-06-24 14:11:15 UTC
(In reply to snthibaud from comment #6)

Sorry =). ESP = EFI System Partion, the FAT partition that UEFI firmware uses. It should be the first partition on the USB image. You can drop /boot/loader.efi from the UFS partition in place of BOOTX64.EFI (with same name) and give that a test boot.
Comment 8 snthibaud 2018-07-01 07:00:44 UTC
I tried modifying the boot image as you suggested, but this turns out to be difficult without a FreeBSD installation, since Ubuntu/Windows cannot write to UFS.
Any suggestions to make this modification quickly?
Comment 9 Kyle Evans freebsd_committer 2018-07-01 15:33:06 UTC
(In reply to snthibaud from comment #8)

I could whip up an image based on a recent snapshot with the requested modifications made, if you'd be willing to boot it. If so- amd64-memstick or a different image?
Comment 10 snthibaud 2018-07-02 14:24:59 UTC
Thank you! That is indeed the right architecture and medium for me.
Comment 11 Kyle Evans freebsd_committer 2018-07-06 17:52:08 UTC
Hi,

Apologies for the delay. Here's the image I've prepared: https://people.freebsd.org/~kevans/FreeBSD-12.0-CURRENT-amd64-20180628-r335760-memstick-modified.img.xz

SHA512 (FreeBSD-12.0-CURRENT-amd64-20180628-r335760-memstick-modified.img.xz) = ade27f8f313e0738956e7be82ff10f78996aee6fa754b526608e8c750a3dbd614dfe20e4760265cb035ba0c9f694be1a6b9459a7e4ba66482be8272541a5c78f
Size = 611673460
Comment 12 snthibaud 2018-07-08 08:19:02 UTC
Thank you! I tested that image and it fails in the same way.
Comment 13 Kyle Evans freebsd_committer 2018-07-08 16:45:20 UTC
(In reply to snthibaud from comment #12)

Interesting! Can you keep that image around for a bit and I'll give you a BOOTx64.efi to swap into the ESP (MSDOS partition) with 100% more debug print?
Comment 14 snthibaud 2018-07-09 11:15:20 UTC
Sure! Just unsure how I will modify the image again, since I still cannot boot FreeBSD.
Comment 15 Kyle Evans freebsd_committer 2018-07-09 11:51:30 UTC
(In reply to snthibaud from comment #14)

You'll only need to mount the FAT partition, which should be doable from basically anywhere. =) It'll be the first partition on the disk.