Skip to content

Instantly share code, notes, and snippets.

@mgalgs
Last active August 29, 2015 14:21
Show Gist options
  • Save mgalgs/9817d50c3622e6e1252f to your computer and use it in GitHub Desktop.
Save mgalgs/9817d50c3622e6e1252f to your computer and use it in GitHub Desktop.
Bare bones Busybox /init (adapted from http://jootamam.net/howto-initramfs-image.htm)
#!/bin/sh
# Mount things needed by this script
mount -t proc proc /proc
mount -t sysfs sysfs /sys
# Disable kernel messages from popping onto the screen
echo 0 > /proc/sys/kernel/printk
# Clear the screen
clear
# Create all the symlinks to /bin/busybox
busybox --install -s
# Create device nodes
mknod /dev/null c 1 3
mknod /dev/tty c 5 0
mdev -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment