From bb46f58e997e58b2fd66960975a63cb8648311b8 Mon Sep 17 00:00:00 2001 From: Jonathan Amery Date: Mon, 26 Jan 2015 15:21:21 +0000 Subject: [PATCH] Copied direct from http://whiteboard.ping.se/Android/Debian --- debinit.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 debinit.sh diff --git a/debinit.sh b/debinit.sh new file mode 100644 index 0000000..aabda59 --- /dev/null +++ b/debinit.sh @@ -0,0 +1,25 @@ +#!/sbin/busybox sh + +# initramfs pre-boot init script + +# Mount the /proc and /sys filesystems +/sbin/busybox mount -t proc none /proc +/sbin/busybox mount -t sysfs none /sys +/sbin/busybox mount -t tmpfs none /dev + +# Something (what?) needs a few cycles here +/sbin/busybox sleep 1 + +# Populate /dev +/sbin/busybox mdev -s + +# Mount the root filesystem, second partition on micro SDcard +/sbin/busybox mount -t ext4 -o noatime,nodiratime,errors=panic /dev/mmcblk1p2 /mnt/root + +# Clean up +/sbin/busybox umount /proc +/sbin/busybox umount /sys +/sbin/busybox umount /dev + +# Transfer root to SDcard +exec /sbin/busybox switch_root /mnt/root /etc/init -- 2.30.2