Ubuntu 10.10 Up & Running On HTC Inspire 4G - HTC Inspire 4G

First off i wanna say i take know credit at all for this i did not write the commands and i did not figure out how to do it i found this in the Desire HD thread and figured i would share it with all the HTC Inspire 4G people. This is a very simple process and within minutes your up and running Linux Ubuntu 10.10. Below i will post all the requirements, the steps, and the commands. Enjoy guys and girls and if you need any help with this just post to the Thread. Thanks Donny
Requirements:
​*A rooted HTC Desire HD. For rooting instructions, see how to permanently root HTC Inspire 4G.
*A microSD card with 3 GB or more free space.
*Other custom kernel with LoopBack support
*Ubuntu image and required scripts
*Android Terminal Emulator app (install from the Android Market)
*Android VNC Viewer app (install from the Android Market)
*Before proceeding, move all your apps back to Internal Storage if you have moved them to SD using App2SD.
*An active internet connection on your phone (Wi-Fi is recommended).
Procedure:​
1 – Installing Ubuntu:
*Create a folder called ‘ubuntu’ on the root of your SD card.
Extract the contents of the downloaded Ubuntu.tar file and transfer them to the folder from Step 2.
*Launch Terminal Emulator and enter these commands:
su
pm setInstallLocation 1
cd sdcard/ubuntu
sh ubuntu.sh
bootubuntu
If all goes well, you should see “[email protected]:/#” now, indicating you are now running Ubuntu.
Entering Ubuntu at any time:​
*To enter Ubuntu terminal at any time from now onwards, you only have to launch Terminal Emulator, get su privileges, cd to the ubuntu directory and type ‘bootubuntu’:
su
cd sdcard/ubuntu
sh ubuntu.sh
bootubuntu
Configuring the Gnome Desktop GUI:​
*Now that you have Ubuntu 10.10 running, the next step would be enabling the Gnome Desktop GUI.
*If you aren’t already in the Ubuntu terminal, enter it using the above-mentioned instructions.
*Make sure that your phone’s internet connection is active and enter the following commands. Wait till each one finishes and enter ‘y’ (for yes) to confirm any prompt that you get:
apt-get update
apt-get install tightvncserver
cd /bin
cat >x
rm –r –f /tmp
mkdir /tmp
chmod 777 /tmp
export USER=root
export XKL_XMODMAP_DISABLE=1
vncserver –geometry 1024x800
Press Enter once more after entering the last command.
*Now you must configure your volume-down key as Ctrl in Terminal Emulator. Simply go to Menu > Preferences > Control Key and select Volume-Down key.
*Go back to the command line once done.
*Hold the Volume-Down key and press ‘d’. (This will basically enter Ctrl+D.)
Now enter these commands:
chmod 777 x
x
*This ‘x’ script basically lets you start the Gnome GUI. As this is the first time you are running this script, it will ask you to set a password for the VNC connection. Set a password of your choice.
*It will also ask you to set a password for “view-only” mode, which isn’t required so answer ‘n’ for no.
*Now launch Android VNC Viewer and create a new connection with the following settings:
*Nickname: Anything of your choice.
*Password: The password you set in Step 6.
*Address: localhost
*Port: 5901
*Color format: 24-bit color (4bpp)
*Now click ‘Connect’. In a minute or so, you should see your Ubuntu 10.10 Gnome desktop!!!
Links​
*Get the Ubuntu Files from the link below and install in Utorent
http://www.addictivetips.com/mobile/how-to-install-ubuntu-linux-on-htc-desire-hd/

Sounds funny!But I won't try it now. maybe latter...
Haha...,Up you!

Ice done this already and its definitely cool yo have and could come in useful. Its similar to having what the atrix has.
Sent from my Desire HD using XDA App

We need w7 ROM port yo inspire.
Sent from my Inspire 4G using XDA Premium App

Any phones with.the same hardware currently running it?
Sent from my Desire HD using XDA App

I've followed this guide to the letter and I can't seem to get past the "cat >x" command. I even tried it using ADB remote from my computer, I get the exact same results as when I use the terminal emu.

*Other custom kernel with LoopBack support
How do we find out if the kernel has loopback support?

Can someone get a alternate mirror for the ubuntu image and scripts? the torrent is dead.

I made a quick torrent and i'll seed a bit.
I too wonder about loopback support, how do we find out if our kernel has it (aside from checking the thread, since it didnt come up)
tried with cm7 stock kernel, didn't work
will try with lordmod hd 4.5
download the zip, extract, load torrent.
EDIT:
Okay, it worked with LORDMOD HD 4.5, may work on CM7 also, not sure,
what i did was: (taken from androlinux.com)
root explorer to sdcard/ubuntu
open the bootubuntu script
change the loop1 to loop7 (should be 3 of them to change)
save and exit
su
cd sdcard/ubuntu
sh ubuntu.sh (not sure if thats needed again, but just to be safe, i did it again)
bootubuntu
Also, gnome is nice, but why not run lxde?
sudo apt-get install lxde
etc etc: here: lol http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/

The only way to check for loop support is to check config.gz
adb shell
cp /proc/config.gz /data/config.gz
busybox gunzip /data/config.gz
grep CONFIG_BLK_DEV_LOOP /data/config
It will either say y or is not set.
If you are using terminal emulator, you will need to su before typing in the commands.
Sent from my HERO200 using XDA App

dacket84 said:
I've followed this guide to the letter and I can't seem to get past the "cat >x" command. I even tried it using ADB remote from my computer, I get the exact same results as when I use the terminal emu.
Click to expand...
Click to collapse
no space cat>x
then follow the directions.

what if it does not ask for a password i followed all of the steps and when i typed x at the end it never asked me to create a password

Is there a mirror for this file? I'm getting at the most about 10 kbps down and that is just taking forever...
Sent from my Inspire 4G using Tapatalk

Psionfenix said:
I made a quick torrent and i'll seed a bit.
I too wonder about loopback support, how do we find out if our kernel has it (aside from checking the thread, since it didnt come up)
tried with cm7 stock kernel, didn't work
will try with lordmod hd 4.5
download the zip, extract, load torrent.
EDIT:
Okay, it worked with LORDMOD HD 4.5, may work on CM7 also, not sure,
what i did was: (taken from androlinux.com)
root explorer to sdcard/ubuntu
open the bootubuntu script
change the loop1 to loop7 (should be 3 of them to change)
save and exit
su
cd sdcard/ubuntu
sh ubuntu.sh (not sure if thats needed again, but just to be safe, i did it again)
bootubuntu
Also, gnome is nice, but why not run lxde?
sudo apt-get install lxde
etc etc: here: lol http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Click to expand...
Click to collapse
I tried "sudo apt-get install lxde". It appears that the source files are no longer available. "apt-get update" fails also.

any screenshots?

justFaisal said:
any screenshots?
Click to expand...
Click to collapse
+1

justFaisal said:
any screenshots?
Click to expand...
Click to collapse
^^^ what he said...

The code doesn't work for Jellytime?
unCoRrUpTeD said:
The only way to check for loop support is to check config.gz
adb shell
cp /proc/config.gz /data/config.gz
busybox gunzip /data/config.gz
grep CONFIG_BLK_DEV_LOOP /data/config
It will either say y or is not set.
If you are using terminal emulator, you will need to su before typing in the commands.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
I checked for loop and am using JellyTime 4.2 R2 from this link: http://forum.xda-developers.com/showthread.php?t=1778202
I also checked the loopback support and it said yes. I tried changing the loop in the script firl to loop7, but it never generated the file folders. As you can see I did this multiple times to no avail.
Here is the script that was Generated by CMD under ADB Shell:
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\sdk\platform-tools>adb shell
# cp /proc/config.gz /data/config.gz
cp /proc/config.gz /data/config.gz
# busybox gunzip /data/config.gz
busybox gunzip /data/config.gz
# grep CONFIG_BLK_DEV_LOOP /data/config
grep CONFIG_BLK_DEV_LOOP /data/config
CONFIG_BLK_DEV_LOOP=y
# su
su
[email protected]:/ # cd /sdcard
cd /sdcard
[email protected]:/sdcard # cd ubuntu
cd ubuntu
[email protected]:/sdcard/ubuntu # sh ubuntu.sh
sh ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[JUnable to chmod bootubuntu: 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'
[email protected]:/sdcard/ubuntu # bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1
mount: 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
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu[22]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
/system/bin/bootubuntu[23]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu[25]: can't create /data/local/ubuntu/etc/hosts: No such f
ile or 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
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
127|[email protected]:/sdcard/ubuntu # bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1
mount: 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
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu[22]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
/system/bin/bootubuntu[23]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu[25]: can't create /data/local/ubuntu/etc/hosts: No such f
ile or 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
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/block/loop1: Device or resource busy

A Little progress...
I was able to initialize the Ubuntu.sh by granting SU in Terminal Emulator. Now the When I go to update with apt-get update i receive error 404: url not found. This is getting frustrating.

I think I found a fix for the image file because the one that was loaded into the Ubuntu.zip had broken links for the apt-get command on the package links. Here is the link to the thread.
http://forum.xda-developers.com/showthread.php?t=1223128
After i get off of work tonight I will upload a hybrid of the two if it works.

Related

Install debian and use lxde or Icewm.. supports others

YOUR PHONE WILL STILL WORK DOING THIS.. ITS ALMOST LIKE RUNNING AN APP ON YOUR PHONE
I got most of my information from this site here.. I only rewrote it and shared to get it working on our cdma hero.
http://www.androidfanatic.com/component/fireboard/?func=view&id=1615&catid=9
I also use files from different sources and combined them to work with our phone.
As of right now this method seems to only work with DarchDroid aosp rom. Not any htc sense roms.
Also make a ext partition and dont use apps2sd, darchdroid is set by default not to use it, only if enabled in spare parts app
If you want to try and get both debian and apps2sd to work.. Try this guide here http://forum.xda-developers.com/showthread.php?t=509943.
First download is the files you will need OTHER then the debian.img
The main files
This one will be a big download. It contains the most important part.
The debian.img from here
Once download, open it up and only take the "debian.img" out of it.
This will put a 1.4gb file on your sdcard used for running debian not including the other files it uses to install and run it (they are very small). If you have a small sdcard and want the image smaller or want to enlarge the .img for more room. Use this tutorial here.
TO CHANGE FILE SIZE OF debian.img
Im going to be using adb on the computer. Much easy then typing commands into the phone terminal.
Put the all the files into a folder on your sdcard named debian.
First downloaded files and the debian.img from the 2nd download.
/sdcard/debian
Next you will need to make the directory it uses. For some reason its not creating it on the install
Code:
adb shell
su
mkdir /data/local/mnt
Next you need to install the debian.
Code:
cd /sdcard/debian
sh installer.sh
reboot
Then it should work after this. When your phone boots back up you need to install this APK here. This is what will actually run the desktop "lxde" or whatever you choose to install after this.
*****View attachment vnc.apk*****
To install put it in your android-sdk/tools folder.. where ever it may be installed and type...
Code:
adb remount
adb push vnc.apk /system/app
Or put it on your sdcard and install it using Astro or any other app installing app
Then run the debian you just installed by doing this
Code:
adb shell
cd /sdcard/debian
sh bootdeb
Then you need to run this script only once.
It will look like this
localhost:/#
type
Code:
cd /scripts/
sh onetime.sh
When it ask for password. Just type "android"
Open the vnc app
Fill out the information like so...
connection: just dont touch
Nickname: can leave blank
Password: android
Address: LocalHost
Port: 5901
Color: I used 24-bit, you can pick whatever you want. Its changeable from within the running desktop
Then click on Connect at the top. And everything should work.
TO USE TOUCH SCREEN.. DO THIS
click our menu button on our phone.
then click "Scaling" and select 1.1..
Then push the trackball 1 time and touch screen mouse will work
To run without using your computer. Download a terminal from the market and type this...
Code:
su
cd /sdcard/debian
sh bootdeb
Then open up your vnc app and press connect.
To use icewm.. more simple looking desktop. Runs smoother
First you need icewm while running bootdeb
Code:
localhost:/# apt-get install icewm
Then to switch between ice and ldxe do this in terminal on your phone. This is actually easy do to using the trackball
Code:
localhost:/# nano /root/.vnc/xstartup
Scroll down to lxsession and delete it.. then type xterm
Save changes by pressing track ball once and the letter o. Then press enter. Exit out by pressing the track ball once again and type the letter x.
Then connect using VNC.apk and it will load the new desktop.
Delete xterm and type lxsession to change back.
{
"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"
}
omfg thank you so much. I'll try this as soon as I get home <33333
edit: I assume this fixes the permission errors I was getting on the thread I created about running the full de on the hero.
Thanks dude, thats awesome! I will have to take a look at it when I get home as well
Linux Rules!
good one jus debian on a hero classic
Jus FTW! Now I wonder if we can start doing the same for other linux distros.
Re: Install debian and use lxde
This is pretty geek-chic, I love it.
Actually, I do have a question about it. Anyway to boot and use Deb without VNC?
It sounds like it's an ARM compiled, headless Debian install running in the background, which is why you need VNC to access it, correct?
Is it network aware? How fast is it?
no way...RAD!!!
I have tried to install following instructions using terminal on he phone......seems like I get through the install.sh ok then after reboot try to run the bootdeb and it says not found.? also I get the vnc fails when trying to connect?
I am sure i am doing something wrong but not sure what.
any suggestions?
I forgot to say THANKS Jus!
i get "bootdeb not found" when i know i copied it over.. i'm going to try again.
alright, copied the files again the same thing. i'm interested in this! it's just something else i can do my iphone friends can't lol
snip3rm00n said:
Actually, I do have a question about it. Anyway to boot and use Deb without VNC?
Click to expand...
Click to collapse
yes, if you have ssh running on it, im sure you could ssh into the system. the reason for vnc is to have a gui.
hurrah. this is pretty slick, if i had a larger sd card id do this
thedudejdog said:
i get "bootdeb not found" when i know i copied it over.. i'm going to try again.
alright, copied the files again the same thing. i'm interested in this! it's just something else i can do my iphone friends can't lol
Click to expand...
Click to collapse
I get the same thing. I know its there, I checked.
Code:
C:\android-sdk-windows\tools>adb remount
remount succeeded
C:\android-sdk-windows\tools>adb shell
# cd /sdcard/debian
cd /sdcard/debian
# ls
ls
unionfs
bootdeb
fsrw
installer.sh
mountonly
debian.tar.bz2
# bootdeb
bootdeb
bootdeb: not found
#
This is the exact same issue I used to have, and I've never been able to get it to work. I read someplace that I should try "sh bootdeb", but here's the output on that:
Code:
# sh bootdeb
sh bootdeb
uid=0(root) gid=0(root)
[H[J
a888a
d888888b
8P YP Y88
8|o||o|88
8. .88
8 ._. Y8.
d/ 8b.
.dP . Y8b.
d8: ::88b.
d8 Y88b
:8P :888
8a. : _a88P
._/ Yaa_ : .| 88P|
\ YP | 8P \.
/ \._____.d| .|
--..__)888888P ._.|
Usage: mount [-r] [-w] [-o options] [-t type] device directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!
chroot: can't change root directory to /data/local/mnt: No such file or directory
Shutting down Debian........
#
Any ideas?
UPDATES / EDITS:
I also tried:
Code:
#su bootdeb
gave no output and seemed to go fine, but upon trying to connect through vnc, said vnc connection failed. So the I tried:
Code:
#./bootdeb
and got "permission denied". So THEN I tried:
Code:
#su ./bootdeb
And again seemed like everything was cool, but VNC still said connection failed. I've tried connecting using both LocalHost and 127.0.0.1, still nada.
how come the graphics look so ****ty? i mean tp2 users can run ubuntu and it looks perfect.
thedudejdog said:
i get "bootdeb not found" when i know i copied it over.. i'm going to try again.
alright, copied the files again the same thing. i'm interested in this! it's just something else i can do my iphone friends can't lol
Click to expand...
Click to collapse
Try to type
sh bootdeb
And make sure you
cd /sdcard/debian
drummingfool said:
I get the same thing. I know its there, I checked.
Code:
C:\android-sdk-windows\tools>adb remount
remount succeeded
C:\android-sdk-windows\tools>adb shell
# cd /sdcard/debian
cd /sdcard/debian
# ls
ls
unionfs
bootdeb
fsrw
installer.sh
mountonly
debian.tar.bz2
# bootdeb
bootdeb
bootdeb: not found
#
This is the exact same issue I used to have, and I've never been able to get it to work. I read someplace that I should try "sh bootdeb", but here's the output on that:
Code:
# sh bootdeb
sh bootdeb
uid=0(root) gid=0(root)
[H[J
a888a
d888888b
8P YP Y88
8|o||o|88
8. .88
8 ._. Y8.
d/ 8b.
.dP . Y8b.
d8: ::88b.
d8 Y88b
:8P :888
8a. : _a88P
._/ Yaa_ : .| 88P|
\ YP | 8P \.
/ \._____.d| .|
--..__)888888P ._.|
Usage: mount [-r] [-w] [-o options] [-t type] device directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!
chroot: can't change root directory to /data/local/mnt: No such file or directory
Shutting down Debian........
#
Any ideas?
UPDATES / EDITS:
I also tried:
Code:
#su bootdeb
gave no output and seemed to go fine, but upon trying to connect through vnc, said vnc connection failed. So the I tried:
Code:
#./bootdeb
and got "permission denied". So THEN I tried:
Code:
#su ./bootdeb
And again seemed like everything was cool, but VNC still said connection failed. I've tried connecting using both LocalHost and 127.0.0.1, still nada.
Click to expand...
Click to collapse
Same problem i had... You have to do
mkdir /data/local/mnt
and then cd /sdcard/debian and run it again
Also to everyone
Read the instructions again.. I added
how to use touch screen and how to fix the mounting problem
fixxxer2008 said:
how come the graphics look so ****ty? i mean tp2 users can run ubuntu and it looks perfect.
Click to expand...
Click to collapse
The graphics are also pretty nice.. I used 256 color for the first screen shot. If you use 24bit it cleans it up really nicely.
I did everything per new instructions and all was good up to the sh bootdeb part, I get a readout of a bunch of crap then: chroot: cant execute '/bin/bash': No such file or directory.
But i am closer than last time and getting anxious
beerock said:
I did everything per new instructions and all was good up to the sh bootdeb part, I get a readout of a bunch of crap then: chroot: cant execute '/bin/bash': No such file or directory.
But i am closer than last time and getting anxious
Click to expand...
Click to collapse
Do
adb shell
cd /sdcard/debian
sh installer.sh
sh bootdeb
cd /scripts/
sh onetime.sh
if it ask for password.. just type android

[experimental] Debian running like a charm on Defy!!!

Hi. Well, I've researched a lot to get to this. For now, I haven't used the mount commands (because there isn't support for loop devices, or at least, that I think; in my stock rom). Because of that, the files are in a folder in the Filesystem of android.
There are Screenshots at the end of my post.​
The steps are a little bit long, but I assure you, that LXDE running on VNC + debian applications (like amsn, ice weasel, etc) is f*cking amazing.
Revision of the Tutorial: 3. Date: 14/feb/2011.
What you need:
A PC with Debian (lenny or squeeze) or a VM with that OS (you can use Ubuntu too) with 2GB or more disk free space
A internet connection (or packages of Debian armel locally downloaded)
A rooted Motorola Defy (requiered to run some commands later)
Overclocked Motorola Defy (optional, but increases the performance) (find "SetVsel" on market)
At least 300MB (for "console only") or 750MB (for "console" and graphical stuff) on the /data/local of the internal phone memory (I'm not using mount points, for some software issues with the kernel)
Same amount of free space on your SD (to copy files from PC to Internal storage. you could use adb, but I like the SD method, as you don't need any drivers)
A lot of time to do this (optional hehehe)
As I don't like to use "su" or "sudo" commands, I use a Root Terminal.
(sudo su)
Well, create a directory in your account folder, I mean if you're the user "cocus", create a folder called /home/cocus/debian
You could use any other folder, but take care in the scripts, and replace with the one that you're using.
We have to be in the parent folder, so make a cd to /home/cocus/
Next, get the packages to create the deboostrap, and run the chroot.
To do this, if you're on Debian run the following:
Code:
apt-get install qemu-user-static debootstrap
But if you're on Ubuntu, use this:
Code:
apt-get install qemu-arm-static debootstrap
Then, we have to get the armel files, using deboostrap:
If you want to install Debian Lenny (5.0, tested by me)
Code:
debootstrap --verbose --arch=armel --foreign lenny debian http://ftp.us.debian.org/debian
And for Debian Squeeze (6.0, tested by johnw.xda without the graphical stuff)
Code:
debootstrap --verbose --arch=armel --foreign squeeze debian http://ftp.us.debian.org/debian
In fact, we could use a Ubuntu distro, like karmic. But I recommend debian, because it has more support for armel.
Ok, that will be at least 5 mins downloading data and unpacking other stuff. When that finishes, we have to tweak the system to run without errors.
First thing, is to create the mount point of the sdcard (in fact, is a system link).
Code:
mkdir debian/sdcard
Second thing, is to run the chroot and configure some things:
Code:
cp /usr/bin/qemu-arm-static debian/usr/bin
chroot debian /bin/bash
If succed, you will have a # (root) shell, then put the following:
Code:
/debootstrap/debootstrap --second-stage
adduser
Then provide a username and password.
Now run the following, to fix some configs:
Code:
echo 'nameserver 8.8.8.8' > /etc/resolv.conf
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
If you're installing Debian Lenny, then run this:
Code:
echo 'deb http://ftp.us.debian.org/debian lenny main contrib non-free' > /etc/apt/sources.list
apt-get update
But if you're installing Debian Squeeze, then run this:
Code:
echo 'deb http://ftp.us.debian.org/debian squeeze main contrib non-free' > /etc/apt/sources.list
apt-get update
With that, the system will run ok in the Defy, but I would like to add the x11, lxde, vnc packages (because installing on the chroot in pc is more faster than in the phone).
If you want LXDE, then do:
Code:
apt-get install lxde tightvncserver
But if you prefer IceWM instead LXDE, then:
Code:
apt-get install icewm tightvncserver
Ok, I really dont remember, but that stuff cost about 350MB more of disk. By the way, while installing the packages, it might ask something, you just say Ok on all messages and complete if it requieres.
Once finished, type
Code:
exit
Well, now we have to fix the "LC_LOCALE" error, and the "HOME=/root" for conveinence. To do that, in your local Debian (not the chroot), add the following lines to the file
/home/cocus/debian/etc/init.d/rc.
Code:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export $PATH
export HOME=/root
export LC_ALL=C
Add these lines replacing the original PATH.
After that, we have to move the files to internal storage, so, to do that, I've used tar bzip2 to compress all the files and saving the attributes too.
Code:
tar -cjf /home/cocus/debian.tar.bz2 /home/cocus/debian/*
That command will generate a file in /home/cocus called debian.tar.bz2. Once you've got this, copy to your SD.
By the way, create a file called bootdeb in the SD root, with the following contents:
Code:
echo " "
echo " a888a "
echo " d888888b "
echo " 8P YP Y88 "
echo " 8|o||o|88 "
echo " 8. .88 "
echo " 8 ._. Y8. "
echo " d/ 8b. "
echo " .dP . Y8b. "
echo " d8: ::88b. "
echo " d8 Y88b "
echo " :8P :888 "
echo " 8a. : _a88P "
echo " ._/ Yaa_ : .| 88P| "
echo " \ YP | 8P \. "
echo " / \._____.d| .| "
echo " --..__)888888P ._.|"
echo " "
echo " COCUS WAS HERE (I hate JAVA) "
export mnt=/data/local/debian
export TERM=linux
export HOME=/root
export OLDPATH=$PATH
echo "mnt: $mnt"
echo "PATH: $PATH"
echo "TERM: $TERM"
echo "HOME: $HOME"
busybox mount -o bind /dev $mnt/dev
busybox mount -o bind /sys $mnt/sys
busybox mount -o bind /proc $mnt/proc
busybox mount -o bind /sdcard $mnt/sdcard
busybox mount -t devpts devpts $mnt/dev/pts
echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean kill of Debian!"
echo " "
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
busybox umount -f /data/local/debian/dev/pts /data/local/debian/proc /data/local/debian/sys /data/local/debian/sdcard /data/local/debian/dev
export PATH=$OLDPATH
echo "Filesystems have unmounted"
Create another file, called vnc with the following contents:
Code:
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1280x720
(you could change the resolution of the X11 desktop there )
And at last, create the last file called xstartup. Take care here, if you have choosed LXDE, use the following:
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
But if you've choosed IceWM, then use:
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
xterm
Here, we have to run commands, but in the phones shell (adb, ssh, terminal emulator).
Remember to mount the SD again (in the case that youre using USB SD Massive storage).
Well, we have to get root access in the shell, so you have to root your Defy first. If you have root acces, then run the following in your mobile:
Code:
mkdir /data/local/debian
cp /sdcard/bootdeb /data/local
busybox tar -xvf /sdcard/debian.tar.bz2 -C /data/local
rm /data/local/debian/root/.vnc/xstartup
cp /sdcard/xstartup /data/local/debian/root/.vnc/xstartup
cp /sdcard/vnc /data/local/debian/bin/vnc
ln -s /data/local/bootdeb /system/bin/bootdeb
chmod 0755 /data/local/bootdeb
chmod 0755 /data/local/debian/bin/vnc
If everything worked and no errors appeared, then you can run debian via your Terminal Emulator:
Code:
bootdeb
And you should get the debian shell, and then run:
Code:
vnc
to start vnc server on localhost. Take note of the localhost:x (where x is a number). That number is what you have to use to connect, I mean:
If the number is 1:
the port is 5901
If the number is 9:
the port is 5909
Thats all!
I will try to make a yaffs2 image to mount, but I really dont trust on the mount command, because it gives me a lot of errors, even with correct stuff.
Some Screenshots:
pictures are 403 Otherwise great stuff dude!
Did you tried Debian 6.0?
Lenny = 5.0
Squeeze = 6.0
Code:
build-arm-chroot --verbose --arch=armel --foreign squeeze debian http://ftp.us.debian.org/debian
For the dumb ppl here, the second screenshot is of your phone running an OS?
Sent from my MB525 using XDA App
bash: build-arm-chroot: command not found
which package.deb include build-arm-chroot?
To see the pics : right-clic => open image in new tab
DrogenDiego said:
pictures are 403 Otherwise great stuff dude!
Click to expand...
Click to collapse
Don't work for me to
mick711 said:
Don't work for me to
Click to expand...
Click to collapse
DONT click on the link. Copy the link location or the url and then paste in url browser.
Echo " COCUS WAS HERE (I hate JAVA) ".... nevertheless well done. I will try it with squeeze.
I was wondering what exactly is the final result here, maybe a REMOTE lxde (GUI for debian) for my defy running on PC or something like that..
well i got my answer here:
http://www.androidfanatic.com/community-forums.html?func=view&catid=9&id=1615
So, if you have the same doubt, NO, it's not a remote desktop, it is debian + lxde (or IceWm) running directly on your defy.
The connection through vnc is just a workaround to make it working.
Thanks Cocus for your nice step-by-step guide.
Hi. Thanks for the feedback. I've reuploaded the images to imageshack, now you can see them without any 403.
johnw.xda said:
bash: build-arm-chroot: command not found
which package.deb include build-arm-chroot?
Click to expand...
Click to collapse
Hi john, are you running the command in Debian or Ubutnu?
Did you run the command of debootstrap?
Code:
# apt-get install debootstrap
walter79 said:
Did you tried Debian 6.0?
Lenny = 5.0
Squeeze = 6.0
Code:
build-arm-chroot --verbose --arch=armel --foreign squeeze debian http://ftp.us.debian.org/debian
Click to expand...
Click to collapse
Nope, I haven't tryied it. In fact, I was trying to get it working. Now I would try to do some interesting things.
chaihg said:
For the dumb ppl here, the second screenshot is of your phone running an OS?
Sent from my MB525 using XDA App
Click to expand...
Click to collapse
In fact, the kernel is the one that the phone booted. The only thing that I've done, is changing the root (/) path to another one, that is like swap the filesystem to another one. The other path, contains the debian root, so you will have a debian root, instead the default of your phone. With that, we can use the debian (armel) features, like aptitude (apt-get install) and such.
If anyone knowns how to mount images on loop or any thing like, please feel free to comment. I'm running out of space in my device (almost 10mb left). So, the image mount could be the best option, but I can't figure how to do that in the stock kernel.
cocus said:
Hi. Thanks for the feedback....
Click to expand...
Click to collapse
Hi cocus,
is there any way to get it working without the vnc part? I mean, it would be great if we could load debian and lxde from our defy regardless of the vnc connection.
If i'm not wrong, to boot propely it needs to load some drivers from PC, that's why we need the vnc. Is it correct?
xdaid said:
Hi cocus,
is there any way to get it working without the vnc part? I mean, it would be great if we could load debian and lxde from our defy regardless of the vnc connection.
If i'm not wrong, to boot propely it needs to load some drivers from PC, that's why we need the vnc. Is it correct?
Click to expand...
Click to collapse
The fact is, debian doesn't have access to the display. I really don't know why, because I'm kinda dumb on linux stuff.
If somebody knowns how to add graphical support (display), and/or mouse (touchscreen), it would be great. And, we could just close the dalvik and run the debian (a lot of ram would be free to use).
Now im trying to use the camera, audio and mic. They appears in /dev/, so the drivers are working fine, but I don't know with application to use.
If you can install Debian on a Defy, why isn't it possible to install Gingerbread ? :/
geecko said:
If you can install Debian on a Defy, why isn't it possible to install Gingerbread ? :/
Click to expand...
Click to collapse
Not exactly installed. Let me clarify it.
The linux file system consists of directories and start at the root directory. (/). Imagine the Windows95 directory, and change the boot to the path of Windows98. Technically what boots (in this case the kernel) is the same, but what changes is the directory. So you'll have a working Debian, as if it were actually installed, but it really is not.
Debian can not access the screen (at least I do not know how to set it up) so you have to use VNC server locally to access the X11 (display manager).
Take into account that anything here is emulated at all, is running all native.
I really don't known nothing about Gingerbread.
cocus said:
Hi john, are you running the command in Debian or Ubutnu?
Did you run the command of debootstrap?
Code:
# apt-get install debootstrap
Click to expand...
Click to collapse
hi cocus, yes i did install debootstrap, on my debian/and64.
dpkg -L debootstrap can not found build-arm-chroot too
which debian are you using? mine is unstable + testing.
thank you.
johnw.xda said:
hi cocus, yes i did install debootstrap, on my debian/and64.
dpkg -L debootstrap can not found build-arm-chroot too
which debian are you using? mine is unstable + testing.
thank you.
Click to expand...
Click to collapse
Hi, I'm using Lenny on x86. (VM is VMWare Workstation).
You could download the netinstall iso, and install on a new VM.
It might be a problem with your AMD64. Thus I don't really know. Try installing x86 on a VM.
cocus said:
Hi, I'm using Lenny on x86. (VM is VMWare Workstation).
You could download the netinstall iso, and install on a new VM.
It might be a problem with your AMD64. Thus I don't really know. Try installing x86 on a VM.
Click to expand...
Click to collapse
can you show me the output?
shell$ dpkg -S build-arm-chroot
also
shell$ which build-arm-chroot
and
shell$ dpkg -L debootstrap | grep build-arm-chroot
thank you.
johnw.xda said:
can you show me the output?
shell$ dpkg -S build-arm-chroot
also
shell$ which build-arm-chroot
and
shell$ dpkg -L debootstrap | grep build-arm-chroot
thank you.
Click to expand...
Click to collapse
Hi. I've done all of that, but without any outputs, and a lot of errors. I've researched, and I've made a mistake in my info.
Replace build-arm-chroot with debootstrap. Its the same.
(now edited on the main post)
Sorry for the inconvenience.
cocus said:
Hi. I've done all of that, but without any outputs, and a lot of errors. I've researched, and I've made a mistake in my info.
Replace build-arm-chroot with debootstrap. Its the same.
(now edited on the main post)
Sorry for the inconvenience.
Click to expand...
Click to collapse
ok. i will retry it, when i back to home.
thank you.
can you run vim on your defy?
i really miss it, when i want to edit plain text file.

BackTrack 5 for Android Smartphones - VERY UNSTABLE

WARNING: THIS IS NOT FOR THE FAINT OF HEART
UPDATE: My goal was to create a version of BackTrack 5 for ARM that was easy to use and install. As of this time, that IS NOT the case! The versions posted here are **probably not** going to work straight out of the box. If you know what you are doing in a Linux environment, you'll probably be able to get it working.
Because of this, the project is currently completely unsupported. You are free to dive in, but you are doing so with no support for me, and I'm not liable for any damage that might be done to your device's ROM.
I encourage you to pass this up unless you know what you are getting yourself into!
If you were referred here from the XDA-Developers.com article...
Hi there! Let's get one thing on the record here... this is *not* a native client! This is the chroot + VNC method that we'd been using to get Ubuntu running with Android for a while. The article makes it sound like that's the case, but sadly it's not. However, with the chroot + VNC method we can really run BackTrack 5 on an Android device, and it really does work. This takes some technical skills, and isn't for the non-Linux experienced user.
Requires a rooted device!
BackTrack 5 installation guides are making their way around this forum. I've tried to synthesize it all, but I've also added my own touches to help with usability and features, along with a workaround for the "ioctl LOOP_SET_FD failed" error message some people have been getting.
In theory this build is nearly universal, so if you have an Android device it should work. I've put it all in one zip file that you can download directly from my website, no hassles or wait timers.
If you are interested have a look, feel free to re-post. Credit goes to the BackTrack team and xda member anantshri (he's got skills, give him props guys), who built the base image file.
Information, download link, and installation guide at:
(SERVER OFFLINE, SEE BELOW)
If you like what you see help me out, hosting is expensive!
http://www.mattslifebytes.com/donate
(alternatively, you can show interest in the products and services featured on my website, if you know what I mean )
msullivan said:
If you don't know what BackTrack is, you probably don't want it
BackTrack is an operating system based on Ubuntu Linux that is used for security testing (aka hacking) and digital forensics. I'm a master's degree student in computer security, so I love this OS... it can do awesome things. Turn on your Wi-Fi and you can do advanced network scans and tests right from your phone, no laptop required. For me this is hella-useful.
But besides just being an OS for hacking ****, it's also fully Ubuntu-based, so you can run it like a desktop, including running Firefox and other Linux applications.
Click to expand...
Click to collapse
Well guys my server had hardware failure (lol, my luck), so here's the website's content:
msullivan said:
The Download
This installation of BackTrack 5 is available as a compressed file that will need to be extracted. I recommend downloading this using Chrome or Firefox. Internet Explorer often doesn’t play well with large HTTP downloads.
The root account’s password and the VNC server password are both set to ‘root’ by default!
Mirror 1
Part 1: http://www.mediafire.com/?1z5sbxdxv3naxp1
Part 2: http://www.mediafire.com/?0zz1vac0k59d58p
Part 3: http://www.mediafire.com/?kxpb7ug0x55ppde
Mirror 2
http://www.megaupload.com/?d=M6YCKZLR
Mirror 3 (Provided by shenshang)
http://www.shenye.co.uk/files/BackTrack5ForARM-MattsLifeBytesEditionv2.zip
Mirror 4 (Provided by brilldoctor)
http://brilldoctor.co.cc/Files/BackTrack5ForARM-MattsLifeBytesEditionv2.zip
Mirror 5 (Thanks for uploading, PIIcoding)
Part 1: https://rapidshare.com/files/3602140493/BackTrack5ForARM-MattsLifeBytesEditionv2.part1.rar
Part 2: https://rapidshare.com/files/2384880899/BackTrack5ForARM-MattsLifeBytesEditionv2.part2.rar
Part 3: https://rapidshare.com/files/3314159192/BackTrack5ForARM-MattsLifeBytesEditionv2.part3.rar
Part 4: https://rapidshare.com/files/3073073580/BackTrack5ForARM-MattsLifeBytesEditionv2.part4.rar
Part 5: https://rapidshare.com/files/2486943841/BackTrack5ForARM-MattsLifeBytesEditionv2.part5.rar
Part 6: https://rapidshare.com/files/3545372402/BackTrack5ForARM-MattsLifeBytesEditionv2.part6.rar
Part 7: https://rapidshare.com/files/2371728719/BackTrack5ForARM-MattsLifeBytesEditionv2.part7.rar
Part 8: https://rapidshare.com/files/1437974805/BackTrack5ForARM-MattsLifeBytesEditionv2.part8.rar
Part 9: https://rapidshare.com/files/1758571109/BackTrack5ForARM-MattsLifeBytesEditionv2.part9.rar
The Description
If you want to run BackTrack 5 on your Android-powered device, read on, you’re in the right place! So the big news is that BackTrack 5 runs on Android phones. We’ve been able to run Ubuntu on these devices for quite some time too, but admittedly BackTrack on a smartphone is just awesome.
Anyway, files for using BackTrack 5 on an Android phone have been running around the internet, but sadly it’s kind of a mish-mash of links saying, “go download this, then get this, to then this, blah blah blah”. Too confusing for my simple brain, so I’ve rounded it all up and posted it in one place… right here. The version posted here has everything you should need to run BackTrack 5 on your Android device. I’ve also added a lot of goodies to help with the user experience that the other offerings don’t include:
Works around the ioctl LOOP_SET_FD failed error that many people have been receiving on Galaxy S devices (and others)
Asks the user if they want a VNC session upon start-up
Starts the SSH service automatically and displays device IP on start-up
Enables the Ubuntu repositories to Aptitude, so you can do package installation
Adds vim. Really, what distribution doesn’t come with vim by default? Seriously…
Sets the screen resolution to 800×480 default (should be compatible with most smartphone devices)
SU
This requires root!
You must be able to "su" at terminal. This ability is usually provided by software for rooting your phone. To see if you have rooted your phone correctly and it's working, go to your terminal emulator and type "su" <enter>. If it is working, you'll probably get a prompt asking you if you want to allow your terminal emulator root access. Hit accept/yes. Now you'll be back in your terminal emulator. Type "whoami" <enter>. If it responds with "root" or "uid 0", then you are properly rooted.
Busybox
This requires Busybox!
I am no longer providing an installer for Busybox because of issues getting it to work universally, so instead YOU need to go get a working build and install it (I believe "Busybox Installer" will work, but not tested). If you want to know if you have Busybox and it's working, go to your terminal emulator and type "su" <enter>, then "busybox ls" <enter>. If you get a printout of all the files in your current directory, then your Busybox will likely work with BackTrack 5 just fine. If you get an error, "busybox: not found", that means you either do not have Busybox, or it is not properly installed.
WARNING FOR CyanogenMod USERS
Before doing ANYTHING, please test for ext2 support by running (as root, at terminal) --> "modprobe ext2" <enter>
If this fails probably your device lacks ext2 support and the whole thing will screw up if you try to run it! Support for ext2 in CM is being worked on.
The Installation Guide
Enable Wi-Fi and connect to a Wi-Fi access point (* not required, but BT5 cannot use your data plan for internet access)
Download the zip file, extract anywhere
After extraction you’ll have one folder “bt5″; copy this folder to the root of your phone’s SD Card
Put card back in phone and/or unplug from USB
In a terminal emulator, type “su” <enter>, “cd /sdcard/bt5″ <enter>
Now you are ready to rock and roll, so issue “sh bt” <enter> (in the future to start BT5 skip the line above and come straight to this command)
If all is well you’ll now be running BackTrack 5 on your Android device; you can SSH to it via Wi-Fi (password ‘root’), or access it from VNC if you said “Yes” to the prompt asking if you wanted a VNC session
To get a GUI for BackTrack on your smartphone’s screen, download a VNC viewer from the market (many are free), then connect to host “127.0.0.1″, port “5901″, password “root”
Enjoy, boys and girls.
The Credits
The BackTrack 5 Development Team
anantshri on xda-developers (his blog: http://blog.anantshri.info/) for creating the image file to fit FAT32 filesystems
anantshi's original thread where it all began: http://forum.xda-developers.com/showthread.php?t=1074169
Click to expand...
Click to collapse
Known Incompatibility
Voodoo lagfix kernel (possibly? reported, not confirmed)
Hi thanks for the great work, I try it on my HTC WildFire with CyanogenMod7 2.3 CFW
this what i got when try it install it from the terminal:
$ su
# id
uid=0(root) guid=0(root)
#
# cd /sdcard/bt5
# sh installbusybox
installbusybox: 14: Syntax error: end of file unexpected (expecting "fi")
#
# sh bt
bt: 36: Syntex error: end of file unexpected (expecting "then")
#
Click to expand...
Click to collapse
Which terminal emulator are you using?
Terminal emulator
Open up "installbusybox" in a text editor and axe the first two lines, then try again.
Hrm... I failed when packaging the version that got put up online (sorry). I'm fixing now, will update shortly.
ok i remove the first two lines, and i got:
# sh installbusybox
BeginningBusyBox installation...
mount: mounting /dev/block/mtdbloc faild: No such file or directory
/sdcard/busybox: No such file or directory
cd:can't cd to /data/local
installbusybox: ./busybox: permission denied
cd:can't cd to /system/xbin
: No such file or directory
installbusybox: ./busybox: permission denied
If there were no error messages given above then installation was successfull
#
Click to expand...
Click to collapse
not sure why when i try to chmod 755 busybox nothing change!
msullivan said:
Hrm... I failed when packaging the version that got put up online (sorry). I'm fixing now, will update shortly.
Click to expand...
Click to collapse
aha, ok thanks again
Awesome.
Sent from a super smooth captivate running andromeda
Old news...
Btw.. if you're having problems, migrate apps from SDCard to Internal memory.
edit: Just realized this came off kinda ****-like... So here http://forum.xda-developers.com/showpost.php?p=13924701&postcount=109
AdamOutler said:
Old news...
Click to expand...
Click to collapse
News isn't that BT5 runs on these; the news is that my builds resolve a lot of issues and makes it as simple as dropping in the files and saying go.
Fixed version now posted at the website.
http://www.mattslifebytes.com/?p=456
export PATH=/data/local/bin:$PATH
$ $su
# cd /sdcard/bt5
# sh bt
mkdir failed for /data/local/mnt, File exists
mount: No such device
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bt: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM
failed.
failed.
failed.
failed.
losetup: /dev/loop7: No such device or address
#
I have this error when i try
Sent from my A953 using Tapatalk
Motodoido said:
export PATH=/data/local/bin:$PATH
$ $su
# cd /sdcard/bt5
# sh bt
mkdir failed for /data/local/mnt, File exists
mount: No such device
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bt: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM
failed.
failed.
failed.
failed.
losetup: /dev/loop7: No such device or address
#
I have this error when i try
Sent from my A953 using Tapatalk
Click to expand...
Click to collapse
Same error here, Verizon Fascinate.
Motodoido, tripacer99: have you remembered to do the "sh installbusybox" command first?
I download the new package, and this what i got:
[[email protected] tools]$ ./adb shell
# id
uid=0(root) gid=0(root)
# cd sdcard/bt5
# ls
bt busybox installbusybox unionfs
bt5.img fsrw mountonly
# sh installbusybox
Beginning BusyBox installation...
/sdcard/busybox: No such file or directory
--install: applet not found
If there were no error messages given above then installation was successful!
# sh bt
mkdir: can't create directory '/data/local/mnt': File exists
Loop device exists
losetup: /dev/block/loop7: No such file or directory
mount: mounting /dev/block/loop7 on /data/local/mnt failed: Device or resource busy
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
bt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bt: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bt: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: ip 192.168.2.13 mask 255.255.255.0 flags [up broadcast running multicast]
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM
umount: can't umount /data/local/mnt/dev/pts: No such file or directory
umount: can't umount /data/local/mnt/proc: No such file or directory
umount: can't umount /data/local/mnt/sys: No such file or directory
umount: can't umount /data/local/mnt: Invalid argument
losetup: /dev/loop7: Device or resource busy
#
Click to expand...
Click to collapse
Hrm yet another small error in one of the scripts. So sorry :S (this script is from the BT5 team though, so I take no fault in it not working, lol).
Open "installbusybox" in a text editor and replace the text "cat /sdcard/busybox" with "cat /sdcard/bt5/busybox" it should work. I'll fix it and put it up online once I'm home from work today.
msullivan said:
Hrm yet another small error in one of the scripts. So sorry :S (this script is from the BT5 team though, so I take no fault in it not working, lol).
Open "installbusybox" in a text editor and replace the text "cat /sdcard/busybox" with "cat /sdcard/bt5/busybox" it should work. I'll fix it and put it up online once I'm home from work today.
Click to expand...
Click to collapse
thanks for your time and for your help
now i got:
# sh installbusybox
Beginning BusyBox installation...
[1] Illegal instruction ./busybox cp /da...
--install: applet not found
If there were no error messages given above then installation was successful!
#
# cat installbusybox
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
echo "Beginning BusyBox installation..."
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cat /sdcard/bt5/busybox > /data/local/busybox
chmod 755 /data/local/busybox
#/data/local/busybox mkdir /system/xbin
cd /data/local
./busybox cp /data/local/busybox /system/xbin
cd /system/xbin
chmod 755 busybox
./busybox --install -s /system/xbin
rm /data/local/busybox
echo "If there were no error messages given above then installation was successful!"
# ls /data/local/busybox
ls: /data/local/busybox: No such file or directory
#
Click to expand...
Click to collapse
Dr_Death said:
thanks for your time and for your help
now i got:
Click to expand...
Click to collapse
I'll have to play when I get home... at the moment I don't have an answer :-/
Link is offline....

[DEV] Chroot Ubuntu

here you go chroot ubuntu
So you have a working rootfile system like hd2
put the root file system on sdcard location /sdcard/ubuntu
place the two files in /sdcard/ubuntu
(run as root ) just install with -> sh install.sh And READ
installing vnc
in ubuntu linux terminal ->
export USER=root
vncserver -geometry 1024×750
nano /root/.bashrc
Add this to the beginning
###########################
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1280×750
########################### ctrl+x to save
Thanks to,
aligatro2010 4 resolution
poltak11 4 helping you guyś with some more info
now connect with your own password and port 5900 or 5901 ad localhost with VNC Android !!
Just download the rootfs from the HD2 form
Ubuntu Chrootenv. <- new
{
"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"
}
So how does this works -->
# DONT TOUCH FIRST LINE !!!!
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system ## lets mount the nand RW so that we can make folders
echo "SETTING VARIABLES"
export bin=/system/bin ## divine where bin is
export mnt=/data/local/ubuntu ## divine where mnt is
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH ## set path so that we can run things anywhere
export TERM=linux ## divine term
export HOME=/root ## divine home
if [ ! -d /data/local/ubuntu ] ## if there go else create data/local/ubuntu
then
mkdir /data/local/ubuntu
fi
echo "MOUNTING"
mount -t ext2 -o loop /sdcard/ubuntu/rootfs.ext2 /data/local/ubuntu ## mount a ext2 loop file from dir to dir
mount -t devpts devpts $mnt/dev/pts ### mount android devpts in root (mnt/dev/pts)
mount -t proc proc $mnt/proc ## same as above
mount -t sysfs sysfs $mnt/sys ### same as above
echo "SETTING UP NETWORK"
sysctl -w net.ipv4.ip_forward=1 ## ip forward so that we have internet from android
echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf ### as is
echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf ### as is
echo "127.0.0.1 localhost" > $mnt/etc/hosts ## as is
echo "All credits to original creator !!!!!!!"
chroot $mnt /bin/bash #### finally lets chroot the dir and init /bin/bash meaning lets start a vm on that dir
and thats all to chrooting
ok this is pure awesome but...it would mean running 2 OS's just like the old day of running multiple os types off my old winmo phone...right?
Wow, great work! Wish the xda app had a thanks button
Sent from my SPH-D700 using XDA App
"So you have a working rootfile system like hd2
put the root file system on sdcard location /sdcard/ubuntu"
Would anyone mind explaining that beginning part? Seems like I have the folder on my SD card and the 2 files but I am missing the "working rootfile system like hd2". Does this mean i need to make an image of an already running root file system.
My apologies in advance if I am asking a noob question.
i dont understand what is hd2
So you have a working rootfile system like hd2
What is HD2 ? And do we put the two files on the Removable ( REAL SD CARD ) or the Asus Transformer ?
rm failed for -f No such file or directory
CP Can't create '/system/bin/ubuntu: Permission Denied
Type 'sh ubuntu' to boot Ubuntu
I suspect they are refering to the ubuntu.img available in the HD2 Ubuntu Dev forum, im downloading now to test, i'll post my results.
Im guessing put them on the Removable
# ls
install.sh ubuntu
# sh install.sh
Type 'sh ubuntu' to boot Ubuntu
# sh ubuntu
SETTING VARIABLES
MOUNTING
ioctl LOOP_SET_FD failed: Bad file number
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
ubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
ubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
ubuntu: line 24: can't create /data/local/ubuntu/etc/hosts: nonexistent directory
All credits to original creator !!!!!!!
chroot: can't execute '/bin/bash': No such file or directory
#
I installed from http://androidadvocate.com/?p=339 and it works great, but running ubuntu native would be much, much better.
lithiasalesjs said:
# ls
install.sh ubuntu
# sh install.sh
Type 'sh ubuntu' to boot Ubuntu
# sh ubuntu
SETTING VARIABLES
MOUNTING
ioctl LOOP_SET_FD failed: Bad file number
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
ubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
ubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
ubuntu: line 24: can't create /data/local/ubuntu/etc/hosts: nonexistent directory
All credits to original creator !!!!!!!
chroot: can't execute '/bin/bash': No such file or directory
#
Click to expand...
Click to collapse
OMG , you only have two files !!! please read OP
Alright, to you guys who don't understand (and I agree, the first post was a bit hard to understand), you need a few components first:
OP's uploaded zip containing 2 files (scripts that kinda do all the hard stuff for you):
- ubuntu
- install.sh
and
a root filesystem
The root filesystem is kinda like an image of Ubuntu and the kernel that had been ported to ARM by wizards, or something like that (correct me if I'm wrong please).
I'm pretty sure OP wants us to use an Ubuntu root filesystem for the HTC HD2, found here:
http://forum.xda-developers.com/showthread.php?t=889433
(the torrent was fairly speedy)
Anyway, I just got this working with aligatro2010's link which takes us to a guide for getting this chrooting business happening on a Nexus One. But don't panic! The guide works for our Transformer too. So yeah, follow this if you want to get it up and running this way.
But at the line that tells you to type:
vncserver -geometry 1024×800
Change the resolution to 1280x750. Thanks to aligatro2010 for correcting my resolution.
Anyway, I'm going to try and get this working with the HD2 root filesystem as OP said, and will report back my success in a while.
(Seriously the coolest thing I've found yet with my TF... I never thought you could do this... thanks OP!!!)
poltak11 said:
Alright, to you guys who don't understand (and I agree, the first post was a bit hard to understand), you need a few components first:
OP's uploaded zip containing 2 files (scripts that kinda do all the hard stuff for you):
- ubuntu
- install.sh
and
a root filesystem
The root filesystem is kinda like an image of Ubuntu and the kernel that had been ported to ARM buy wizards, or something like that (correct me if I'm wrong please).
I'm pretty sure OP wants us to use an Ubuntu root filesystem for the HTC HD2, found here:
http://forum.xda-developers.com/showthread.php?t=889433
(the torrent was fairly speedy)
Anyway, I just got this working with aligatro2010's link which takes us to a guide for getting this chrooting business happening on a Nexus One. But don't panic! The guide works for our Transformer too. So yeah, follow this if you want to get it up and running this way.
But at the line that tells you to type:
vncserver -geometry 1024×800
Change the resolution to 1280x800. BUT WAIT! I did this and it kinda cut of the status bar at the bottom, so can someone please tell me how many pixels tall the status bar is?
Anyway, I'm going to try and get this working with the HD2 root filesystem as OP said, and will report back my success in a while.
(Seriously the coolest thing I've found yet with my TF... I never thought you could do this... thanks OP!!!)
Click to expand...
Click to collapse
1280x750 is the resolution I use.
working
Alright, confirmed to have this fully working via OP's method. Details follow:
Get HD2 root filesystem:
http://forum.xda-developers.com/showthread.php?t=889433
Download the link (torrent is fast). Extract it and find rootfs.ext2 in the linux folder. Copy that onto your TF and place it in the /sdcard/ubuntu/ directory (it's around 3GB).
Get OP's scripts:
Download from the link in the first post. Extract the zip and move the 2 files to the /sdcard/ubuntu/ directory on your TF.
Alright, now we got what we want.
Go into terminal emulator on your TF (any should hopefully work... I used BTE Pro).
Type the following:
Code:
su
Gives you root privileges... note: I'm not sure if this is needed... not too familiar with Android.
Code:
cd /sdcard/ubuntu/
sh ubuntu
You should now be "chrooted" into the Ubuntu environment. That is, you've changed the root to the Ubuntu root filesystem (don't worry if you don't understand this). It should look a bit like this:
Code:
[email protected]:/#
Now to get up the VNC server so we can view a GUI (make sure you have internet connection at this step!!! We're just going to update package list and install a very small app):
Code:
apt-get update
apt-get install tightvncserver
Now you've got your vnc app installed in Ubuntu.
Now to set it up for use:
Code:
export USER=root
vncserver -geometry 1280x750
Yep! That's all set up... but yeah, nothing's happening just yet.
If you haven't already got a VNC client installed on your TF (note Android NOT Ubuntu), go here:
http://code.google.com/p/android-vnc-viewer/downloads/list
and get the latest one and install it on your device.
Now go into the app and put a Nickname ("ubuntu" might be wise), your Password (if you made one), leave Address empty, and make Port 5901.
If you want it to look nice, change Color Format to 24-bit color (4 bpp).
Now press connect and you should be in your chrooted fully-functional Ubuntu.
Oh yeah, if you want to automate this whole process so you don't have to do it everytime you reboot your TF or whatever, follow the instructions in OP about editing /root/.bashrc file. This file basically runs everytime the root user logs in... ie. everytime you start your chrooted Ubuntu. So it will do all this automatically, everytime you start (type sh ubuntu in terminal).
Did I miss anything else?
Please note:
Jhinta is the brains behind this (and those HD2 guys who managed to port Ubuntu to ARM). If you get this working properly give some thanks to him. He's the one who wrote the scripts to do this all for you (those 2 files in the /sdcard/ubuntu/ directory). I'm just trying to make it a bit easier to understand for "non-linux nerds" and to help walk you through this. Because, really, it's pretty damn cool Even if you're not familiar with Linux or Ubuntu, try it out... you might just learn something!
poltak11 said:
Alright, confirmed to have this fully working via OP's method. Details follow:
Get HD2 root filesystem:
http://forum.xda-developers.com/showthread.php?t=889433
Download the link (torrent is fast). Extract it and find rootfs.ext2 in the linux folder. Copy that onto your TF and place it in the /sdcard/ubuntu/ directory (it's around 3GB).
Get OP's scripts:
Download from the link in the first post. Extract the zip and move the 2 files to the /sdcard/ubuntu/ directory on your TF.
Alright, now we got what we want.
Go into terminal emulator on your TF (any should hopefully work... I used BTE Pro).
Type the following:
Code:
su
Gives you root privileges... note: I'm not sure if this is needed... not too familiar with Android.
Code:
cd /sdcard/ubuntu/
sh ubuntu
You should now be "chrooted" into the Ubuntu environment. That is, you've changed the root to the Ubuntu root filesystem (don't worry if you don't understand this). It should look a bit like this:
Code:
[email protected]:/#
Now to get up the VNC server so we can view a GUI (make sure you have internet connection at this step!!! We're just going to update package list and install a very small app):
Code:
apt-get update
apt-get install tightvncserver
Now you've got your vnc app installed in Ubuntu.
Now to set it up for use:
Code:
export USER=root
vncserver -geometry 1280x750
Yep! That's all set up... but yeah, nothing's happening just yet.
If you haven't already got a VNC client installed on your TF (note Android NOT Ubuntu), go here:
http://code.google.com/p/android-vnc-viewer/downloads/list
and get the latest one and install it on your device.
Now go into the app and put a Nickname ("ubuntu" might be wise), your Password (if you made one), leave Address empty, and make Port 5901.
If you want it to look nice, change Color Format to 24-bit color (4 bpp).
Now press connect and you should be in your chrooted fully-functional Ubuntu.
Oh yeah, if you want to automate this whole process so you don't have to do it everytime you reboot your TF or whatever, follow the instructions in OP about editing /root/.bashrc file. This file basically runs everytime the root user logs in... ie. everytime you start your chrooted Ubuntu. So it will do all this automatically, everytime you start (type sh ubuntu in terminal).
Did I miss anything else?
Please note:
Jhinta is the brains behind this (and those HD2 guys who managed to port Ubuntu to ARM). If you get this working properly give some thanks to him. He's the one who wrote the scripts to do this all for you (those 2 files in the /sdcard/ubuntu/ directory). I'm just trying to make it a bit easier to understand for "non-linux nerds" and to help walk you through this. Because, really, it's pretty damn cool Even if you're not familiar with Linux or Ubuntu, try it out... you might just learn something!
Click to expand...
Click to collapse
fist thing thnx for the addon info .
but its not a port ubuntu is arm ,it was nerver ported its just a arm ubuntu build and will work on any arm cpu, chroot like this is just adapt to be able to do it .
there is realy nothing special about it , but native well , uuu in time soon i think
Jhinta said:
fist thing thnx for the addon info .
but its not a port ubuntu is arm ,it was nerver ported its just a arm ubuntu build and will work on any arm cpu, chroot like this is just adapt to be able to do it .
there is realy nothing special about it , but native well , uuu in time soon i think
Click to expand...
Click to collapse
ohh! So in time we might see a nvflash version of Ubuntu that can completely replace Android? Maybe even a full package that can dual boot Ubuntu/Android natively?
Very exciting stuff, but I'm at the mercy of more intelligent devs around here. Good luck guys!
Getting some errors
/sdcard/ubuntu # sh ubuntu
SETTING VARIABLES
MOUNTING
ioctl LOOP_SET_FD failed: Device or resource busy
mount: I/O error
mount: I/O error
mount: I/O error
SETTING UP NETWORK
net.ipv4.ip_forward = 1
ubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: I/O error
ubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: I/O error
ubuntu: line 24: can't create /data/local/ubuntu/etc/hosts: I/O error
All credits to original creator !!!!!!!
chroot: can't execute '/bin/bash': Input/output error
dude2k5 said:
Getting some errors
/sdcard/ubuntu # sh ubuntu
SETTING VARIABLES
MOUNTING
ioctl LOOP_SET_FD failed: Device or resource busy
mount: I/O error
mount: I/O error
mount: I/O error
SETTING UP NETWORK
net.ipv4.ip_forward = 1
ubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: I/O error
ubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: I/O error
ubuntu: line 24: can't create /data/local/ubuntu/etc/hosts: I/O error
All credits to original creator !!!!!!!
chroot: can't execute '/bin/bash': Input/output error
Click to expand...
Click to collapse
means thats i cant mount the rootfs .
Device or resource busy -> the loop dev that we create i think it was /dev/block/loop2 is busy whit your device , you can edit the script and try any other loopX 123456 .
recommanded is to try to do the command 1 by one in adb shell or terminal
Jhinta said:
means thats i cant mount the rootfs .
Device or resource busy -> the loop dev that we create i think it was /dev/block/loop2 is busy whit your device , you can edit the script and try any other loopX 123456 .
recommanded is to try to do the command 1 by one in adb shell or terminal
Click to expand...
Click to collapse
I opened the script and saw:
/dev/block/mmcblk0p1
Little confused..sorry
edit: wait, this?
mount -t ext2 -o loop /sdcard/ubuntu/rootfs.ext2 /data/local/ubuntu
edit2: well I tried again. When I got to
mount -t ext2 -o loop2 /sdcard/ubuntu/rootfs.ext2 /data/local/ubuntu
It worked, or didnt give me an error, but right after
mount -t devpts devpts $mnt/dev/pts
I get a mount: I/O error

Debshell bash error on HTC Gratia with latest CM7

As it is my first message, I have permissions only to post messages here.
I want to run Backtrack 5 on my Gratia. I installed Debdroid as written at gitbrew's website[/url]
I use oririnal BT image from this website.
I renamed btandr35.img to debian.img to make no changes to .conf file.
After "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system", "export ...", "su", "bash" I've got this error
localhost / # debshell bash
/system/bin/debshell: line 17: /data/local/debian/etc/hostname: No such file or directory
Opening debdroid chroot on loop255
chroot: can't execute 'bash' No such file or directory
Exiting debdroid chroot - System is still running
localhost / #
Anybody knows solution?
Syavick said:
As it is my first message, I have permissions only to post messages here.
I want to run Backtrack 5 on my Gratia. I installed Debdroid as written at gitbrew's website[/url]
I use oririnal BT image from this website.
I renamed btandr35.img to debian.img to make no changes to .conf file.
After "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system", "export ...", "su", "bash" I've got this error
localhost / # debshell bash
/system/bin/debshell: line 17: /data/local/debian/etc/hostname: No such file or directory
Opening debdroid chroot on loop255
chroot: can't execute 'bash' No such file or directory
Exiting debdroid chroot - System is still running
localhost / #
Anybody knows solution?
Click to expand...
Click to collapse
I have the exact same problem as you, I am running the Droid 2 CM 7 Nightly build (latest). I have bash, etc. Bash exists in two places: /system/xbin and /etc/bash, but even using the command (after you are in bash) "chroot /data/local/debian /system/xbin/bash" (chroot command goes: "chroot directory [FILE ARGS]") and still got the same exact error: chroot: can't execute 'bash': No such file or directory.
I have used two different GB roms (leaked motorola stock and CM 7). I must have spent over a hundred hours this week looking for and testing out possible solutions, to no avail.
What are we missing?
/system/bin/debshell: line 17: /data/local/debian/etc/hostname: No such file or directory
I fixed this error by creating empty file "hostname" in "etc" directory. But I still have chroot error. I made some experiments with copying bash to different folders - no results.
Yeah that part of the problem was an easy fix, and even though I can use the bash command wherever I am in my filesystem as well as when I am using bash, it seems that chroot cannot find the bash command. Trouble is, I can't find chroot, and I would assume that chroot would be in the same directories as bash. Even using the command ls /*/chroot gives me nothing.
Nothing works as before!

Categories

Resources