Ubuntu - Galaxy S II General

Currently trying to get this to work on my S2 and having issues.
My phone is running official KH3, CF-Rooted.
Using ubuntu.zip from here: http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-android/
This guide: http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
bootubuntu script:
Code:
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if ! test -d /data/local/ubuntu
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
#mknod /dev/loop1 b 7 0
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop7 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -o bind /proc $mnt/proc
mount -o bind /dev $mnt/dev
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop7
I get this error (after typing "sh bootubuntu"):
Code:
>adb shell
/ $ su
su
# cd /sdcard
cd /sdcard
# cd ubuntu
cd ubuntu
# sh ubuntu.sh
sh ubuntu.sh
modprobe: chdir(2.6.35.7-I9100XXKH3-CL479037): No such file or directory
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jchmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# sh bootubuntu
sh bootubuntu
failed: No such file or directoryk3 on /system
bootubuntu: line 41: syntax error: unexpected end of file (expecting "then")
#
Any ideas?

Related

For your concideration: Getting around the locked bootloader and missing loop ko

This is my first post here, but I figured I'd share this since doesn't appear to have been done yet.
As I'm sure most of you know the locked bootloader introduces challenges to getting your favo(u)rite flavo(u)r of linux on to the Droid 2.
I expect that you have rooted your phone and have busybox installed/working...
Normally when one wants to do this they get a linux image file and mount it as a loop device and then chroot to it's mounted folder. Because one can create a loop device but can't mount it.
My solution has been a "simple" one but may not have been tried:
Extract the contents of the image on a separate system and then push everything to /data/local/mnt.
For instance I set up a loop device on Ubuntu:
losetup /dev/loop0 /home/usernamehere/distributionnamehere.img
mount -t ext2 /dev/loop0 /home/usernamehere/somemountfoldername​
Then I remove security stuff:
sudo chmod 777 /home/usernamehere/somemountfoldername
sudo adb shell
chmod 777 /data/local/mnt
exit
sudo adb push /home/usernamehere/somemountfoldername /data/local/mnt​
(Wait for the push to happen stop it when you see X11/X11/X11/X11 or remove that symbolic link before pushing. If you stop it you'll have to push the other folders separately)
After it's done the bootubuntu which points to that /data/local/mnt share (or /data/local/ubuntu or /data/local/debian or whatever) should throw a few errors about mounting which is expected because we haven't fixed the fact that loop devices aren't mountable, but since we pushed the files to the 'mount' directory, the script finds it anyways and chroots to the /data/local/mnt and runs /data/local/mnt/bin/bash (or /bin/bash from the chroot point of view.)
This will get you to the root prompt.
I'm still working on getting the bash: groups: message to go away, but I think that is just that I didn't get everything copied initially.
Also I have yet to finish setting up VNC.
Anyway I hope this helps some people out.
I may do a script or more complete instructions later if requested.
Thanks,
Sky Adams
Thanks, I've been stumped by this for awhile. Your method allowed me to push the files but my script still doesn't find it. I'm going to need you to post your bootubuntu script. I have an image from androidclone.com that has vnc setup already, just need to get it to execute.
Confirmed working on rooted Droid X. Used Lakia image from androidclone dot com
1) Partitioned 16GB SD: Shrink to 11.9 GB leaving ~4GB. Then create new ext3 partition in free space
2) mount ext3 partition and create the loop to the image as skrull mentioned above.
3) then just "[email protected]# cp -r pathtoloopiface/* pathto4gbmount/"
4) takes a while but preserves the symlinks to avoid the X11/X11/X11/ issue above. (I think the reason you were having problems with the bash at the end, was an incomplete adb transfer of the /usr folder and probably no /var transfer at all. At least that was the case when I tried.)
5) push and chmod 777 this bootubuntu script to /system/bin:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mount -t ext3 /dev/block/mmcblk0p2 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
echo " "
echo " "
echo "Ubuntu 10.10 - Laika Edition by Androidclone.com "
echo "Website:http : / /www . androidclone . com"
echo "Email:[email protected] . com"
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
# the fuser command below allows us to kill all processes using the mount.
# otherwise umount will fail and the vnc session will still be alive.
# if it fails just run the fuser and umount again manualy.
fuser -k $mnt
umount $mnt
6) make sure there is a path to /data/local/mnt on the device and just run 'bootubuntu' from a root shell. you should get: "[email protected]/#:"
7) read the site on androidclone dot com for details on logging into the already running vnc service for a full LXDE session.
8) happy hacking.
D2G
any idea if this could free up the bootloader for the D2G allowing us to modify radio?
No, this will not circumvent the bootloader to load custom kernels. But who cares. many of the things we want, added features etc., can be loaded up in the form of kernel modules. I am not proficient enough to be able to compile my own modules yet but i'm working on a few things.
Radio
Can a kernal module be used to change the radio?
Good share, thank you very much.
ARGH!
I have probably spent 8 to 10 hours trying to get Ubuntu to boot. It seems that I cannot mount the path it wants to mount.
I can as it would seem to do this in shell it self, but still have some errors.
Do you think if I SBF my Droid X then root it - then follow the directions this would work. I am at an end now...and frustrated

[DEV] Get Ubuntu running on SGS2 (via chroot)

http://forum.xda-developers.com/showthread.php?t=1028464
Anyone tried to do that on our SGS2?
I've did this already on my Hero and on my Desire... I have no time right now, but I will try to get it running.
I'm sure it will be super fast...
Edit:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
They already did it on the Galaxy Tab. It's time to get it running on the SGS2!
Tried it and the LXDE image is working... very fast.
I can open the file manager and everything expect the Browser... also installed firefox but couldn't run it! I get the error:
Xlib: extension “RANDR” missing on display “:1.0″.
I think this has something to do with VNC... will try to reinstall tightvnc and see if it helps.
I'm surprised that nobody is interested in this...
I'd look at it at some point, other than the fact O2 cannot organise themselves to send out my SGS2.
I think a lot of people are still waiting on phones to arrive...
pulser_g2 said:
I'd look at it at some point, other than the fact O2 cannot organise themselves to send out my SGS2.
I think a lot of people are still waiting on phones to arrive...
Click to expand...
Click to collapse
pulser_g2, I think it's time to get that chroot working! I've tried again with another build with no luck. I think we need a special kernel... back when I had my desire I remember that it worked only with very few custom kernels.. because they had some parameter enabled but I can't remember which!
Under this link you can see people did the same on the Galaxy Tab 10.1:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
On our SGS2 it would be epic... when we get it working we can just connect via VNC from our desktops to our SGS2 and use it as a PC!! Or via the viewer on the SGS2 itself... screen is big enough.
I hope someone can move this thread to the DEV forum so we can start working on it.
I started to work on running Ubuntu 11.04 on the SGSII yesterday, from scratch as I didn't find an existing way to do it. As I may need some kernel modules, I'm creating a virtualbox environment to cross-compile them.
I managed to run Ubuntu some time ago on my Xperia X10 so I already have some background on the subject so it might not take months to have it working.
I got debian running in chroot and managed to get xfce going. Not real useful at the moment but at least it works.
I just had to root the phone and followed the guide at saurik.com
Sent from my GT-I9100 using XDA App
Just got Ubuntu 10 running on my S2, loop device and ext4 is supported by the default kernel !
Hmm, strange... do you have root? I'm on VillainROM 1.4 with latest CF-ROOT and it doesn't work exactly because of loop devices!
d3sm0nd said:
Hmm, strange... do you have root? I'm on VillainROM 1.4 with latest CF-ROOT and it doesn't work exactly because of loop devices!
Click to expand...
Click to collapse
I'm using an insecure kernel with default firmware.
For loop device, you need to 'losetup /dev/block/loop0 /path_to_image' and not using /dev/loop0 (returned by default by losetup but this is wrong)
and after that 'mount -t ext4 /dev/block/loop0 /my_mount_dir'
ext4 is supporting ext2/ext3 too
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Still won't work. Here the script i'm using:
#modprobe ext4
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/block/loop0 b 7 0
losetup /dev/block/loop0 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop0 /data/local/ubuntu
#mount -o loop,noatime -t ext4 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop0
Click to expand...
Click to collapse
Sent from my GT-I9100 using XDA App
My self Debian image is working fine, this is the script I'm using
Code:
#!/system/bin/sh
mnt=/mnt/sdcard/debian/mountpoint
img=/mnt/sdcard/debian/debian.img
export PATH="$PATH":/usr/bin:/usr/sbin:/bin
export TERM=linux
export HOME=/root
export USER=root
export LC_ALL=C
[ -e "$mnt"/bin/bash ] || busybox mount $img "$mnt"
busybox mount -t proc proc "$mnt"/proc
busybox mount -t sysfs sysfs "$mnt"/sys
busybox mount -t devpts devpts "$mnt"/dev/pts
busybox mount -o bind /data "$mnt"/data
busybox mount -o bind /sdcard "$mnt"/sdcard
echo ""
echo " Debian GNU/Linux"
echo ""
busybox chroot "$mnt" /bin/bash
echo ""
echo "Dismounting..."
echo ""
busybox umount "$mnt"/sdcard
busybox umount "$mnt"/data
busybox umount "$mnt"/dev/pts
busybox umount "$mnt"/proc
busybox umount "$mnt"/sys
echo -e "Dismount debian.img [y/N]? \\c"
read fi;
[ "$fi" = "y" ] && busybox umount "$mnt"
h t t p://img13.imageshack.us/img13/2932/sgs2debian.png
d3sm0nd said:
Still won't work. Here the script i'm using:
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
I'm running as root ("su") so I can access /dev without trouble.
mknod is useless in your script, as loop device is already created.
The script I'm using (ugly as hell bot no time to optimize it) :
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mkdir $mnt
losetup /dev/block/loop0 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop0 /data/local/mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo " "
chroot $mnt /bin/bash
Still won't work, mate
I also type su and I have root...
bootubuntu
mkdir failed for /data/local/mnt, File exists
losetup: /dev/block/loop0
Toolbox!
Toolbox!
Toolbox!
Toolbox!
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
chroot: can't execute '/bin/bash': No such file or directory
Click to expand...
Click to collapse
Which ROM are you using? And do you have CF-ROOT kernel?
athurh said:
My self Debian image is working fine, this is the script I'm using
Code:
#!/system/bin/sh
mnt=/mnt/sdcard/debian/mountpoint
img=/mnt/sdcard/debian/debian.img
export PATH="$PATH":/usr/bin:/usr/sbin:/bin
export TERM=linux
export HOME=/root
export USER=root
export LC_ALL=C
[ -e "$mnt"/bin/bash ] || busybox mount $img "$mnt"
busybox mount -t proc proc "$mnt"/proc
busybox mount -t sysfs sysfs "$mnt"/sys
busybox mount -t devpts devpts "$mnt"/dev/pts
busybox mount -o bind /data "$mnt"/data
busybox mount -o bind /sdcard "$mnt"/sdcard
echo ""
echo " Debian GNU/Linux"
echo ""
busybox chroot "$mnt" /bin/bash
echo ""
echo "Dismounting..."
echo ""
busybox umount "$mnt"/sdcard
busybox umount "$mnt"/data
busybox umount "$mnt"/dev/pts
busybox umount "$mnt"/proc
busybox umount "$mnt"/sys
echo -e "Dismount debian.img [y/N]? \\c"
read fi;
[ "$fi" = "y" ] && busybox umount "$mnt"
h t t p://img13.imageshack.us/img13/2932/sgs2debian.png
Click to expand...
Click to collapse
Can you upload or give me a link of your image? Thanks very much
I'm using the image from here:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
Maybe it's because of the image..
Sent from my GT-I9100 using XDA App
d3sm0nd said:
I'm using the image from here:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
Maybe it's because of the image..
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
type :
losetup /dev/block/loop0 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop0 /data/local/mnt
(replace ubuntu.img and /data/local/mnt with your current image/dir)
if '/data/local/mnt' is empty then your image is broken.
Also type 'dmesg' to check why it's broken.
extract zip to sdcard
run 'sh /sdcard/debian/install.sh' to copy the script to /system/xbin
'debianboot' to enter chroot
the prompt will change to debian if everything goes well
type 'alias' to see some shortcuts
'startvnc' starts vncserver
host: localhost
password: debian
port: 5901
http://www.multiupload.com/9R1AKKTR6D
debian-SGS2.zip
md5 c63c7953dab56c375f6748baecc2915c
Using the HD2 port as basis, I got Ubuntu 11.04 running on our Galaxy SII :
Some applications don't run in the menus but most of them are ok (Firefox 5 at first!).
As Unity requires hardware acceleration, I was unable to enable it for now.
As usual VNC is needed, so it's not very smooth to use, but it seems to me that 11.04 is smoother than 10.10 on my device.
alx5962 said:
Using the HD2 port as basis, I got Ubuntu 11.04 running on our Galaxy SII :
Some applications don't run in the menus but most of them are ok (Firefox 5 at first!).
As Unity requires hardware acceleration, I was unable to enable it for now.
As usual VNC is needed, so it's not very smooth to use, but it seems to me that 11.04 is smoother than 10.10 on my device.
Click to expand...
Click to collapse
Could you please upload the image somewhere?
hey guys me and anantshri got BT5 running on SGS2!!!
check it out here:
[DEV] BACKTRACK 5 on SGS2 {chroot}

Google Maps freeze in Froyo

I should check defy forums more often!
have been suffering with this since GMaps changed to vector based maps.
http://forum.cyanogenmod.com/topic/31432-faq-cyanogenmod-7/
16) My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive. What can I do?
Open terminal or adb shell and type these commands:
Code:
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo sysctl -w vm.min_free_kbytes=4096 >> /system/etc/install-recovery.sh
# chmod 744 /system/etc/install-recovery.sh
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Wow, Froyo... Been a while...

[Q] no /system rw access

I am trying to:
* run backtrack image on my slide the small custom smaller image not the +4gig one for fat32
* get RW to /system for su updated and allow rootkeeper to 'work' http://forum.xda-developers.com/showthread.php?p=21219704
* I seen several tutorials but I am not sure what one to follow .. i have S-ON and I assume I need that off for su to update within clockwork etc ... none of the other root apps work.. the superuser.apk is installed and I allow perms but nothing seems to work.. I am hoping it is a easy fix ..
INFO:
Code:
# CM 7
Linux localhost 2.6.32.17-cyanogenmod-g46ca326 #1 PREEMPT Thu Apr 21 20:36:02 EDT 2011 armv6l GNU/Linux
ESPRESSO PVT SHIP S-ON
HBOOT-1.02.0000
MICROP-0620
When I try to mount loop etc ..
Code:
# losetup /dev/loop254 $kit/bt5.img
losetup /dev/loop254 $kit/bt5.img
losetup: /dev/loop254: No such file or directory
# ls /dev/loop254
ls /dev/loop254
/dev/loop254
# uname -a
uname -a
# busybox mknod /dev/loop2 b 7 0
busybox mknod /dev/loop2 b 7 0
mknod: /dev/loop2: File exists
# mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
mount: can't setup loop device: No such file or directory
# losetup /dev/block/loop7 $kit/bt5.img
losetup /dev/block/loop7 $kit/bt5.img
losetup: /dev/block/loop7: No such file or directory
# losetup /dev/block/loop2 $kit/bt5.img
losetup /dev/block/loop2 $kit/bt5.img
losetup: /dev/block/loop2: No such file or directory
# losetup /dev/loop2 $kit/bt5.img
losetup /dev/loop2 $kit/bt5.img
losetup: /dev/loop2: No such file or directory
# losetup /dev/loop7 $kit/bt5.img
losetup /dev/loop7 $kit/bt5.img
losetup: /dev/loop7: No such file or directory
# ls /dev/loop2
ls /dev/loop2
/dev/loop2
# ls /dev/loop7
ls /dev/loop7
/dev/loop7
#
well first of all you're in the wrong forums...
try this forum instead.
you have an HTC Espresso, Mytouch 3G Slide.
this is the HTC Glacier, Mytouch 4G.

Bactrack 5 - errors with ext2 and chroot

Hi everyone,
I'm a noob on this forum so i'll try to be as clear as possible.
I have some issues trying to install backtrack 5 ARM version on my Nexus 10.
Config :
Nexus 10
4.3
Kernel : 3.4.39-g446c9cf
Build number : JWR66Y
Terminal emulator
Busybox Free
What I did :
I rooted my Nexus 10 following this tutorial (checking custom recovery) :
http://forum.xda-developers.com/showthread.php?t=2015467
I tried to install Backtrack 5 following this tutorial :
http://forum.xda-developers.com/showthread.php?t=1079898
But it didn't succeed. I tried to figure out my problem but I'm quite lost and not sure what the real problem is :
The script bt :
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires 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 $mnt
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/loop7 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop7 b 7 0
fi
#mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
losetup /dev/block/loop7 $kit/bt5.img
mount -t ext2 /dev/block/loop7 $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 "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig eth0
echo " "
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop7
I have theese errors (by doing sh -x bt)
mount -t ext2 /dev/block/loop7 $mnt
>mount: Operation not supported on transport endpoint.
ifconfig etho
>eth0 : No such device
busybox chroot $mnt /bin/bash
>chroot: can't execute '/bin/bash' no such file or directory
losetup -d /dev/loop7
>losetup: /dev/loop7: No such device or address
I search on the forum but I can't find what is the real problem :
http://forum.xda-developers.com/showthread.php?t=2116059
--> cd /storage/emulated/legacy/bt5/ don't change anything.
I readed that ext2 and chroot not working could come from the 4.3 but I'm not sure about this information.
I readed that most of custom ROM handle this.
/bin/bash doesn't exist, but /system/bin/sh does exists but :
busybox chroot $mnt /system/bin/sh don't changes anything.
I'd be glad if you can help me understanding my problem
Best,
Sanchorizo.

Categories

Resources