From owner-freebsd-hackers@freebsd.org Sun Apr 1 22:55:37 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B64A2F819A4 for ; Sun, 1 Apr 2018 22:55:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4081F81F89 for ; Sun, 1 Apr 2018 22:55:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id e98-v6so16518660itd.4 for ; Sun, 01 Apr 2018 15:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yT23lzxxlbKlB6XYI9xPp5ZBqzDqs+TeDYRofgzCUFY=; b=UBhzqr2Ko8H6016NBD0Rm6xC0dFQP1JAB8TELD6B34Udr3I+OgBL9ILAeNnF8UcJKm Yca7ItHIpWy8TApXnYRUxzaECOl1fz66OMH4Lfw7fDlXF5p6S22P33LfnBwC8jGcjQuM cFKzC0iuBtr4LnVv1SQXfLblGG25p2wp9kerhXpvdCbBmiNbFyJf2lPyM5AcM9/67ZHu UmA34GYKFXo20VyQb27op1+VXWIRxrc4311VxNhcCg6+x78onW+QT22yGpl/4WfIfqA2 swcNa4T2x+m6w0uC7kDrEPgmB6nLRWz92U9eZ2LzXpHEVrNYSsF35wDg69uZUynamq8Q vZ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yT23lzxxlbKlB6XYI9xPp5ZBqzDqs+TeDYRofgzCUFY=; b=U+bE8BZK0tSdGmHSlBwuZQl0RIaZx5dG8JkrULhMrXI4l/OH/5o0Y5qKfmYISRDQ2j HtJr9Ugl/H5sYTjnZpL7ceUL2zHJCju6KrVKVcu7ibjBDeQ3r+l9ax6krRwMMp9s1bxK HhWwMGbz+MzSxdSl+S87p/5qGc9qGcOcp5B2Pj1S+wpEmJA9bYKZETzidKESThw06E7r qkhfPTYFSwHDj4J/BepteM5nkvbZ4l9bPhbIpZ4vxYdHsWXe1dwKxSv+ltslAIIVofB4 l/LPoBFik20gaHYwCFTTkdTy58DZWJzuUtOSWf93zuXk3LeCHBCDkaZNab3phPK0wY0B U1iw== X-Gm-Message-State: ALQs6tDbqhVbUBPbia9wRy84Qnkee71mRkLwemmQCyT/SU7verCMWPsB l0NB3fxoIrI3kAk811XPu7RqY2caszh1WSp74PrXOg== X-Google-Smtp-Source: AIpwx4/GzNnDYPIcusryA+9GsYCg9aaS1KTMoKRzzP7diPKhChRXCwlumpDfxrR3z0H1i4SEUzJw12VbNyoYVs078ME= X-Received: by 2002:a24:cac6:: with SMTP id k189-v6mr10246302itg.57.1522623336144; Sun, 01 Apr 2018 15:55:36 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.203.196 with HTTP; Sun, 1 Apr 2018 15:55:35 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: From: Warner Losh Date: Sun, 1 Apr 2018 16:55:35 -0600 X-Google-Sender-Auth: 4JCCBcQzWR5WxDhMn0uSAoLOKIE Message-ID: Subject: Re: On UEFI dual booting. To: Zaphod Beeblebrox Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2018 22:55:37 -0000 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 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" >