logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/bootstrap-initrd.git
commit: 6ea00992697cf5a4d6529786fee1936d1b6afd0f
parent b133d7abd9512cc8e38a352a6395afde4e554f02
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  6 May 2024 01:46:51 +0200

make-root.sh: Move merged-bin from /bin to /usr/bin

As otherwise unpacking Alpine apks just overrides the symlinks. *sigh*

Diffstat:

Minit.sh4+---
Mmake-root.sh9++++++---
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/init.sh b/init.sh @@ -96,9 +96,7 @@ build_hierloom() { bmake CC=$CC AR="ar" RANLIB=true -C "$cmd" bmake CC=$CC AR="ar" RANLIB=true -C "$cmd" install done - ln -s /usr/5bin/sort /bin/sort - # Remove sort stub - test -L /usr/bin/sort && rm /usr/bin/sort + ln -fs /usr/5bin/sort /bin/sort } build_utils_std() { diff --git a/make-root.sh b/make-root.sh @@ -82,10 +82,13 @@ done deblob -mkdir -p bin dev proc sys etc tmp || die "Failed creating base directories" +mkdir -p dev proc sys etc usr/bin || die "Failed creating base directories" ln -s /proc/mounts etc/mtab || die "Failed symlink for /etc/mtab" -ln -s . usr -chmod 777 tmp +ln -s bin sbin +ln -s usr/lib lib +ln -s usr/bin bin +ln -s usr/bin sbin +mkdir -m 777 tmp for i in fd stderr stdin stdout; do ln -fs proc/self/$i dev/$i