From owner-freebsd-questions@freebsd.org Tue Jul 25 06:36:05 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3AFEDB7C6A for ; Tue, 25 Jul 2017 06:36:05 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 33F2B6A5D7 for ; Tue, 25 Jul 2017 06:36:05 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id v6P6Zr7O030483 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 25 Jul 2017 08:35:54 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id v6P6ZrR8030480 for ; Tue, 25 Jul 2017 08:35:53 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Tue, 25 Jul 2017 08:35:53 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: FreeBSD questions Subject: Re: UEFI booting question In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (BSF 202 2017-01-01) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 06:36:05 -0000 On Thu, 20 Jul 2017 09:49-0700, Ashley Chase wrote: > iOn Thu, Jul 20, 2017 at 8:35 AM, DTD wrote: > > I have installed FreeBSD 10.3 into a partition but am unable to figure out > > how to get rEFInd boot the partition. The gpart list shows the following (I > > have filled in info from Windows dispart also): > > > > ada0 GPT (932G) > > -free- 1.0M > > ada0p1 EFI 1.0M K > > ada0p2 ms-reserved 16M > > ada0p3 ms-basic-data 446G C Windows > > ada0p8 EFI 1.0G > > ada0p9 freebsd-swap 4.0G > > ada0p10 freebsd-ufs 438G > > -free- 241M > > ada0p4 ms-basic-data 25G D LENOVO > > ada0p5 !de94bba... 1.0G WINRE_DRV > > ada0p6 !de94bba... 15G LENOVO_PART > > ada0p7 !bfbfafe7... 1.0G > > -free- 712K > It seems odd to me that you have 2 EFI partitions. Where did the > second ada0p8 come from? One of them was created by the Windows installer and the other by the FreeBSD installer. It's not a problem having additional EFI System Partitions (ESP), the UEFI spec allows it (subsection 13.3.3), but it might cause some confusion. Why is the second ESP at 1 GiB? Then again the other one is only at 1 MiB. Maybe the smallest ESP was created by the FreeBSD installer. Whenever dealing with a multi OS setup, first do your research to discover which OS creates which partitions. Install the least cooperating OS first. Make extra copies of the EFI boot loaders for each OS along the way. That's sure handy if you later want to use rEFInd or some other boot manager like GRUB2. I too noticed FreeBSD is in the habit of creating its own ESP, even if one already exists. I felt only one is needed, and I decided to take matters into my own hands when I installed FreeBSD on my laptop, a Dell Latitude E5530 already running Windows 10. I was installing FreeBSD on ZFS, so that's a semi-manual install due to my own preferences on the ZFS FS layout. Depending on the maturity of the UEFI firmware, you can specify your own boot entries in the firmware setup, including one for rEFInd. That way you have multiple options in the future. In the worst case when UEFI isn't mature enough to remember your boot options, you must create boot/efi/nstartup.nsh, a text file containing the absolute pathname of your preferred UEFI boot loader, e.g. rEFInd. The FreeBSD installer might have created a nstartup.nsh file for you. Consider this to be a great opportunity to learn more about UEFI and GPT. I recommend reading Chapter 5 and Section 13.3 in the current UEFI spec, now at version 2.7. You may skim the rest of the spec. http://www.uefi.org/ http://www.uefi.org/specifications http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf > > I do not know what to do from here. gpart set -a actvie ada0 breaks all > > except from booting from the CD. geom=ada0 is the only accepted target for > > set. > > Check out uefi(8) man page. > > Assuming you have refind installed, you should be able to copy > /boot/loader1.efi to your ESP after mounting it. (The EFI System > Partition is just an FAT32 filesystem. Refind should find the efi > executable automatically. > > If you don't have refind installed. look at the instructions for > manually installing on linux. You'll have to rename refind_x64.efi to > bootx64.efi because FreeBSD doesn't have efibootmgr. > > You may need to grow the ESP to fit refind or trim down the refind files. > > Also, if you go resizing Windows partitions MAKE SURE to fully > shutdown Windows or disable "rapid startup" or whatever it's called if > you're running Windows 8 or newer. > > > Killing windows is not a deal breaker for me (I tried to get the laptop w/o > > an O/S). I can not tell if doing a full disk install will revert all to a > > legacy BIOS setup. > > If you boot with UEFI when installing, you should have the choice to > install using GPT or MBR partitioning and BIOS or UEFI bootloader. > > On Thu, Jul 20, 2017 at 8:35 AM, DTD wrote: > > I have installed FreeBSD 10.3 into a partition but am unable to figure out > > how to get rEFInd boot the partition. The gpart list shows the following (I > > have filled in info from Windows dispart also): > > > > ada0 GPT (932G) > > -free- 1.0M > > ada0p1 EFI 1.0M K > > ada0p2 ms-reserved 16M > > ada0p3 ms-basic-data 446G C Windows > > ada0p8 EFI 1.0G > > ada0p9 freebsd-swap 4.0G > > ada0p10 freebsd-ufs 438G > > -free- 241M > > ada0p4 ms-basic-data 25G D LENOVO > > ada0p5 !de94bba... 1.0G WINRE_DRV > > ada0p6 !de94bba... 15G LENOVO_PART > > ada0p7 !bfbfafe7... 1.0G > > -free- 712K > > > > I do not know what to do from here. gpart set -a actvie ada0 breaks all > > except from booting from the CD. geom=ada0 is the only accepted target for > > set. > > > > Killing windows is not a deal breaker for me (I tried to get the laptop w/o > > an O/S). I can not tell if doing a full disk install will revert all to a > > legacy BIOS setup. > > > > _____ > > Douglas Denault > > http://www.safeport.com > > doug@safeport.com > > Voice: 301-217-9220 > > Fax: 301-217-9277 -- Trond