From owner-freebsd-questions@freebsd.org Mon Jul 30 01:14:11 2018 Return-Path: Delivered-To: freebsd-questions@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 8E0681068EE8 for ; Mon, 30 Jul 2018 01:14:11 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from cyrus.watson.org (cyrus.watson.org [204.107.128.30]) by mx1.freebsd.org (Postfix) with ESMTP id 357B9822FD for ; Mon, 30 Jul 2018 01:14:11 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id 2942EA3BEC; Mon, 30 Jul 2018 01:14:10 +0000 (UTC) Received: from fledge.watson.org (doug@localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.15.2/8.15.2) with ESMTP id w6U1E9oX036164; Sun, 29 Jul 2018 21:14:09 -0400 (EDT) (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.15.2/8.15.2/Submit) with ESMTP id w6U1E9h2036161; Sun, 29 Jul 2018 21:14:09 -0400 (EDT) (envelope-from doug@fledge.watson.org) Date: Sun, 29 Jul 2018 21:14:09 -0400 (EDT) From: doug Reply-To: doug@safeport.com To: Grzegorz Junka cc: FreeBSD Questions Mailing List Subject: Re: How to debug ZFS boot on UEFI? In-Reply-To: <4a382c1b-8785-c01b-b8bd-83894883c935@gjunka.com> Message-ID: References: <4a382c1b-8785-c01b-b8bd-83894883c935@gjunka.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (fledge.watson.org [127.0.0.1]); Sun, 29 Jul 2018 21:14:09 -0400 (EDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 01:14:11 -0000 On Sun, 29 Jul 2018, Grzegorz Junka wrote: > Hi, > > I've followed (more or less) this thread: > > http://daemonforums.org/showthread.php?t=10444 > > I have two disks nvd0 and nvd1 with three partitions on each: efi, > freebsd-swap and freebsd-zfs. I've created the ZFS pool and installed FreeBSD > manually (because on nvd1 I have also a few partitions used by Windows). On > nvd1p1 I've created the hierarchy of files as outlined in the post: > > efi/boot/BOOTx64.efi (copied from /boot/boot1.efi > boot/loader.rc (with the content as outlined in the post) > > In UEFI boot menu I can see all partitions (Windows, UEFI shell, UEFI USB > stick for 11.2, and the one I created). Booting from any partition works > apart from the one I created - when that partition is selected UEFI shows a > black screen for a second and then goes back to the boot menu. > > How can I debug what's wrong? > > Thanks > GrzegorzJ Did you try verbose boot? If you get nothing from that as far as I can tell that means the code in the firmware did not find any thing to transfer control to. I could never get beyond that point. When I was trying to do this on an HP. I followed Warren Block's script on doing this with gpart and shell commands. The script: http://www.wonkity.com/~wblock/docs/html/disksetup.html#_booting_with_uefi gives a clear definition of what the disk layout should be and what the contents of the EFI partition should be. Checking that against what you have would be a good first step. I did a dual boot on my laptop following this script: http://kev009.com/wp/2016/07/freebsd-uefi-root-on-zfs-and-windows-dual-boot/ I never got FreeBSD to boot on the laptop without using refind. If you do a windows install of refind that is the first thing invoked. That might solve your problem. For me it just worked after I finally got all the pieces in place I know this did not answer your question, if this get a response from any UEFI experts, look forward to that, the best I can do is to share my experience.