arch-flo-junk/systemd-initramfs/sbin/init

31 lines
608 B
Text
Raw Permalink Normal View History

2014-02-18 12:22:50 +00:00
#!/sbin/busybox1 sh
_PATH="$PATH"
export BB=/sbin/busybox1
cd /
$BB mount -t devtmpfs devtmpfs /dev -o mode=0755,nosuid
$BB mkdir /dev/pts
$BB mkdir /dev/socket
$BB mount -t proc proc /proc -o nosuid,noexec,nodev
$BB mount -t sysfs sys /sys -o nosuid,noexec,nodev
$BB mdev -s
$BB mount -t ext4 /dev/mmcblk0p30 /data
$BB mknod /dev/loop256 b 7 256
$BB losetup /dev/loop256 /data/arch.img
$BB mount -t ext4 -o rw,noatime /dev/loop256 /data/arch
$BB mkdir /cache
$BB mount -t ext4 /dev/mmcblk0p23 /cache
export PATH="${_PATH}"
#exec /sbin/init2
exec /sbin/busybox1 switch_root /data/arch /sbin/init