3 # is /debian already mounted? if so, skip mounts
4 if ! awk '{print $2}' /proc/mounts | grep -q '^/debian$'
10 mount -t ext3 -o noatime,errors=remount-ro /mnt/sdcard/debian.img /debian
12 # bind-mount special file systems from outside
13 for fs in /dev /proc /sys
15 mount -o bind "$fs" "/debian$fs"
18 # bind-mount android file systems so we can use them from debian
19 # busybox find has no -empty option so we have to do it like this
20 find /debian/android -type d |
23 if test -z "$(ls $dir)"
28 sed 's,^/debian/android,,' |
31 mount -o bind "$fs" "/debian/android$fs"
36 chroot /debian /usr/local/sbin/debian-init