The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: Norman Wilson <norman@oclsc.org>, tuhs@tuhs.org
Subject: [TUHS] Re: Unix install & "standalone" package
Date: Wed, 6 Sep 2023 11:50:45 -0600	[thread overview]
Message-ID: <CANCZdfoy0UJyFdvJ_fO4FDks_dfEOhsJo+7p2RORdk6gQWf7qg@mail.gmail.com> (raw)
In-Reply-To: <20230905155301.mIziN%steffen@sdaoden.eu>

[-- Attachment #1: Type: text/plain, Size: 3147 bytes --]

On Tue, Sep 5, 2023 at 9:53 AM Steffen Nurpmeso <steffen@sdaoden.eu> wrote:

> Steffen Nurpmeso wrote in
>  <20230904221059.sF2G0%steffen@sdaoden.eu>:
>  |Norman Wilson wrote in
>  | <9A989054DE79CE5059CBA74797391E39.for-standards-violators@oclsc.org>:
>  ...
>  ||Perhaps the question to ask is why such a magic program is
>  ||needed at all.  Is it just because programs like the shell
>  ||have become so large and unwieldy that they won't fit in
>  ||a small environment suitable for loading into an initramfs?
>  ...
>  |For my laptop it allows me easy boot management.
>  ...
>  |  -rwxr-xr-x  1 root root     4596 Feb  4  2023  linux-init-s1.sh*
>  |  -rwxr-xr-x  1 root root     3646 Feb  4  2023  linux-init-lib.sh*
>  |  -rwxr-xr-x  1 root root  5480120 Feb 11  2023  cryptsetup.static*
>  |  -rwxr-xr-x  1 root root  1978368 Aug 15 18:51  busybox.static*
>  |  -rwxr-xr-x  1 root root 10112672 Aug 26 18:44  ideapad-stage1.efi*
>
> Only to add that this is because of Linux and the way it is doing
> things.  If i would use FreeBSD on bare metal, then i would have
> an EFI boot loader on EFI that knows (only) enough to ask for
> passphrase (correct me if i am wrong), and can then boot the
> kernel from FFS or ZFS.  (You have to choose dedicated ZFS boot
> loader iirc, but despite that...)
>

No, you don't have to choose the dedicated ZFS boot loader, at least not
anymore.

Also, you can use boot1.efi to load loader.efi from the root filesystem to
load the kernel, or you could use loader.efi directly on the ESP to load
the kernel. boot1 barely knows anything (and has only one choice of
what to boot). loader.efi is the full deal, and can do rather a lot of
sophisticated things.


> I know GRUB (and maybe other) Linux bootloaders can do all that,
> but they are huge, are badly maintained, or under-documented, let
> alone with local manuals, and i am too stupid to configure them
> (due to all that).  refind is ok, however.  But.. be aware of
> typos in the configuration..
>
> But anyhow.  With an EFI_STUB Linux kernel i can save me all that,
> with busybox i get a complete environment (i then even create an
> initrd in /boot/ on the fly so i do not have to type the password
> a second time, that can (optionally) be cached, and is, actually
>
>   -rw------- 1 root root  4495987 May 29 16:29 .kent.initrd.0
>
> Unfortunately cryptsetup is needed even though, i think, the
> kernel has anything needed; you just cannot access it.  cryptsetup
> is only needed for "$cs open $PART_ROOT p_root --key-file -".
> Of course i am no real Linux expert but only a do-it-yourself guy.
> busybox allows me to manage this easily, to answer your question.
>

You could do that on FreeBSD with a loader.efi that has a ram disk
built into it as well, including a 'beastie box' thing that's akin to
busybox.
It will boot in one step and no no further I/O to get a running system.
Others have used this for secure boot and to boot a small ram disk that's
later discarded as userland decides what root should be. But it's much less
automated than in Linux...

Warner

[-- Attachment #2: Type: text/html, Size: 4136 bytes --]

  reply	other threads:[~2023-09-06 17:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 14:44 [TUHS] " Norman Wilson
2023-09-04 14:55 ` [TUHS] " Vincenzo Nicosia
2023-09-04 17:20   ` Warner Losh
2023-09-04 19:05     ` Clem Cole
2023-09-05 17:03       ` Paul Winalski
2023-09-05 18:02         ` Clem Cole
2023-09-04 19:59     ` Theodore Ts'o
2023-09-04 23:51       ` Warner Losh
2023-09-04 17:18 ` Warner Losh
2023-09-04 22:10 ` Steffen Nurpmeso
2023-09-05 15:53   ` Steffen Nurpmeso
2023-09-06 17:50     ` Warner Losh [this message]
2023-09-07  0:11       ` Steffen Nurpmeso
2023-09-07 16:05         ` Warner Losh
2023-09-08 14:58           ` Theodore Ts'o
2023-09-08 13:56     ` Michael Kjörling
2023-09-08 23:38       ` Steffen Nurpmeso
2023-09-09 22:43         ` Steffen Nurpmeso
2023-09-11  4:10         ` Theodore Ts'o
2023-09-11 22:05           ` Steffen Nurpmeso
2023-09-05  1:07 ` Jonathan Gray
  -- strict thread matches above, loose matches on Subject: below --
2023-09-04  9:57 [TUHS] " Paul Ruizendaal via TUHS
2023-09-04 14:53 ` [TUHS] " emanuel stiebler
2023-09-04 17:07 ` Warner Losh
2023-09-04 18:21   ` Dan Cross
2023-09-05 11:15   ` Paul Ruizendaal via TUHS
2023-09-05 14:15     ` Clem Cole
2023-09-05 17:03     ` Warner Losh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANCZdfoy0UJyFdvJ_fO4FDks_dfEOhsJo+7p2RORdk6gQWf7qg@mail.gmail.com \
    --to=imp@bsdimp.com \
    --cc=norman@oclsc.org \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).