[DEV] Get Ubuntu running on SGS2 (via chroot) - Galaxy S II General

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}

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

Installing BackTrack5 onto the Motorola Atrix 4G

As I am not allowed to post this where it should be, this seems to be the next best place.
Hardware Needed:
* The Motorola Atrix 4G (without this you wont be going very far)
* Atleast a 4 Gb SD card
* a way of transfering data from your computer onto the SD card (The supplied USB cable or an SD adaptor)
Apps Needed:
* SuperUser (If your on this site, you most likely already have this)
* Just about any Terminal Emulator will work (I used Better Terminal Emulator Pro)
* Any VNC Viewing Client (I used androidVNC)
* A Busybox installer (I used Stericson's BusyBox installer)
Software used:
* I used the BackTrack5 version posted by msullivan, found **HERE**:
I used a slightly edited version of the bt file from the bundle
just copy and paste over the original bt file:
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
busybox mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard-ext/BT5
export bin=/system/bin
export mnt=/data/local/bt5
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
Installation Steps:
1. Make sure you have enough space to work with (atleast 4Gb).
2. Edit the bt file with the above coding.
3. Copy over the BT5 folder onto your SD card however you see fit, I just used a SD to USB adaptor that I got with my SD card.
4. Disconnect the USB cable if you have it connected.
5. open your Terminal emulator and type:
Code:
su <ENTER>
6. Type:
Code:
cd /sdcard-ext/BT5 <ENTER>
7. Type:
Code:
sh bt <ENTER>
8. The bt file should run, and leave you with a red command prompt.
Hit the home button.
9. Open your VNC Viewer and enter the login information.
Code:
Nickname: BackTrack5
Password: root
Address: 127.0.0.1
Port: 5901
The screen size still needs adjusting however as I believe it is set at 800×480 currently.
Sick. Just sick.
Cant wait to crack some Wifi with this. Anyone test this out and get a successful crack?
I haven't looked too far into it, however I do believe that this is almost useless as a "cracking" distro on ARM hardware. AFAIK many things don't/can't work. for instance injecting is a no go (real turn off for me, but that is what a netbook is for).
Until we get better drivers for the wifi, we don't have injection, or monitor mode. I've also found editing scripts can be a ***** because the on screen keyboard is either in the way, or the enter doesn't work as enter if using nano, running vi really hoses things up. My external bluetooth keyboard helps with this, but a bluetooth mouse while it works, is waaaaaaaaaaaaaaay (no really) too sensitive on the Atrix. Hooked up to an external monitor in webtop mode it works much better, but I've not tried running backtrack from there.
Yeah I did not even consider the ARM architecture. Very good point.
Do they make a Rosetta type app for Linux? Anyone know? That could at least help use get past the Architectural limits.
*edit*
Still not thinking straight, that app is for PPC users.
In the beginning where the script says "sdcard-ext/bt5" could I edit that to say "sdcard/bt5" in order to boot it from my internal phone memory?
Sent from my MB860 using XDA App
BravoMotorola said:
In the beginning where the script says "sdcard-ext/bt5" could I edit that to say "sdcard/bt5" in order to boot it from my internal phone memory?
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
Yep.
stupid 10 character limit...
Exthero said:
As I am not allowed to post this where it should be, this seems to be the next best place.
Hardware Needed:
* The Motorola Atrix 4G (without this you wont be going very far)
* Atleast a 4 Gb SD card
* a way of transfering data from your computer onto the SD card (The supplied USB cable or an SD adaptor)
Apps Needed:
* SuperUser (If your on this site, you most likely already have this)
* Just about any Terminal Emulator will work (I used Better Terminal Emulator Pro)
* Any VNC Viewing Client (I used androidVNC)
* A Busybox installer (I used Stericson's BusyBox installer)
Software used:
* I used the BackTrack5 version posted by msullivan, found **HERE**:
I used a slightly edited version of the bt file from the bundle
just copy and paste over the original bt file:
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
busybox mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard-ext/BT5
export bin=/system/bin
export mnt=/data/local/bt5
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
Installation Steps:
1. Make sure you have enough space to work with (atleast 4Gb).
2. Edit the bt file with the above coding.
3. Copy over the BT5 folder onto your SD card however you see fit, I just used a SD to USB adaptor that I got with my SD card.
4. Disconnect the USB cable if you have it connected.
5. open your Terminal emulator and type:
Code:
su <ENTER>
6. Type:
Code:
cd /sdcard-ext/BT5 <ENTER>
7. Type:
Code:
sh bt <ENTER>
8. The bt file should run, and leave you with a red command prompt.
Hit the home button.
9. Open your VNC Viewer and enter the login information.
Code:
Nickname: BackTrack5
Password: root
Address: 127.0.0.1
Port: 5901
The screen size still needs adjusting however as I believe it is set at 800×480 currently.
Click to expand...
Click to collapse
I get an error when doing "sh bt".
I get "bt: 36: Syntax error: end of file unexpected (expecting "then")"
BravoMotorola said:
I get an error when doing "sh bt".
I get "bt: 36: Syntax error: end of file unexpected (expecting "then")"
Click to expand...
Click to collapse
Is your bt folder on your "internal" or external sd card? If it's the sdcard-ext, you'll need to edit the bt script to point to the correct location.
barry99705 said:
Is your bt folder on your "internal" or external sd card? If it's the sdcard-ext, you'll need to edit the bt script to point to the correct location.
Click to expand...
Click to collapse
Hmm, tried a lot of things, ended up going to the OP of the original Backtrack on Android thread and use his original file instead, working now. But now I have a new problem, (lol) how can I change the screen resolution of the BT5 GUI to match the Atrix's screen? I've looked all over for this. I just can't find out how...
BravoMotorola said:
Hmm, tried a lot of things, ended up going to the OP of the original Backtrack on Android thread and use his original file instead, working now. But now I have a new problem, (lol) how can I change the screen resolution of the BT5 GUI to match the Atrix's screen? I've looked all over for this. I just can't find out how...
Click to expand...
Click to collapse
once you start up backtrack, you need to edit /usr/bin/startvnc . Change that last line to
Code:
vncserver -geometry 940x520
barry99705 said:
once you start up backtrack, you need to edit /usr/bin/startvnc . Change that last line to
Code:
vncserver -geometry 940x520
Click to expand...
Click to collapse
Thanks and yes I did see that somewhere, I just had no clue what file to edit. So is it possible to install things like Flash on Firefox on here or is the no package installer for this? Gosh, sorry I'm asking so much...thanks for the help so far
BravoMotorola said:
Thanks and yes I did see that somewhere, I just had no clue what file to edit. So is it possible to install things like Flash on Firefox on here or is the no package installer for this? Gosh, sorry I'm asking so much...thanks for the help so far
Click to expand...
Click to collapse
Firefox is already installed. Not sure if flash is there since it's so insecure.
Laptop dock
After installing BT5 to Atrix 4G, can the laptop dock be used to run BT5?
I just wanted to throw a thanks out there to Exthero (since you only have 2!) for the start up script. Couldn't get it working until i used yours.
I'm having a blast with this
NISVermeer said:
After installing BT5 to Atrix 4G, can the laptop dock be used to run BT5?
Click to expand...
Click to collapse
easiest way is on wifi:
see what your ip is
Code:
$ ifconfig
example:
eth0: 192.168.1.3
use a vnc server on your computer connect to ip address in ifconfig (port 5901 default for this chroot)
anyone know if or where the atrix wireless drivers are for this?

Ubuntu

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?

[Q] does vegacomb support loop devices / chroot ubuntu?

hey guys, im trying to get chrooted ubuntu running on my vegacomb update 3 vega and am having problems.
Im following the guide here:
http://androlinux.com/android-ubuntu-development/how-to-install-busybox-on-your-android/
and keep getting the following errors:
/mnt/sdcard/ubuntu # bootubuntu
losetup: /dev/block/loop1
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
/system/bin/bootubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu: line 25: can't create /data/local/ubuntu/etc/hosts: nonexistent directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
Is it that vegacomb doesnt support loop devices:? Or am i missing something else? Ive checked and i have busybox installed and working correctly, but that doesnt seem to have changed anything?
Thoughts?
The vega does support loop devices, infact I have that setup running on my vega on vegacomb right now!
In order to get it working download the new scripts from the ubuntu on xoom section of the androlinux site, that worked for me fine!
Bear in mind, the version of ubuntu supplied in the image file is something like 9.10 which is very old, and the image is only 2gb which doesn't leave enough space for updating. Consider following their guide for building your own image.
Anyway, best of luck, I had to get over a few problems when installing it myself, but that may have been related to my setup, so if you have any problems I will keep an eye on this thread!
Happy Ubuntuing
Thanks for the reply, I will try the xoom scripts and see how I get on. I saw the section about building my own but wanted to try and easy 9.10 install first before building my own xubuntu 11.10. Il let you knw how I get on
Could you post your bootubuntu script up please?
I have tried lots of different loop device numbers but am getting no where!
I haven't altered my bootubuntu script at all from the default xoom one, I will post it at the bottom!
There are a few things worth checking for that may help your problems, check that the ubuntu folder on your sd card with the .img file in uses a lower case U, that caught me out the first time as my vega keyboard auto-capitalises.
Also did your ubuntu.sh script run without errors? It worked fine on mine with the old ubuntu.sh and the new bootubuntu script but you may want to try running the xoom shell script.
Hope this helps!
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /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
busybox mknod /dev/loop2 b 7 0
mount -o loop,noatime -t ext2 $kit/ubuntu.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 "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 " "
echo "VERSION 0.9.5 BUGFIX April 2nd 2011"
echo "Brought to you for the Motorola Xoom by Thomas Sohmers, and Ubuntu by Canonical and the open source community!"
echo "This version is for people experiencing errors around step 7 of my Ubuntu install. Hope this fixes everything! If not, feel free to contact me. Sorry for the delay."
echo " "
echo "Ubuntu is now loaded and you should see a '[email protected]' terminal entry below thisÔøΩ if you do not, than Ubuntu has not successfully loaded. Have fun!"
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
vncserver -kill :1
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Right i must be missing something, i cant find the xoom section on the website so have tried your bootubuntu script in my folder but it still fails.
Can you post me a link to the xoom section of the site please so i can start over in case i missed something earlier in the process?
Thanks
right im missing something, even tried this setup here;
http://trsohmers.com/2011/03/06/how-to-run-ubuntu-on-the-motorola-xoom/
and still no luck. I have a rooted device but its almost as if the scripts are not running as root, i get permission denied messages when chmod 4777 and that shouldnt happen as root.
Im running 1.17 of busybox, not that it should matter. I am getting sick of this not working, no idea why, thinking i might have to bin vegacomb to at least work out where root might work (ie a simpler rom).
I can't remember the exact process, but I do remember getting this. I think I was missing the root login. Are you running these command as root? I think you have to use
su
Click to expand...
Click to collapse
. I haven't done this for quite some time so can't be 100% certain.
Heya, sorry it's been a while since I've been on the forums, it seems like something has more than likely gone wrong when you ran the ubuntu.sh shell script, can you post the output?
Sent from my X10 using XDA App

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