-
-
Save anonymous/8787dd24b6fc7e061b6637d9f61c2f8f to your computer and use it in GitHub Desktop.
example initramfs init script for https://wiki.gentoo.org/wiki/Raspberry_Pi/Minimal_musl%2Bbusybox_cross_building
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/busybox sh | |
mount -t proc none /proc | |
mount -t sysfs none /sys | |
mount -t tmpfs tmpfs /mnt | |
mkdir /mnt/s /mnt/u /mnt/w /mnt/m | |
mv squash /mnt | |
mount -t squashfs /mnt/squash /mnt/s | |
mount -t overlay overlay -olowerdir=/mnt/s,upperdir=/mnt/u,workdir=/mnt/w /mnt/m | |
umount /proc | |
umount /sys | |
exec switch_root /mnt/m /sbin/init || exec sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment