From 73d7b6e0e3051fd5b0f053194788d89e76a18921 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 27 Sep 2019 22:20:11 +0200 Subject: [PATCH] ++ script for building alpine initramfs + kernel --- build-alpine-chroot.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 build-alpine-chroot.sh diff --git a/build-alpine-chroot.sh b/build-alpine-chroot.sh new file mode 100644 index 0000000..199c8b7 --- /dev/null +++ b/build-alpine-chroot.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Nico Schottelius, 2019-09-27 +# Objective: create an initramfs + kernel +# that is netbootable + +pkg="alpine-base" +chroot=/chroot + +apk -X https://nl.alpinelinux.org/alpine/edge/main -U --allow-untrusted -- +root $chroot --initdb add $pkg + +cd $chroot + +# For initramfs +ln -s sbin/init init + +# enabling base services +for svc in devfs dmesg mdev; do + chroot $chroot rc-update add $svc sysinit +done