From nobody Tue Aug 13 23:06:33 2024 X-Original-To: hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wk6Tm1sjCz5TbLv for ; Tue, 13 Aug 2024 23:07:08 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (udns.ultimatedns.net [24.113.41.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ultimatedns.net", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wk6Tm0BKHz4RQt for ; Tue, 13 Aug 2024 23:07:07 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Authentication-Results: mx1.freebsd.org; none Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 47DN6Yqd041789; Tue, 13 Aug 2024 16:06:40 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ultimatedns.net; s=mx99; t=1723590400; x=1723591000; r=y; bh=1JpWpisoAWzJbRRn5wm/MmzwvSiA1UU7AzbveOwmSoA=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=m6WB1FYBaMRdklshGkmk8FFEzlmix/qOwVODg01WP5dQcwDmHVoAxrHMLGEZwm6cn wTlz/IT0RSRUPG/0+JviHiDxHM0hF+iIHaLJ8tbrf0T8h0lLub0wF1LGLbZAzGTI/2 TFnNLUl/OzScFn1sD1INPMWdO8UKUv0z3Dv0mWjDiPRMvRIEfiZ8uTfnc0HfFC7Q9n l5FdaDozwwVu3SidjcIHcJVONoeduwAmreqK/9P2Zy+gC1IjaH1ltpi2JMDVmSIhjM XUEHWhYyK7h60Gn/wRPZix4jGs6nSFY+cpYyt6vZ16/lMnt+QPj3IF+5FZ1RdPKYPc aHx4/vOF/7IXg== List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Date: Tue, 13 Aug 2024 16:06:33 -0700 From: Chris To: Warner Losh Cc: Tomek CEDRO , Daniel Braniss , freebsd-hackers Subject: Re: FreeBSD 14.1 and UEFI boot ignores bootme flag In-Reply-To: References: <0C0CF611-4C88-4EF1-9F9A-3A35D5236854@cs.huji.ac.il> <245d3286bba24340cd2c0abbbb5f3993@bsdforge.com> User-Agent: UDNSMS/17.0 Message-ID: X-Sender: bsd-lists@bsdforge.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US] X-Rspamd-Queue-Id: 4Wk6Tm0BKHz4RQt On 2024-08-13 13:27, Warner Losh wrote: > On Tue, Aug 13, 2024 at 2:02 PM Chris wrote: > >> On 2024-08-13 10:23, Tomek CEDRO wrote: >> > On Tue, Aug 13, 2024 at 3:30 PM Daniel Braniss >> wrote: >> >> (..) >> >> At some point I succeeded in deleting the dvd, but now I see its back. >> > >> > This may be added by BIOS / Setup :-) >> > >> >> So how do I add a second boot partition? >> > >> > Use efibootmgr as imp suggested and add another entry with desired >> > boot information, you may then select this new entry as the default. >> > It will show up in BIOS / Setup menu and you can change order over >> > there.. but the entry needs to be added with efibootmgr :-) >> > >> > No worries I had the same problem too some time ago, also found >> > reference to bootme flag which did not work (should be removed from >> > man pages?). Now I sometimes use F8 at boot to select different system >> > to boot.. but there are good looking menu like bootloaders for UEFI >> > like reEFInd [1], Clover [2], LibreBoot [3]. Maybe we need some more >> > documentation on this? :-) >> > >> I too found efibootmgr(8) unnecessarily cumbersome. So much so, that I >> ended >> writing >> a script to use it more effectively. >> > > Yea. it's designed to be Linux compatible, but it's a bit cumbersome to use. > It has the advantage of being unambiguous, though. > > >> In the end I downloaded a refind [1] image. Wrote it to a USB stick, >> booted >> it and >> installed it. It's dead simple, just does the right thing, and just works. >> Almost never >> need to futz with anything. I'm no stranger to (U)EFI or the boot process. >> But IMHO >> FreeBSD is not (average) user friendly in the (multi) boot department. >> Either >> multiple >> FreeBSD, or OS's. Maybe I should make a port out of refind, or get >> permission >> to integrate >> some of it into $BASE. >> > > REFInd is GPL'd, so that no can do. > > >> 1.) https://en.wikipedia.org/wiki/REFInd >> >> I'm currently using the 13.3.2 flashdrive image on a 15-current install >> >> https://sourceforge.net/projects/refind/files/0.13.1/refind-flashdrive-0.13.2.zip/download >> >> I simply unpacked it, and performed dd if=./refind-flashdrive-0.13.2.img >> of=/dev/da0 bs=1m >> I'm booting FreeBSD, OpenBSD, Slackware, and Windows11 on the laptop I'm >> writing this from. >> In your computer setup; simply choose refind as your default boot, and >> your >> done. >> > > Yea, I've often thought that having a UEFI Menu choice for booting one of > the many eifbootmgr options would be good to have. You can kinda sorta do it > by having a good boot order and setting BootNext and exiting the boot > loader, > but there can be some issues if there's no efibootmgr entry for an OS. > > Expanding the EFI lua bindings would be it possible to do nearly everything > that REFIND can do. All the building blocks are there, but nobody's found > the > time to put them together. ooh! I hadn't thought of that. You're right. Hell, forth would cover it, as well. > > Also, gptboot.efi, though undocumented, makes the ping pong of nanobsd > trivial. But even better is to use BEs with ZFS. I've largely moved to > doing this > for most things since it's so much more flexible... > > Warner > > >> HTH >> >> --Chris >> --Chris