From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29874 invoked from network); 4 Sep 2023 18:22:11 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 4 Sep 2023 18:22:11 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 8DEF440F81; Tue, 5 Sep 2023 04:22:06 +1000 (AEST) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by minnie.tuhs.org (Postfix) with ESMTPS id 4017A40F65 for ; Tue, 5 Sep 2023 04:22:00 +1000 (AEST) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50079d148aeso2869996e87.3 for ; Mon, 04 Sep 2023 11:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693851718; x=1694456518; darn=tuhs.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9xx32codv1Q+CpVMxi7N6tgTV50wWhLTrZwvpgvj6BI=; b=KzOqqyBKBLWvB/HQ8ocERSWenq3E5X9kRwcKTTkgHYyu3RsQ+Ra1Uh0KOarI5no508 gimfmUkswe3xh3z2bw8S19uz2aIEiWYkwJORX8/wAoTc5ialvTYTod0vAMojk4CgjHQq C4YaIVkidtOfHWz+trIEE+Hgzhv372/R1kXUx/o70NCy8ivr9qI6XpQMUfTVX703Usyu VptzVfv82pUJ7BOyhpeRM2e5vXR1bN/ng5jKJkxWX2OGuQv8huQ0ByRo6rlSmRk/QDuS AQ4lWhre2gf9t54aVeZ3vj5ycuVI5S6DDg2ktItRM5YfQKLm9guBAASQs710lpI0kuq7 oUaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693851718; x=1694456518; h=content-transfer-encoding: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=9xx32codv1Q+CpVMxi7N6tgTV50wWhLTrZwvpgvj6BI=; b=f9XnnvNegOMDcJIdp/YL7ekXY919f64gHAj7DtdToPpvwiFw49RziFYMEyzzruiNxL 3h8QfrRoV8HsjSujZUs8mIooUieeRDB6+QrcHzFaPKNFzQ3GMOsZpavG+Z9npMG8nERB B4ZktL8ZS3pww9MhA9y2bb1BzHhBvwbNOt88Frc+PoXygEKjg5vg6BaewpEbomeCuZyk JTw+HfMxDfjSEOE/IstK8HLoEvYIBSDh5Xhxi8KcG2HiyHCOH5vDyu3uxz9o7ZU0OUhc BTRHwoAYZguMTX2OO7WiqnA0Pf3AxLrx4DCReiLKOlFGNIrStX6BKpanhGc0cUnnDIYk g5lg== X-Gm-Message-State: AOJu0YwFNe+GiiQuuZBDr5TkPsvu4noLmeB86nT6et9hg7JG9hURz4Ei ZBYCOPlb8Bt3PoRIrLXbVo6PudhPozPYmk7S7JdUoTJq X-Google-Smtp-Source: AGHT+IEdw1W9kBjAOanL50ulzVn47SLdhlSzpfRCuj9+XSJ+H57aQKbMpQ3q0iYDmGC8PALvntGCvpgTxIqWxGHcDdo= X-Received: by 2002:a2e:8707:0:b0:2b9:c4f6:fdd with SMTP id m7-20020a2e8707000000b002b9c4f60fddmr7165997lji.14.1693851718037; Mon, 04 Sep 2023 11:21:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dan Cross Date: Mon, 4 Sep 2023 14:21:21 -0400 Message-ID: To: Warner Losh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: K74T6XSHF4ADY42N4M7F5QSNYDZ2VEWG X-Message-ID-Hash: K74T6XSHF4ADY42N4M7F5QSNYDZ2VEWG X-MailFrom: crossd@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Ruizendaal , "tuhs@tuhs.org" X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Unix install & "standalone" package List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Sep 4, 2023 at 1:08=E2=80=AFPM Warner Losh wrote: > [snip] > There's a port of /boot/loader to illumos too, but I don't know > if it is the default, or just available. So I'll not chat about it more. I can confirm that it is the default on i86pc, though not universally. At Oxide, for example, we boot directly into a very small loader held in flash that has a compressed cpio archive containing the kernel and a few necessary kernel modules compiled into it (as a byte blob); we uncompress that blob into physical memory, locate and load the kernel like a normal ELF binary, and jump to the kernel's ELF entry point, passing a few basic arguments (notably, the location and length of the cpio archive in physical memory). Entry to the kernel is thus in 64-bit mode with paging enabled. > So the original 'standalone' environment where you had one program runnin= g on a system has evolved > into either a rich boot loader environment that lets one do a lot to deci= de what kernel to load, or towards > having a minimal selection of unix programs faster and using /bin/sh or s= imilar to do scripting. These > reduced environments are often called standalone, though all they share j= ust the name with the earlier > 'stand' programs: they are full unix programs, but with reduced feature s= ets and 'linker magic' to package > them in a way that's faster, smaller, etc (eg all in one binary). FreeBSD= 's boot loader is an outgrowth > of the original standalone env, by way of a port of NetBSD's libsa. > > I suspect in the future, we'll see more and more of a trend for low-level= init and then handing off to some > built-in kernel (be it Linux, BSD-based (there's now kexec), or whatever)= to reuse more of the vetted code > rather than re-inventing Unix inside the boot loader (which is a valid cr= iticism of FreeBSD's boot loader, > though it's rich feature set is what you get for the complexity). > > Does that answer the prompt? Should I try to make this into more of a ret= rospective paper and actually > do the research on the areas I was hand-wavy about? That would be interesting. I can still remember booting IBM 6150 RTs into a miniroot environment and using that to create and initialize filesystems when installing AOS (4.3BSD for the RT) back in the day. To my mind, the standalone programs were always oriented towards solving the related problems of bootstrap initialization onto a fresh machine, and disaster recovery when things were really, really messed up. As I recall, the RT miniroot could either load from tape, or one could `dd` it into swap and boot from that. In either case, I seem to recall it was copied into memory and run as a RAM disk. The idea of busy-box like "a bunch of utilities compiled into the same binary" was to save space, particularly since this would be copied into RAM; even with demand paging, redundant copies of bits from `libc` in each binary were a waste for what was intended to be a minimal environment anyway. - Dan C.