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=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7605 invoked from network); 4 Sep 2023 22:11:20 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 4 Sep 2023 22:11:20 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 1823340F65; Tue, 5 Sep 2023 08:11:10 +1000 (AEST) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id 9B3E940A51 for ; Tue, 5 Sep 2023 08:11:03 +1000 (AEST) Date: Tue, 05 Sep 2023 00:10:59 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: (Norman Wilson) Message-ID: <20230904221059.sF2G0%steffen@sdaoden.eu> In-Reply-To: <9A989054DE79CE5059CBA74797391E39.for-standards-violators@oclsc.org> References: <9A989054DE79CE5059CBA74797391E39.for-standards-violators@oclsc.org> Mail-Followup-To: (Norman Wilson) , tuhs@tuhs.org User-Agent: s-nail v14.9.24-507-g0e7e3e8c46 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Message-ID-Hash: SOAARO5VDPL2IV6UXQZS5TLT6JKTXKNW X-Message-ID-Hash: SOAARO5VDPL2IV6UXQZS5TLT6JKTXKNW X-MailFrom: steffen@sdaoden.eu 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: 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: Norman Wilson wrote in <9A989054DE79CE5059CBA74797391E39.for-standards-violators@oclsc.org>: |I don't remember any special many-programs-in-one binary |like busybox in any Unix from the days when Unix was simple |enough for me to understand. That covers the entire lifetime |of the Research systems, but also System V and the BSDs and |their sundry offspring up into at least the 1990s. ... |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? AlpineLinux as used on my vserver has busybox by default and can cover most utitilities like that. The lead developer Copa once said something like "The idea is you install explicitly [if you want something better]". (It is a symlink farm that is selectively replaced by installing "real" packages iirc.) For my laptop it allows me easy boot management. To save you the chatter ("Chatten" is the name of my tribe .. most likely; could be Franken, Sueben .. and you know how it is): this approach is much easier and smaller than having lots of static binaries to copy around etc. I do not use secure boot, i have on EFI only a kernel, busybox and cryptsetup, and scripts (the laptop is named "kent"):: ... drwxr-xr-x 4 root root 4096 Jul 15 2021 EFI/ ... -rwxr-xr-x 1 root root 272 Feb 1 2022 kent.sh* -rwxr-xr-x 1 root root 313 Feb 1 2022 kent-direct.sh* drwxr-xr-x 1 root root 252 Oct 9 2022 ../ -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* So kent.sh can be init(8) for the ideapad-stage1.efi Linux kernel started via EFI as setup via efibootmgr(8) Boot0001* kent HD(1,GPT,5d6d756b-5de2-4e5d-b043-8d4ae1bb6eb0,0x800,0x82000)/File(\ideapad-stage1.efi)root=/dev/nvme0n1p1 rootfstype=vfat init=/kent.sh #!/busybox.static sh #@ kent, step 1., via EFI. PART_ROOT=/dev/nvme0n1p8 ROOT_DECRYPT='-t btrfs -o defaults,subvol=/crux/kent/root' PART_ROOT1=/dev/nvme0n1p8 ROOT_DECRYPT1='-t btrfs -o defaults,subvol=/crux/kent/root.old' INIT_S2=/boot/kent-2.sh . /linux-init-s1.sh and that allows me to unlock the harddisk. We then boot via $INIT_S2 and kexec(8) a kernel from the encrypted harddisk, so no code from EFI partition keeps on running. (We byte-compare the data from EFI with equal /boot/ files after booting the real system.) This allows nice and easy properties: only three files to track (cryptsetup, busybox, kernel), almost same set of files in /boot/ and /media/efi aka EFI. And ideapad-stage1.efi is the same kernel that later runs, but later we have also additional dynamic modules available. Ie, every few weeks i copy /boot/ideapad-6_1.efi over to be the new -stage1.efi. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)