++ script for building alpine initramfs + kernel

This commit is contained in:
Nico Schottelius 2019-09-27 22:20:11 +02:00
parent 773ea94915
commit 73d7b6e0e3

20
build-alpine-chroot.sh Normal file
View file

@ -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