From nobody Tue Aug 13 20:27:38 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 4Wk2xz4fZCz5TMN9 for ; Tue, 13 Aug 2024 20:27:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wk2xz1G7Fz41KQ for ; Tue, 13 Aug 2024 20:27:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-70ea2f25bfaso4320842b3a.1 for ; Tue, 13 Aug 2024 13:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1723580870; x=1724185670; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=q4LNVzKTOyDncSJV5TPAElS653/+PSzdJIWJhsx31IU=; b=0GFRfxytzF/vcwc0hMyMi4Ofjk3QchmG+du6mGPF+Bw67L/pfehKbsZHm+QVVK1Hkq XO9EMivm4ULdWa42Jvcmjh33LuKcn9uBsU77G/zzxJiylPyPIWCimSyony8jtl3JAlOB Bp8/Kd4ZKPoIoxiLVXePScxs4CYxX/9lqRphndAIJSqeQDVrM7FeY6i8l8Kn/9qy8Jpy HFpu32CL6PfjJY4B8OgrkC31LOpt4UEivoIZ0fDXYMgyCCrQx+uaDRn6ZzNFVpNIE2M1 cIHYOV42OyGDu3HMHZFz5IudwVnZfNXGbvA0oWzvimKK77RKiId9VMYUIO4rwl0+IgKU hn9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723580870; x=1724185670; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q4LNVzKTOyDncSJV5TPAElS653/+PSzdJIWJhsx31IU=; b=mXzTQatbQ+FExo7+d+Q/0rnuj5IdYRdq5k3Alo4ys/T+FYQRXLcA1zbuJQVkHR5K/b PB+R4eeuiqq3p5+9CsGGT/iiXD2ixjWECtcvaUx8NpzBHDWQHn0wRcQ6xFtsk0+n10ab vHyzkCTox4YrrDiFlgz9a0d0XNvL8b7sw6rgI4KteEdpAvAR0jN7zJpi2/rgP2YZ47IQ B799UFSmSI/3HWb5Pbvp8jRoPWqi5ERrNXPpDcwlPxcZYJXnbHECErQgyGdFPj91Qzzc vrFLy8PLrzH+B76e8EIL4gn1hx8seHZ/2I9Blea6LzozwvaFbTmhdwjSV9CtjMdFszWT PYPw== X-Forwarded-Encrypted: i=1; AJvYcCV+XmvfMJK5YzmDrDCtGwBOzV/5F8pOM6TJnNMMG7W0Xmue0ri+X11t2tIyzjBmlW993OdyRaaZ1OQm37CaPnVgMAoL X-Gm-Message-State: AOJu0Yztin4/qp7mEa3XjoyfHvLgh4n4pYl86QJeHOdR4ri+zKTy2Ixc 5Co+VAm7s3P5b5vtNx/j5dmwQ/+fOdjACH9i3/Psa8Zl67KknGu/cAItpFiZiX4LbwpfSm2d8IM Z65uHIrasmp1SzAziSOHzRt80tEDGuAujEv0d8g== X-Google-Smtp-Source: AGHT+IEcWTua+CKSosBzKWl5X5C6baMzgfk+zTOv34EHl6VED1TFf38fzG2vUtZbxZIe+FW47Paof1ExBhmwZafNTeQ= X-Received: by 2002:a05:6a20:c78e:b0:1c4:b8a1:6db1 with SMTP id adf61e73a8af0-1c8eaf68995mr1127274637.38.1723580869648; Tue, 13 Aug 2024 13:27:49 -0700 (PDT) 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 References: <0C0CF611-4C88-4EF1-9F9A-3A35D5236854@cs.huji.ac.il> <245d3286bba24340cd2c0abbbb5f3993@bsdforge.com> In-Reply-To: <245d3286bba24340cd2c0abbbb5f3993@bsdforge.com> From: Warner Losh Date: Tue, 13 Aug 2024 14:27:38 -0600 Message-ID: Subject: Re: FreeBSD 14.1 and UEFI boot ignores bootme flag To: Chris Cc: Tomek CEDRO , Daniel Braniss , freebsd-hackers Content-Type: multipart/alternative; boundary="0000000000007a3d25061f967106" 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:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Wk2xz1G7Fz41KQ --0000000000007a3d25061f967106 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 13, 2024 at 2:02=E2=80=AFPM Chris wrot= e: > On 2024-08-13 10:23, Tomek CEDRO wrote: > > On Tue, Aug 13, 2024 at 3:30=E2=80=AFPM 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=3D./refind-flashdrive-0.13.2.im= g > of=3D/dev/da0 bs=3D1m > 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 i= t 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. 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 > --0000000000007a3d25061f967106 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Aug 13, 2024 at 2:02=E2=80=AF= PM Chris <bsd-lists@bsdforge.c= om> wrote:
danny@cs.huji.ac.il> w= rote:
>> (..)
>> At some point I succeeded in deleting the dvd, but now I see its b= ack.
>
> 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 ende= d
writing
a script to use it more effectively.

Ye= a. it's designed to be Linux compatible, but it's a bit cumbersome = to use.
It has the advantage of being unambiguous, though.
<= div>=C2=A0
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 wor= ks.
Almost never
need to futz with anything. I'm no stranger to (U)EFI or the boot proce= ss.
But IMHO
FreeBSD is not (average) user friendly in the (multi) boot department. Eith= er
multiple
FreeBSD, or OS's. Maybe I should make a port out of refind, or get perm= ission
to integrate
some of it into $BASE.

REFInd is GPL= 9;d, so that no can do.
=C2=A0
1.) https://en.wikipedia.org/wiki/REFInd

I'm currently using the 13.3.2 flashdrive image on a 15-current install=
https://so= urceforge.net/projects/refind/files/0.13.1/refind-flashdrive-0.13.2.zip/dow= nload

I simply unpacked it, and performed dd if=3D./refind-flashdrive-0.13.2.img =
of=3D/dev/da0 bs=3D1m
I'm booting FreeBSD, OpenBSD, Slackware, and Windows11 on the laptop I&= #39;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= =C2=A0options 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.

Also, gptboot.efi, though undocume= nted, makes the ping pong of nanobsd
trivial. But even better is = to use BEs with ZFS. I've largely moved to doing this
for mos= t things since it's so much more flexible...

W= arner
=C2=A0
HTH

--Chris
--0000000000007a3d25061f967106--