notioninkadam/debian-ramdisk/init

28 lines
443 B
Text
Raw Permalink Normal View History

2014-06-21 13:53:04 +00:00
#!/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