I'm trying to get Backtrack to run on my Droid DNA. I've been tweaking the script little by little but I still come up with the following. I changed the loop on it, and another program always seems to jump in front, or I still get the ioctl error, then running it again gives the loop device exists (it doesn't the first time). Any ideas?
root@android:/sdcard/bt5 # sh bootbt
Loop device exists
ioctl LOOP_SET_FD failed: Device or resource busy
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM For DNA
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
1|root@android:/sdcard/bt5 # losetup
/dev/loop7: 0 /data/app-asec/fahrbot.apps.screen.pro1-1.asec root@android:/sdcard/bt5 #
Kernel does support looping. I found this out. Here's my modified boot script to start Backtrack:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system export kit=/sdcard/bt5 export bin=/system/bin export mnt=/data/local/mnt mkdir -p $mntcd / export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop99 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop99 b 7 99
fi
echo "SETTING UP LOOP DEVICE"
losetup /dev/block/loop99 /sdcard/bt5/bt5.imgmount -o loop,noatime -t ext2 $kit/bt5.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
busybox chroot $mnt /bin/bashecho "Shutting down BackTrack ARM For DNA"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop99
Even with loop99, I still get ioctl LOOP_SET_FD failed: Device or resource busy