From owner-freebsd-hackers@freebsd.org Sun Apr 1 22:03:45 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 1D038F7F114 for ; Sun, 1 Apr 2018 22:03:45 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 B3906800C0 for ; Sun, 1 Apr 2018 22:03:44 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mail-io0-x231.google.com with SMTP id y128so16098772iod.4 for ; Sun, 01 Apr 2018 15:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=GBJGU5TTiG0iwO5myeOUk8nBjMqzCdtTdcRbHIuXk4Y=; b=NBHeLZA/yKYpLisdeZHpwEo44rMNeJ7xUz8y8ZLLyGIqYQGhRKFBkHIM4+YhrgEzkY zRN7F6K7D4WhK6jYx6kO03iLGCVnNNKRz54o3e/tIvoFUVw8Sb82+F9CNLzejkFhEhKR lS0GBjSR3rtbp4QJ88wyESkNjWC2lCJZzKCP9eN3ueaHos2sJ0jJaI+ysfQAgDrX1LwZ RXyFwuTd8ElcJeacvy4AzquuxpWK4Y6G1CFPZX4fktJ1qWjM98qy+1Pwbn0tZoV9ugqT xo9bavaTCmloK+4qgSrcmIp3mcPnkXu19NJeQbNxGCGUzQRMAoOVMyjnR/awoq7UFLqS v0qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=GBJGU5TTiG0iwO5myeOUk8nBjMqzCdtTdcRbHIuXk4Y=; b=eIbgCg7lC4yFB4V4K99scXK4Za3bSwdLHGFkCcdLWqoUx/wwHUIlqYxFIYhNdZkh38 IxniXNpyvACPJ6sW0jAqPVfzfWVxfTkKsL+aOPJvsVlJ1hNH7XPiibLCkU58/Yp9AMjO ThhvikV8j4qstXHe+IdMRhqeQ8QOOpu7zcEQOLAETexckzjKOPWUWgaHBy4gh+4IEPPs WMizpizJlmoUW3A82bu6L3MTJpMV1M5JHbe/upfG1W4T4wNrdk4oSfm6CYPZQkhshcoZ ETiXlKQd+gTZmF9xKP/p8pKqGcXPYUn8fUn5IKleTmW/RINRZi+ths07x/KYLveRBlKp Z0Aw== X-Gm-Message-State: ALQs6tDYru/zZurxsuw3hxKTqJJLEiMBVc+kH2lSu/Zc6HSYV1S4PqU7 KDBnVQcl8YBvL4j2Y7hHN0NKTDx6+pd1rgLTmw== X-Google-Smtp-Source: AIpwx48ZzldXBUIAH5dP9nZw4s5n6lW3/Zp84/FvbRyN/DGgH1D+yVVIbvFgANMAsfiLGcqok1nixssjVUg4zNBI/fE= X-Received: by 10.107.192.131 with SMTP id q125mr6324043iof.184.1522620223752; Sun, 01 Apr 2018 15:03:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.192.139.243 with HTTP; Sun, 1 Apr 2018 15:03:43 -0700 (PDT) From: Zaphod Beeblebrox Date: Sun, 1 Apr 2018 18:03:43 -0400 Message-ID: Subject: On UEFI dual booting. To: 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:03:45 -0000 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.