#!/system/bin
# Linux alguh: debi Lope Linux: exit
## busybox mount -o remount,rw /system
## busybox cp debi /system/bin/
## busybox mount -o remount,ro /system
echo "Mounting debian on /data/local/debian ..."
busybox mknod /dev/block/loop254 b 7 254
busybox losetup /dev/block/loop254 /sdcard/external_sd/debian/debian.img
busybox mount -t ext2 /dev/block/loop254 /data/local/debian
busybox mount -o bind,rw /sdcard/external_sd/debian/data /data/local/debian/data
cd /data/local/debian
export PATH=$bin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH
export TERM=linux
export HOME=/root
export USER=root
export LANG=fi_FI.UTF-8
export PS1='USER@HOSTNAME:${PWD-?} # '
busybox mount -t devpts devpts /data/local/debian/dev/pts
busybox mount -t proc proc /data/local/debian/proc
busybox mount -t sysfs sysfs /data/local/debian/sys
echo "Chrooting into /data/local/debian ..."
echo "Use debian from command line, then exit"
busybox chroot /data/local/debian/ /bin/bash
# Tas kohtas Linuxas ruadamine
# Lopukse exit komendo
echo "Unmounting debian..."
busybox umount /data/local/debian/dev/pts
busybox umount /data/local/debian/proc
busybox umount /data/local/debian/sys
busybox umount -l /data/local/debian/
busybox losetup -d /dev/block/loop254
busybox rm /dev/block/loop254
echo "debian unmounted"
## Linux kayttoliittyman ker:
## Linuxas olles
## vncserver -geometry 1280x800 -dpi 240
## keksi peittosana
## Tiijostos /root/.vnc/xstartup rivin
## /etc/X11/Xsession sijah kirjuta openbox-session
## Menigo pahoi? Sit
## killall Xtightvnc; rm -rf .vnc; rm -rf /tmp/.X*
## da sit uvvessah.
## Androidas: azenda androidVNC client
## androidVNC:n alguazetuksis: lizanimi mitah, adressi 127.0.0.1,
## verai 5901, kayttai root, vari 24 bit. Da sit connect
## Lopetus menunybly da Disconnect