logo

bootstrap-initrd

Linux initrd generator to bootstrap a POSIX-ish system from a reasonably small binary seed git clone https://hacktivis.me/git/make-initrd.git
commit: 66fb82207ed6a735a3219cf5d5e66b75b4caf63e
parent 55793e48624676a1fa6632dfad13e30eac16e4df
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  9 Jul 2022 19:40:16 +0200

Make repository reuse compliant

Diffstat:

DLICENSE13-------------
ALICENSES/ISC.txt8++++++++
DREADME9---------
AREADME.md21+++++++++++++++++++++
Minit2+-
Mmake-initrd.sh4++--
6 files changed, 32 insertions(+), 25 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -1,13 +0,0 @@ -Copyright (c) 2017-2018, Haelwenn (lanodan) Monnier <contact@hacktivis.me> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/LICENSES/ISC.txt b/LICENSES/ISC.txt @@ -0,0 +1,8 @@ +ISC License: + +Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-2003 by Internet Software Consortium + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README b/README @@ -1,9 +0,0 @@ -# make-initrd - -A custom initrd (aka initramfs) generator. It’s quite at the first steps, configuration is mainly done in ``init`` and ``make-initrd.bash`` scripts at this point but it works (I use it in production actually). - -## Tested systems -All are running Gentoo (GNU+)Linux with ZFS on LUKS. -* arm musl -* amd64 musl -* amd64 Hardened glibc (tends to have bugs because of how broken glibc is) diff --git a/README.md b/README.md @@ -0,0 +1,21 @@ +# make-initrd +``` +Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +SPDX-License-Identifier: ISC +``` + +A barebones initrd (aka initramfs) generator for Linux, intended for systems with simple but special needs like an mirrored LUKS+ZFS root pool. + +Write your own ``init`` executable (my own is provided as example) and declare it's required commands in ``make-initrd.sh`` which will generate the initramfs. + +## Dependencies +* POSIX environment +* (optionnal) busybox +* (optionnal) lddtree command from pax-utils, required for glibc systems + +## Tested systems +All are using ZFS on LUKS. + +* Gentoo Linux amd64 musl +* Gentoo Linux amd64 glibc +* Alpine Linux amd64 (musl) diff --git a/init b/init @@ -1,6 +1,6 @@ #!/bin/sh # Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me> -# Distributed under the terms of the ISC license +# SPDX-License-Identifier: ISC export PATH=/bin:/sbin:/usr/bin:/usr/sbin export init=/sbin/init newroot=/newroot root=zroot/ROOT/gentoo sh=/bin/sh level=3\ -a dev_hotplug=mdev diff --git a/make-initrd.sh b/make-initrd.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2017-2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me> -# Distributed under the terms of the ISC license +# Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# SPDX-License-Identifier: ISC out_base=initramfs-all elves="lvm busybox blkid lsblk cryptsetup mksh zfs zpool"