From owner-freebsd-questions@freebsd.org Sun Mar 25 04:43:00 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 577CEF6CE23 for ; Sun, 25 Mar 2018 04:43:00 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from relay2.tomsk.ru (mail.sibptus.tomsk.ru [212.73.124.5]) by mx1.freebsd.org (Postfix) with ESMTP id A9D9373368 for ; Sun, 25 Mar 2018 04:42:59 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) X-Virus-Scanned: by clamd daemon 0.98.5_1 for FreeBSD at relay2.tomsk.ru Received: from [212.73.125.240] (HELO admin.sibptus.transneft.ru) by relay2.tomsk.ru (CommuniGate Pro SMTP 5.1.16) with ESMTPS id 39963195; Sun, 25 Mar 2018 10:38:05 +0600 Received: from admin.sibptus.transneft.ru (sudakov@localhost [127.0.0.1]) by admin.sibptus.transneft.ru (8.15.2/8.15.2) with ESMTP id w2P4gu3j095491; Sun, 25 Mar 2018 11:42:58 +0700 (+07) (envelope-from vas@mpeks.tomsk.su) Received: (from sudakov@localhost) by admin.sibptus.transneft.ru (8.15.2/8.15.2/Submit) id w2P4gq9g095490; Sun, 25 Mar 2018 11:42:52 +0700 (+07) (envelope-from vas@mpeks.tomsk.su) X-Authentication-Warning: admin.sibptus.transneft.ru: sudakov set sender to vas@mpeks.tomsk.su using -f Date: Sun, 25 Mar 2018 11:42:52 +0700 From: Victor Sudakov To: Trond Endrest?l Cc: FreeBSD questions Subject: Re: Solved. Re: Dualboot and ZFS Message-ID: <20180325044252.GB95361@admin.sibptus.transneft.ru> References: <20180319171027.GA84127@admin.sibptus.transneft.ru> <20180320094625.GA24463@admin.sibptus.transneft.ru> <20180321061231.GA73086@admin.sibptus.transneft.ru> <20180322015043.GA16501@admin.sibptus.transneft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: AO "Svyaztransneft", SibPTUS X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2018 04:43:00 -0000 Trond Endrest?l wrote: > > > > 1. If I have more than one freebsd-ufs partition, how can I configure > > > boot1.efi (AKA /EFI/BOOT/BOOTX64.EFI) to boot the loader from a > > > particular partition, not from the first one? > > > > I doubt you can without modifying the source code. Such has never been > > an issue at my end. Maybe someone else will chime in. > > This is from uefi(8) on fairly recent stable/11: > > 2. boot1.efi reads boot configuration from /boot.config or > /boot/config. Unlike other first-stage boot loaders, > boot1.efi passes the configuration to the next stage boot > loader and does not itself act on the contents of the file. > 3. boot1.efi searches partitions of type freebsd-ufs and > freebsd-zfs for loader.efi. The search begins with partitions > on the device from which boot1.efi was loaded, and continues > with other available partitions. If both freebsd-ufs and > freebsd-zfs partitions exist on the same device the > freebsd-zfs partition is preferred. boot1.efi then loads and > executes loader.efi. > > Apparently, there are some options. Using /boot.config or /boot/config > on the ESP. Using /boot/loader.conf whereever /boot/loader.efi > resides. Relocating loader.efi to wanted the UFS partition. Note the > preference towards ZFS when both are present. I don't have any > experience using either option. IMHO boot1.efi could at least honor the "bootme" flag if there are several freebsd GPT partitions, the way gptboot does. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN AS43859