Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Apr 2018 18:03:43 -0400
From:      Zaphod Beeblebrox <zbeeble@gmail.com>
To:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   On UEFI dual booting.
Message-ID:  <CACpH0Md-XivJ=V_rtbYR5b-yPf_hwkqc0T=a06uFLHJ3Mtj59Q@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I've put in about 6 hours of trying to get UEFI dual booting to work.  At
this point, the "dual boot" part works fine, but the FreeBSD part fails in
several interesting ways.

In case anyone cares, the hardware is an HP zBook 15 (with no suffixes).
It's a i7-4900 machine with a dual (Quadro 2100 and Intel) graphics
personality.  Don't worry about that bit, tho, we don't get that far.

The system has two disks --- both sata.  One is m.2 sata and the other is
2.5 inch sata.  I've installed "refind" on the EFI patition that Windows
created on the 2.5 inch drive.  I'm trying to get FreeBSD to be happy on
the m.2 drive.

The FreeBSD install (so far) has a UFS, swap and ZFS GPT partitions.

I can boot the 11.1 CD as UEFI.  Critically, the 11.1 CD seems to use
"loader.efi" directly.  This works.  The CD boots and is usable as such.

The problem starts with boot1.efi.  It seems to use text mode ... or
800x600... or something.  It seems to work.  Loader then runs in the same
screen mode, but when the kernel starts, it's all over the screen... one
pixel wide strips of white.  Like the kernel is writing to the wrong
resolution of screen.  loader.efi also seems to get the size of things
wrong.  After filling 25 lines, anything you type or have displayed
overwrites the 25th line of the screen.

So... I can try starting loader.efi directly from the EFI partition.  This,
however, seems to completely ignore the partitions on the other disk (and
their types).  I've even tried using refinds "volume" setting and/or
setting the command line arguments to loader.efi to tune either "currdev or
rootdev" environment variables.  The right partition (for the ufs pre-boot
partition" is "part7:" in terms of loader.

It would seem that I can get loader.efi to work IFF I put all of FreeBSD's
/boot onto the DOS EFI partition.  Windows only made it 500 megabytes, but
I'm considering the hack.  This may be the only way it works, but it seems
it's not the way we "meant" it to work.

So... asking the group: Is there a way for boot1.efi to support EFI
graphical console, or, is there a way to get loader.efi smarter about
searching for partitions to boot, or, can we get the kernel to better
initialize the EFI console as it boots?

Note, BTW, that the kernel never seems to get the console correct... even
after booting.  I can type blind, but that's it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACpH0Md-XivJ=V_rtbYR5b-yPf_hwkqc0T=a06uFLHJ3Mtj59Q>