yashsingh1/xdaforums huggingface dataset:
[Desire HD Android Development] fastphil:
i think i am in the terminal correctly where on my sd card should ubuntu i just made a new folder on the root off my sd & unzip all to that

folder

i think ihave solved it its regarding the files on my sd going to leave till tomorrow getting tired now
[Desire HD Android Development] LeeDroid:
You should have a folder on you sd which contains ubuntu.img, ubuntu.sh, bootubuntu and exitu, this is the folder you cd to

#cd sdcard/ubuntu

#su

#sh ubuntu.sh

#bootubuntu

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] makbil:
0 seeds? Come on, it's only 3 am :)
[Desire HD Android Development] Carl10r:
I'm still seeding :-)
[Desire HD Android Development] h00py:
I have debian (from this thread here)on my DHD and I use it for capturing packets/pentesting on my network. Has anyone tried running the network interface in promiscous mode in this version of Ubuntu?

P.S. Awesome work as usual Lee, hope to see good things from you with honeycomb ;)
[Desire HD Android Development] makbil:
Yeah, I finally found you :) Download complete in 52 min. Seeding now...

** Hits the thanks button **
[Desire HD Android Development] spookamiester:
I keep getting this. I did have A2SD but I've moved all apps to internal, checked SU permissions, checked /data, checked sdcard/ubuntu contains everything needed and was extracted correctly.

Any other suggestions?
[Desire HD Android Development] Aamir.Badat:
The netbooj version will be better because netbooks version is smaller than the desktop version
[Desire HD Android Development] Duskfall:
Getting an error and ubuntu doesn't boot.
[Desire HD Android Development] LeeDroid:
FroYo A2SD is interfering, ensure apps are on the internal, open spare parts and make sure A2SD default install location is also set to internal

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] LeeDroid:
As above with default install location, or you could use

#pm setInstallLocation 1

If that fails, try creating an ubuntu folder in /data/local/

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] kia1349:
does run it on revolution rom?
[Desire HD Android Development] Snake-Plissken:
hey lee i have a question regarding app2sd. i am using your leedroid rom with the app2sd+ patch. i still can use this one only if i moved it with froyo to sd card i have to move it back right?

and another question, what is ubuntu terminal? is it the android terminal if ubuntu is running?
[Desire HD Android Development] Phily757:
Im getting same issue as him. The ubuntu folder is present, but not the others in it. Su is working! (without it, its an other error)

So it must be the a2sd one. Tried that command. Try to start ubuntu later on!

Update on that: After applying #pm setInstallLocation 1 it works :) thx lee
[Desire HD Android Development] Snake-Plissken:
i am stuck at

6. After you have installed tightvncserver, type “cd /bin” (enter)

i always get: "no such file or directory"

this shouldnt be there or do i have to create this folder?

nevermind, i am to stupid to read, but its late and i am up all day long already ;)

Update:

got it all running, looks pretty awesome so far....but i have one question... exitu does not work, i always get command not found. if i just type exit i get UNMOUNTING is this normal? i checked the exitu file is in my ubuntu folder
[Desire HD Android Development] Jywa:
Thanks for your work Lee.

I tried install ubuntu and debian in December. But i were disappointed by the RAM memory limit.

I couldn't launch eclipse or wesnoth.

Is it change now ?

Be able to develop on the phone and all my desire will be complete !

Sent from LeeDrOiD Desire HD using xda app.
[Desire HD Android Development] Phily757:
Works very good!

Is it nessecary to “exit“ ubuntu terminal, or will it be ok for the battery if i only close vncserver via “s“??

Edit: how to right click?
[Desire HD Android Development] torsrex:
You double tap for right click.
[Desire HD Android Development] Jhinta:
Any way to boot it native? this is just chroot and slow.
[Desire HD Android Development] torsrex:
Hey!

This is cool, but i'm already out of space in the image, is there some way to get more space?
[Desire HD Android Development] Phily757:
Thanks
[Desire HD Android Development] Phily757:
nope, dual boot is possible with hd2 but not with dhd. its because of the bootloader...hit me if im wrong
[Desire HD Android Development] LeeDroid:
It still works with A2SD+ as I use it my self ;)

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] LeeDroid:
Correctomondo mate

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] LeeDroid:
Grab virtual trackpad or double click

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] LeeDroid:
It will work with any kernel that supports loopback

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] LeeDroid:
Il be looking further into the img ASAP ;)

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] LeeDroid:
Exit is recommended as failure to do so can result in an incorrect dismount and may stop you booting ubuntu in the future

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] spookamiester:
GAAARRGGHHH

I fell right at the last hurdle.

I got right up to

11. If you have GUI running, you * MUST * type “s” (enter) to stop VNC server before you exit from Ubuntu terminal!

I did that bit, I exited, VNC would no longer connect :(

In case that your Android kills your Android Terminal application and you still have VNC server running, do the following steps:

a. Start Android Terminal

b. type “bootubuntu” (enter) to bring back Ubuntu terminal

c. type “s” (enter) to stop VNC server

d. type “exit” (enter) to exit from Ubuntu terminal

I went back to do this bit and was greeted with all the same can't create, can't access stuff I posted in the screenshot before.

I was so close, I even got to play with the cursor after step 9. Not sure what went wrong or why it doesn't want to boot again now but I'm gonna give it a rest before my DHD flies through my window
[Desire HD Android Development] turbo_d:
Hey all, my exit never works always says device is busy. Exit the same the s script does however stop vncserver. I have reluctantly rebooted phone and it still works, any thoughts clearly something is keeping it in use but I can't find what.
[Desire HD Android Development] LeeDroid:
Reboot and all should be good to go again :p

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] zyssai:
Hi!

What kernel should i use with cm7 rc1 rom?

thanks!!!
[Desire HD Android Development] LeeDroid:
Anything kernel that supports loopback

Sent from my LeeDrOiD loaded HTC Desire HD
[Desire HD Android Development] zyssai:
thanks i have see that, but no way to know if cm7 kernel support loopback.

i ask that because i have a error directly after typing bootubuntu.

sorry no screenshot but there is numberous lines like "can't mount dev/...." etc

i'm french, sorry for bad tranlation
[Desire HD Android Development] kia1349:
anyone has direct link for download ubuntu?
[Desire HD Android Development] zyssai:
no way with you leedroid kernel.

i flashed your leedroid rom 2.0 and it's ok ;)
[Desire HD Android Development] ikostas_1:
I can't boot ubuntu...

The program recognize me as nexus one and tell of to in to nexusonehacks.net
[Desire HD Android Development] kia1349:
thanks in advance

i can download it.i testing it on revolution and leedroid (both) roms
[Desire HD Android Development] spookamiester:
I don't have that option in spare parts :(
[Desire HD Android Development] spookamiester:
Now I can't get past "bootubuntu"

Same errors as before. It seems to have a mind of it's own.

I've tried everything mentioned and I might just go and cry for a little while.

I have another SDCard. I'm thinking of wiping it completely and removing the ext3 partition, then starting fresh.

Ubuntu just hates me
[Desire HD Android Development] ikostas_1:
I can't boot ubuntu...

The program recognize me as nexus one and tell of to in to nexusonehacks.net

Any more help???
[Desire HD Android Development] zyssai:
Hi Leedroid and thanks for your work!!

new to the linux world, i have few questions that i think several users can ask:

1. where are saved the files i could create on ubuntu (eg.: text file)

2. can i use ubuntu in fullscreen mode (same resolution as desire hd)

3. if i must fullwipe my phone, where can i found the script files i have created (x and s) and is there a fast way to make my new flashed rom fastly operational for ubuntu?

4. with a cm7 rom, i have no way to install ubuntu. i have not find any kernel for cm7 that is loopback compatible. Do you know one?

5. again thanks a lot !!! and again sorry, i'm french ;)
[Desire HD Android Development] Jhinta:
i think this is becuase of cm7 dir is different because of android 2.3 i think , if you can modify the script you can
[Desire HD Android Development] Jhinta:
1 every thing you save is in the ext file on your sdcard , if mounted you sould be able to read it .

2 not recommanded , has to do with size its better when you have 1024 x 800.

3 ubuntu is just on your sdcard only thing is when wipe you have to do sh ubuntu.sh again

4 different dir structure loop is enabled but just the script has to be modified.

5 and sorry iḿ dutch ;)
[Desire HD Android Development] ikostas_1:
How can I do this???

I have leeDroid v2.0.0 with kernel v2.0.6
[Desire HD Android Development] zyssai:
thank you!

what script ar you talking about?

it's just a directory to modify?
[Desire HD Android Development] Jhinta:
:cool: we just need a gnu kernel , and boot it with fastboot , fastboot is the bootloader thats loads the kernel
[Desire HD Android Development] torsrex:
Followed the guide here to make the image bigger, just replaced every "debian" with "ubuntu" http://xdaforums.com/showpost.php?p=10194936&postcount=39

Will this work properly, I am trying it now, but I don't want to end up with a non-working ubuntu.

Edit: Perhaps i did something wrong, but my sdcard suddenly got unmounted and my 4gb big ubuntu img got reduced to 1.86gb :( Replacing with the original one now.
[Desire HD Android Development] dython:
try to make the directoy's look wat will happen
[Desire HD Android Development] tay200k:
+1 my isp blocks torrents :(
[Desire HD Android Development] zyssai:
this is what i got with cm7

and this is the bootubuntu file

mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system
echo "SETTING VARIABLES"
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi

echo "SETTING UP LOOP DEVICE"
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img

echo "MOUNTING"
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys

echo "SETTING UP NETWORK"
sysctl -w net.ipv4.ip_forward=1
echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf
echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo "Modified for the Desire HD By LeeDrOiD :D "

chroot $mnt /bin/bash

echo "UMOUNTING"
umount -lfr $mnt/dev/pts
umount -lfr $mnt/proc
umount -lfr $mnt/sys
umount -lfr $mnt
losetup -d /dev/block/loop1

i think there is some basic mods to apply for ubuntu to work with cm7 but what are these?!
[Desire HD Android Development] Tha:
good!

i really hope their capable of porting windows phone 7 to the desire HD, man i really dont like android running on it!
[Desire HD Android Development] MrYuiM:
Then get a HD7 and stop complaining. They're the same goddamn price...
[Desire HD Android Development] Jhinta:
Try one of this.

umount or unmount /dev/block/loop1 and try again.

or change losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img to loop2 -> becuase 1 is bizzy why not use 2 Donf forget to change all loop1 to 2 in script !!

also you can check with mount where loop1 is mount and with what , this is just for the info , but i thing if you change loop1 to 2 it will work

Also what you can do is brows dir /dev/block/ and look for loop dirs loop1 loop2 loop3 and so on .( maby even mkdir loop1 or 2 if its not there )
[Desire HD Android Development] Jhinta:
Here you go ( cant test as my phone is back tomarrow )

mount -o remount,rw -t ext3 /dev/block/mmcblk0p25 /system

echo "SETTING VARIABLES"

export bin=/system/bin

export mnt=/data/local/ubuntu

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

export TERM=linux

export HOME=/root

if [ ! -d /data/local/ubuntu ]

then

mkdir /data/local/ubuntu

fi

echo "SETTING UP LOOP DEVICE"

losetup /dev/block/loop2 /sdcard/ubuntu/ubuntu.img

echo "MOUNTING"

mount -t ext2 /dev/block/loop2 /data/local/ubuntu

mount -t devpts devpts $mnt/dev/pts

mount -t proc proc $mnt/proc

mount -t sysfs sysfs $mnt/sys

echo "SETTING UP NETWORK"

sysctl -w net.ipv4.ip_forward=1

echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf

echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf

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

echo "Brought to you by NexusOneHacks.net and the open source community! "

echo "Modified for the Desire HD By LeeDrOiD :D "

chroot $mnt /bin/bash

echo "UMOUNTING"

umount -lfr $mnt/dev/pts

umount -lfr $mnt/proc

umount -lfr $mnt/sys

umount -lfr $mnt

losetup -d /dev/block/loop2
[Desire HD Android Development] tay200k:
I got a desire hd and would love to see a port of wp7. The hd has better specs then the hd7 (i still love android)
[Desire HD Android Development] Jhinta:
1 your in the wrong thread

2 w7 on dhd will never work - no opengl and not even the same cpu

3 so it will be slow ( if even posible ) and intrest is 0%

4 good luck.
[Desire HD Android Development] zyssai:
I just say many thanks!!!

loop2 doesn't works but is see another post who says to try loop5 and it works :)

I think it's a good idea to edit the first post and tell that works on cm7 without specific kernel :)
[Desire HD Android Development] zyssai:
with rootexplorer i check if there is a directory called loop1 but there is no loop* on /dev/block

if i mkdir loop1 rootexplorer tells me dir created successfully but no loop1 dir is appears. strange..

ubuntu works with loop5 but still nothing in /dev/block (just dir called "platform" and "vold")
[Desire HD Android Development] alain57:
what is missing with ubuntu and terminal apps is the "tab" keyboard key ...

tipping all characters takes time like hell...

i did not do it on a computer, so i really didn't wish to do it on a phone, where tipping is even slower :(

i really hope some day someone will create a keyboard for android where there is the "tab" key :rolleyes:

i will try ubuntu ^^ but i'll wait some time
[Desire HD Android Development] h00py:
@zyssai I had the same errors as you with my CM7 (nightly build 4)

To fix it all I had to do was make sure all my apps were moved from the SDcard to internal storage.

:cool:
[Desire HD Android Development] zyssai:
for me i don't use ap2sd so i think it's just the loop1 i must replace with loop5 for example.

it's okay but i have seen that when i shutdown ubuntu i have the same problem. I can't unmount because another script use loop1 buti don't find where it is.
[Desire HD Android Development] h00py:
That's bizarre, wonder what's using lo1 :confused:

At least it looks like you can get it mounted on a different loop now.
[Desire HD Android Development] zyssai:
:cool:

yes, loop5 and it works like a charm :)

but to close ubuntu it doesn't works.

i open exitu file but nothing inside, i don't know where is the script line i need to modify for good unmounting
[Desire HD Android Development] h00py:
Your exitu is empty? Odd. Mine contains the following text:

export mnt=/data/local/ubuntu

echo "UMOUNTING"

umount -lfr $mnt/dev/pts

umount -lfr $mnt/proc

umount -lfr $mnt/sys

umount -lfr $mnt

losetup -d /dev/block/loop1

I assume if you edit the final line to "losetup -d /dev/block/loop5" it should dismount correctly?

Good luck :D
[Desire HD Android Development] zyssai:
it's already done but no change.

when i launch exitu it tells me file not found.

i think it's because i must copy exitu file in the filesystem/bin folder but there is 0bytes free so it's hard :D

why the filesystem is full? :confused:
[Desire HD Android Development] Nilu23:
tried this right now, but it didn't work. same error as before i changed the bootubuntu file.

anyone knows why?
[Desire HD Android Development] Jhinta:
just sty any loop number till it works , AND change any loopX to the right number in the whole script !!! if you set 5 set 5 for all !!!!!!!!!!!!!!!!!!!
[Desire HD Android Development] zyssai:
loop5 works for me with cm7
[Desire HD Android Development] zyssai:
if i understand correctly, regarding to the bootubuntu file, the space allowed for ubuntu is the sdext partition, right?

so i need to allocate more space to sdext? i will try that
[Desire HD Android Development] h00py:
You shouldn't need to copy exitu anywhere. This is how I interpreted Lee's instructions:

Once you're in ubuntu at the "root@localhost:/#" prompt

type "exit" and hit enter to return to the android terminal

THEN

type "exitu" and hit enter to unmount the ubuntu file system

I think you were getting device busy because you were still in ubuntu when you were trying to dismount it :p
[Desire HD Android Development] zyssai:
i don't know, here is how i exit ubuntu:

i disconnect vncviewer

go back to terminal, typing "s"

then typing "exit"

i do it wrong?

ps.: i tell you that i think exitu is a the wrong place because when i type exitu it tells me file does not exist :confused:
[Desire HD Android Development] h00py:
Yeah that should be correct. Next type this:

"sh /sdcard/ubuntu/exitu"

That will run the dismount script from its current location on the sdcard. :D
[Desire HD Android Development] lesiohormon:
please refresh links or do a mirror

404 Page Not Found

The page you requested was not found.
[Desire HD Android Development] h00py:
@zyssai here's a screenshot of my output so you can see what I'm talking about:

There's no device busy error at the end so I think it's dismounted okay.
[Desire HD Android Development] lpachuong:
Thxz Lee for this update. It is definitely what I have been waiting for.

Since I have got capped-internet, I haven't been able to download the torrent. Nevertherless, I have a question. Has anyone tried HID keyboard and does it work? My point is to have big screen + external keyboard and it will make a complete replacement for my laptop to work/uni.
[Desire HD Android Development] h00py:
As long as your HID keyboard works with android it should work with ubuntu cause VNC viewer just passes the keystrokes from android to ubuntu.
[Desire HD Android Development] zyssai:
yeah it seems to be ok this way, i have the same screen now. thanks!! ;)

another thing, i tried to expand size of sdext, but same result, my filesystem is 0 byte free, so i can't save any file on ubuntu filesystem.

do you know a tip?
[Desire HD Android Development] h00py:
Not sure if the SDEXT has any effect on your ubuntu filesystem size :confused:

It just mounts the ubuntu.img file as a virtual disk type thing so everyone should have the same amount of space free to begin with.

My file system properties says I have 132.8MB free

EDIT: Hueg image removed.
[Desire HD Android Development] DaM79:
Hey guys, one question. It´s mentioned that "A Custom kernel wit LoopBack support" is needed. The supplied one seems as if it has 2.0.6.

My current stock one 2.6.32.21-gf3f553d htc-kernel

Wouldn't this be a downgrade somehow? Is it possible to compile mine with LoopBack? Confused - and noob. ;)

Thx!
[Desire HD Android Development] Jhinta:
? you have a stock kernel ? , why not flash a modded one?

in sort terms , modded kernel is beter
[Desire HD Android Development] Jhinta:
you hase a rootfs file thats is ubuntu your free space of that system file is xxxx .

this chroot deal has nothing to do with android , chroot ubuntu is in a sort of vmware.

lets say android sdcard = 8GB with 4GB free

you have a rootfs of 2GB that you put on your android sdcard so sdcard free space is now 2GB

But now you mount rootfs and chroot is keep in mind you have a rootfs of 2GB

Wel lets say you have installed bla bla bla thats is ubuntu+blablabla = 1.8 ---> rootfs free space is 200mb got it
[Desire HD Android Development] DaM79:
Obiously, but last time I screwed up somehow while flashing to MIUI. And it took my 8hrs and the Samsung Galaxy from my GF to bring the DHD back to life. ;)

EG: Can I flash to MIUI and then use the recom. kernel? Or are there dependencies to fullfill?
[Desire HD Android Development] h00py:
Ah okay I follow, thanks for clearing that up :cool:
[Desire HD Android Development] Jhinta:
???? realy you dont have a backup thats like 2 min of work:confused: i dont know how the miui rom is build if you know that you know what or how and i dont know never tryed that one
[Desire HD Android Development] zyssai:
what the f**ck?!
[Desire HD Android Development] kendong2:
ok kids, let daddy show you how it's done

long time since i posted here, but i can't watch this anymore. see the attached file, it contains two scripts. put them together with the ubuntu.img file from the torrent in a folder named "ubuntu" on the root of your sdcard. use whatever you like (i suggest gscript) to execute setup.sh, make sure to do it as root. you need to do this only once. when that is done use whatever way you like (i like connectbot, but android terminal emulator will do as well), open a terminal, make sure you are root and type "startubuntu". if you want to end the ubuntu session type "exit". tested with ARHD2.0.13, but it will work with basically every linux kernel that supports loopmounting, the startubuntu script checks for that (if you need to disable that check do "startubuntu -nocheck").

talking about credits: that script goes way back to someone making an ubuntu image for the hero. iirc paul (modaco) has done the main work, however i heavily modified it.

i called the startup script startubuntu, since this has

nothing

to do with booting ubuntu on a phone. it is a chroot environment, the kernel is still the android kernel running, nothing is booted. just for the record ;)

oh and i believe the problems some of you are(were) having is that not all processes in the chroot are killed, thus the mountpoint is still busy and you can't unmount the image. that or open files, but i never tried the script from the torrent, so it's just a guess.
[Desire HD Android Development] h00py:
I didn't have much luck with your scripts I'm afraid.

I used gscript to run the setup.sh without any problems but when I ran startubuntu I got a bunch of no such file or directory errors then the phone restarts (too quickly to take a screenshot)

A++++++++ would execute again

:cool:
[Desire HD Android Development] Nilu23:
one question. i use CM7 rc1 is the kernel which comes with this rom working for this?
[Desire HD Android Development] h00py:
It should, I think the nightly I'm using is the same kernel

"2.6.32.28-cyanogenmod-gb17f070android@giulio-desktop#1"
[Desire HD Android Development] Nilu23:
jep i have the same kernel. but i tried loop2, loop5 but both didnt work.
[Desire HD Android Development] zyssai:
works perfectly for me with cm7 rc1 (i use the modified rom but it's the same kernel)

i use loop5
[Desire HD Android Development] zyssai:
same with me
[Desire HD Android Development] kendong2:
what rom? could be busybox missing. try

startubuntu > /sdcard/ubuntulog.txt 2>&1

restart will happen again, after this check ubuntulog.txt on your sdcard.
[Desire HD Android Development] Jhinta:
In 5 min i will make a guid here with maveric base of hd2, witrh some good mouting point and something special :cool:
[Desire HD Android Development] zyssai:
waiting for that :D