From owner-freebsd-questions@freebsd.org Sun Mar 3 19:26:16 2019 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 73B5E15158F2 for ; Sun, 3 Mar 2019 19:26:16 +0000 (UTC) (envelope-from matthias@smormegpa.no) Received: from mailrelay4-1.pub.mailoutpod1-cph3.one.com (mailrelay4-1.pub.mailoutpod1-cph3.one.com [46.30.210.185]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10FAB8F992 for ; Sun, 3 Mar 2019 19:26:14 +0000 (UTC) (envelope-from matthias@smormegpa.no) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smormegpa.no; s=20140924; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=6W+3UOjqSYms1v0F127ptEITx+B+rKLCYD7Fji5ND2A=; b=d/CX2OVqz9sCda6OtmA9ckiqSRlS9wpNNEUa6tbm/BXMNIwOuZXE4WlxH8wS9HlQQN408Y336TnP6 JabnbVz30omuyukce3u71y1cO3Bf5Z2MfTV/L3ZtdRvm+BOfov/JhHapaoisfhMYtsM6mDLMD0lKCN HIeZrx60ubUd/VBo= X-HalOne-Cookie: 277375a94c2d296db6109ae2d5db55dfd028e4bb X-HalOne-ID: f229fe8e-3de7-11e9-a598-d0431ea8bb10 Received: from picadelly.monsieur.mathieu (unknown [85.165.244.175]) by mailrelay4.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id f229fe8e-3de7-11e9-a598-d0431ea8bb10; Sun, 03 Mar 2019 19:10:02 +0000 (UTC) Message-ID: <6737c29e1674ce03a3c253a7c92cdc4e07686536.camel@smormegpa.no> Subject: Re: Failed to load '/boot/loader.efi' From: Matthias Oestreicher To: freebsd-questions@freebsd.org Date: Sun, 03 Mar 2019 20:10:01 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 10FAB8F992 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=smormegpa.no header.s=20140924 header.b=d/CX2OVq X-Spamd-Result: default: False [3.72 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[smormegpa.no:s=20140924]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[smormegpa.no]; NEURAL_SPAM_MEDIUM(0.99)[0.986,0]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_SHORT(0.91)[0.908,0]; DKIM_TRACE(0.00)[smormegpa.no:+]; MX_GOOD(-0.01)[mx1.pub.mailpod3-cph3.one.com,mx2.pub.mailpod3-cph3.one.com,mx3.pub.mailpod3-cph3.one.com]; RCVD_IN_DNSWL_NONE(0.00)[185.210.30.46.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_LONG(0.97)[0.968,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.67)[ipnet: 46.30.208.0/21(1.98), asn: 51468(1.42), country: DK(-0.04)]; ASN(0.00)[asn:51468, ipnet:46.30.208.0/21, country:DK]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2019 19:26:16 -0000 Am Samstag, den 02.03.2019, 21:07 +0000 schrieb Grzegorz Junka: > Hello, > > I am trying to configure UEFI loader to boot FreeBSD 12. The UEFI > shell > prints the following: > > > > FreeBSD EFI boot block > > Loader path: /boot/loader.efi > > Initializing modules: ZFS UFS > Load Path: \efi\boot\BOOTx64.efi > Load Device: > PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x2)/Pci(0x4,0x0)/Pci(0x0,0x0)/NVMe > (0x1,8D-7F-B1-71-55-38-25-00)/HD(1,GPT,F4EC62C3-B000-4A60-AAA6- > 7079751A497D,0x800,0x64000) > BootCurrent: 0003 > BootOrder: 0000 0005 0006 0003[*] > Probing 12 block devices......+...*.... done > ZFS found the following pools: tank7 > UFS found no partitions > Failed to load '/boot/loader.efi' > panic: No bootable partions found! > > I can import the ZFS pool fine when booting a memstick livefs. Why > loader.efi isn't importing it? > > efibootmgr -v gives the following > > BootCurrent: 0005 > Timeout : 5 seconds. > BootOrder: 0000, 0005, 0006, 0003 > Boot0* Windows Boot Manager > HD(5,GPT,5804e565-b8f6-4f47-9314- > 9eb4cfb79697,0x1d55e000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EF > I) > nvd1p5:/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI (null) > * Boot5* UEFI OS > HD(1,GPT,f4ec62c3-b000-4a60-aaa6- > 7079751a497d,0x800,0x64000)/File(\EFI\BOOT\BOOTX64.EFI) > nvd1p1:/EFI/BOOT/BOOTX64.EFI (null) > Boot6* Hard Drive BBS(HD,,0x0) > Boot3 UEFI: Built-in EFI Shell > VenMedia(5023b95c-db26-429b-a648-bd47664c8012) > > I've manually created /EFI/BOOT/BOOTx64.EFI by copying > /boot/boot1.efi > from the livefs. The content of /EFI is just one file: > > EFI/Boot/bootx64.efi > > Can I somehow install the /boot/boot1.efifat manually to try to make > it > working? I am installing FreeBSD 12 by partitioning disk manually so > bsdsysinstall doesn't run, and it seems there were some changes > around > the EFI partition recently, e.g. support for /efi/freebsd/loader.efi. > > Thanks > > GrzegorzJ Hei Grzegorz, Are you trying to dual boot with windows? If not and you are just trying to manually install FreeBSD and want to boot ZFS filesystem via UEFI, then you have to create an EFI partition and copy the EFI bootcode from /boot/boot1.efi onto it. The EFI partition can be anywhere on the disk, like first, last or in the middle somewhere. You need 200M of free space. If you are out of free space, I usually just shrink the swap partition to get 200M of free space. Note that to boot UEFI, a GPT partitioning scheme is required. MBR scheme does not work. Disclaimer: Caution is required when installing bootcode, you can easily wipe your precious data, so be careful and doublecheck every command! If you already have created a pool and no space is left of your ZFS drive, please post the output from: % gpart show and we'll see where we can steal some space for the EFI partition. In case you have an EMPTY disk (e.g. /dev/ada0) or a disk you want to WIPE use the following commands to install EFI bootcode and then go on with creating a ZFS partition and pool, etc... DO NOT RUN THEM IF YOU ALREADY HAVE IMPORTANT DATA ON YOUR DISK. # gpart destroy -F ada0 # gpart create -s gpt ada0 # gpart add -t efi -s 200m ada0 # gpart bootcode -p /boot/boot1.efifat ada0 Regards Matthias > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org"