ungleich-tools/build-alpine-chroot.sh

21 lines
405 B
Bash
Raw Normal View History

#!/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