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: 55793e48624676a1fa6632dfad13e30eac16e4df
parent ba8bcb2791540d31174b6c7daaf44e62c0e692ec
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 31 Mar 2022 20:26:44 +0200

make-initrd.sh: Fix for glibc on x86_64

Diffstat:

Mmake-initrd.sh7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/make-initrd.sh b/make-initrd.sh @@ -16,8 +16,11 @@ if test -e "$out_base"; then fi mkdir -p "$out_base" || die "Failed: mkdir $out_base" cd "$out_base" || die "Failed: cd $out_base" -mkdir -p usr/bin bin lib dev proc sys newroot etc || die "Failed creating base directories" +mkdir -p bin lib dev proc sys newroot etc || die "Failed creating base directories" ln -s /proc/mounts etc/mtab || die "Failed symlink for /etc/mtab" +ln -s . usr +ln -s lib lib64 +ln -s lib lib32 if test -d "/lib/modules" then @@ -43,7 +46,7 @@ done cp "${WORKDIR}/init" . || die "copying init" chmod 755 init || die "init chmod" ln bin/mksh bin/sh -bin/busybox --install usr/bin +bin/busybox --install bin for lib in $(find bin -type f -exec lddtree -l {} + | grep -v bin/ | sort | uniq); do cp "$lib" lib/