[Android Q&A, Help & Troubleshooting] hosea1008:
Hello XDA-Developers!

I want to install Back Track 5 ARM in my AllWinner A10 based tablet, I followed the lesson for Galaxy and I downloaded the boot script for Galaxy and the bt5.img(3.25G). I changed some of the codes to launch BT5 in external sdcard and suit my ROM,then launched it, only to find some errors. Well, the source code of the boot script(modified by myself to suit my device) like this:

perm=$(id|busybox cut -b 5)

if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi

mount -o remount,rw /dev/block/mmcblk0p1 /system

export kit=/mnt/extsd/BT5

export bin=/system/bin

export mnt=/mnt

mkdir -p $mnt

export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH

export TERM=linux

export HOME=/

if [ -b /dev/loop2 ]; then

echo "Loop device exists"

else

busybox mknod /dev/loop2 b 7 0

fi

busybox mount -o loop,noatime -t extsd $kit/bt5.img $mnt

busybox mount --bind /dev/pts $mnt/dev/pts

busybox mount --bind /proc $mnt/proc

busybox mount --bind /sys $mnt/sys

busybox sysctl -w net.ipv4.ip_forward=1

echo "nameserver 8.8.8.8" > $/etc/resolv.conf

echo "127.0.0.1 localhost bt5" > $/etc/hosts

busybox chroot $/bin/bash

echo "Shutting down BackTrack ARM For Xoom"

umount $/dev/pts

umount $/proc

umount $/sys

umount $mnt

when I launch the script(bootbtV) in Terminal Emulator, only to find some errors like this:

u0_a63@android:/ $ su

u0_a63@android:/ # cd mnt/extsd/BT5

u0_a63@android:/mnt/extsd/BT5 # sh bootbtV

Loop device exists

mount: mounting /dev/loop8 on /mnt failed: No such device

mount: mounting /dev/pts on /mnt/dev/pts failed: No such file or directory

mount: mounting /proc on /mnt/proc failed: No such file or directory

mount: mounting /sys on /mnt/sys failed: No such file or directory

net.ipv4.ip_forward = 1

bootbtV[23]: can't create $/etc/resolv.conf: No such file or directory

bootbtV[24]: can't create $/etc/hosts: No such file or directory

chroot: can't change root directory to $/bin/bash: No such file or directory

Shutting down BackTrack ARM For Xoom

failed: No such file or directory

failed: No such file or directory

failed: No such file or directory

failed: Invalid argument

1|u0_a63@android:/mnt/extsd/BT5 #

Well, In my opinion, according to the errors "No such file or directory", I think it is the difference between my device and Galaxy that causes the errors. In my device, the file structure is different from what the boot script means, such is the file structure of my device's root directory:

drwxr-xr-x root root 2013-01-16 11:22 acct

drwxrwx--- system cache 2013-01-16 09:51 cache

dr-x------ root root 2013-01-16 11:22 config

lrwxrwxrwx root root 2013-01-16 11:22 d -> /sys/kernel/debug

drwxrwx--x system system 2013-01-13 17:14 data

-rw-r--r-- root root 116 1970-01-01 08:00 default.prop

drwxr-xr-x root root 2013-01-16 11:27 dev

lrwxrwxrwx root root 2013-01-16 11:22 etc -> /system/etc

-rwxr-x--- root root 105268 1970-01-01 08:00 init

-rwxr-x--- root root 2344 1970-01-01 08:00 init.goldfish.rc

-rwxr-x--- root root 19030 1970-01-01 08:00 init.rc

-rwxr-x--- root root 2644 1970-01-01 08:00 init.sun4i.rc

-rwxr-x--- root root 2230 1970-01-01 08:00 init.sun4i.usb.rc

-rwxr-x--- root root 1637 1970-01-01 08:00 init.trace.rc

-rwxr-x--- root root 3915 1970-01-01 08:00 init.usb.rc

-rwxr-x--- root root 1536000 1970-01-01 08:00 initlogo.rle

drwxrwxr-x root system 2013-01-16 11:22 mnt

-rw-r--r-- root root 782728 1970-01-01 08:00 nand.ko

dr-xr-xr-x root root 1970-01-01 08:00 proc

drwx------ root root 2012-10-11 13:57 root

drwxr-x--- root root 1970-01-01 08:00 sbin

lrwxrwxrwx root root 2013-01-16 11:22 sdcard -> /mnt/sdcard

drwxr-xr-x root root 2013-01-16 11:22 sys

drwxr-xr-x root root 2013-01-13 17:59 system

-rw-r--r-- root root 272 1970-01-01 08:00 ueventd.goldfish.rc

-rw-r--r-- root root 3879 1970-01-01 08:00 ueventd.rc

-rw-r--r-- root root 1313 1970-01-01 08:00 ueventd.sun4i.rc

lrwxrwxrwx root root 2013-01-16 11:22 vendor -> /system/vendor

I think, the only way to launch BT5 in my device successfully is to modify the boot script so that it can suit my device, especially the file structure. But I am a green hand in Linux, I don't know what does some of the codes mean, if you are good at Linux script, would you please give me some advice?

Thank you very much!