notioninkadam/debian-ramdisk/init
2014-06-21 15:53:04 +02:00

27 lines
443 B
Text
Executable file

#!/bin/busybox sh
mkdir -m 0700 /root /dev
mknod /dev/tty1 c 4 1
setfont /dev/tty1
mknod /dev/mmcblk0p1 b 179 1
sleep 3
mount -t ext3 -o rw,noatime /dev/mmcblk0p1 /root
if [[ -x "/root/sbin/init" ]]; then
exec switch_root /root /sbin/init
fi
mkdir -m 0700 /dev /sys /proc /sbin /usr /usr/bin /usr/sbin
mount -t proc proc /proc
mount -t sysfs sysfs /sys
busybox --install -s
mknod /dev/null c 1 3
mknod /dev/tty c 5 0
mdev -s
exec sh