Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Apr 2018 16:55:35 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Zaphod Beeblebrox <zbeeble@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: On UEFI dual booting.
Message-ID:  <CANCZdfqVGcMt40y43LbNuJMjc4apJ8O%2BhRdTrp=UXQPiB10knw@mail.gmail.com>
In-Reply-To: <CACpH0Md-XivJ=V_rtbYR5b-yPf_hwkqc0T=a06uFLHJ3Mtj59Q@mail.gmail.com>
References:  <CACpH0Md-XivJ=V_rtbYR5b-yPf_hwkqc0T=a06uFLHJ3Mtj59Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dual boot doesn't work with UEFI. boot1.efi and loader.efi have different
sets of issues, but basically they guess what to boot, and that's
incompatible with selecting this or that.

This is a problem I've been working on for the past 9 months. I've peeled
away many layers of this onion (and gotten side tracked by lua for a bit),
but I'm finally back to the point where I have a loader.efi that can be on
the ESP (the DOS partition) and that's setup to finish implementing the
UEFI boot manager protocol....

Warner

On Sun, Apr 1, 2018 at 4:03 PM, Zaphod Beeblebrox <zbeeble@gmail.com> wrote:

> 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.
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqVGcMt40y43LbNuJMjc4apJ8O%2BhRdTrp=UXQPiB10knw>