yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Themes and Apps] imarinoff:
Hello,

Thanks for the detailed instructions but I could not get it to run.

I am running darky's 9.5 with speedmod kernel

After enabling all kernel options when I execute the script i get the following (I have also removed the > /dev/null 2>&1

# sh ubuntu.sh

sh ubuntu.sh

WARNING: If you have more than 255 apps installed on the SDCard, then mounting the ubuntu.img will fail!

Apps on the SDCard associate with an encrypted loop device, and there are only 256 available to the system.

You have to go to Settings -> Manage Applications -> On SDCard, and move some apps back to phone storage in ord

then try again.

Please wait while booting ubuntu.img.. This can take some time...

mkdir: can't create directory '/data/local/mnt': File exists

mkdir: can't create directory '/data/local/mnt/proc': Operation not permitted

mkdir: can't create directory '/data/local/mnt/sys': Operation not permitted

mkdir: can't create directory '/data/local/mnt/dev': Operation not permitted

mkdir: can't create directory '/data/local/mnt/dev/pts': No such file or directory

mkdir: can't create directory '/data/local/mnt/sdcard': Operation not permitted

mkdir: can't create directory '/data/local/mnt/external_sd': Operation not permitted

mknod: /dev/block/loop255: File exists

mount: mounting /dev/block/loop255 on /data/local/mnt failed: Device or resource busy

mount: mounting /sdcard on /data/local/mnt/sdcard failed: No such file or directory

mount: mounting /sdcard/external_sd on /data/local/mnt/external_sd failed: No such file or directory

mount: mounting proc on /data/local/mnt/proc failed: No such file or directory

mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory

mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory

chroot: can't execute '/root/init.sh': No such file or directory

Exiting chroot environment and sync'ing memory to storage..

DO NOT EXIT until finished - doing so may corrupt the ubuntu.img!

umount: can't forcibly umount /data/local/mnt/sys: No such file or directory

umount: can't forcibly umount /data/local/mnt/dev/pts: No such file or directory

umount: can't forcibly umount /data/local/mnt/proc: No such file or directory

umount: can't forcibly umount /data/local/mnt/sdcard: No such file or directory

umount: can't forcibly umount /data/local/mnt/external_sd: No such file or directory
[Galaxy S I9000 Themes and Apps] fire314:
I suppose you have superuser installed and the latest busybox? To be sure you have superuser, reboot into Recovery, and run the superuser install (SpeedMod ULK Features -> ROOT / Install Superuser -> Simple: install busybox + su.

To make sure you have the latest busybox, get and run busybox installer from the market.

Hope this helps?
[Galaxy S I9000 Themes and Apps] DanWilson:
Its now been 9 hours since I told it to download the ubuntu-netbook files.

I hope I can use the launcher...

(apt-get install ubuntu-netbook)

It took around 30 mins to download it all, and 9+ hours to install. So imma WARNING that there thing.

Thats done, now how do I use it?

I can't log out to choose the session, and I can't unlock the Login Screen settings page...
[Galaxy S I9000 Themes and Apps] imarinoff:
Everything is installed and up-to-date

The strange thing for me is that the script first creates the folders in /data/local/mnt and then mounts the /dev/block/loop255 device in the same folder /data/local/mnt which actually makes the newly created folders unaccessible
[Galaxy S I9000 Themes and Apps] SilverHedgehog:
Is there a lighter image? My poor 4 gb flash wouldn't handle the load..
[Galaxy S I9000 Themes and Apps] edofic:
great stuff. works like a charm on my htc desire - cyanogenmod 7 rc4.

boots in something like a minute, and even firefox starts in reasonable time - like 10 seconds.

frankly, thats about as fast as my old pc.

perhaps you didn't know, but you can enable wifi on phone and then use vncviewer on you pc to connect to ubuntu running on your phone.

if you don't have wifi at your home, then you could plug in usb and enable usb debbuging. then you run(assuming you have android sdk installed)

adb forward tcp:5900 tcp:5900

and you should be able to create a vnc conection from your pc to 127.0.0.1:5900 and get inside you ubuntu on phone.

+1 for this.

i'd very happy to see minimalistic terminal only(ubuntu server-esque) image.. just the truly neccesary stuff to get going, and than to be able to install packages according to my wishes..

i may try to make one myself, but i don't have enough time currently.
[Galaxy S I9000 Themes and Apps] thedicemaster:
is there any way to change which folders from android are mounted under ubuntu?

i'd like to have my /mnt/usb folder to be mounted instead of external_SD because my tablet has no internal storage, but does support usb drives.
[Galaxy S I9000 Themes and Apps] edofic:
yes it shouldn't be a problem.

take a look at ubuntu.sh and find this part

################################################## ####################
# mount the phone's sdcard storage so it's accessible from ubuntu #
################################################## ####################
busybox mount -o bind /sdcard /data/local/mnt/sdcard > /dev/null 2>&1
busybox mount -o bind /sdcard/external_sd /data/local/mnt/external_sd > /dev/null 2>&1
################################################## #####################

and change it to

################################################## ####################
# mount the phone's sdcard storage so it's accessible from ubuntu #
################################################## ####################
busybox mount -o bind /sdcard /data/local/mnt/sdcard
busybox mount -o bind /mnt/usb /data/local/mnt/usb_drive
################################################## #####################

i removed the " /dev/null 2>&1" part because that simply means "don't show output of this command" so you can see what is going on.

please report if this works
[Galaxy S I9000 Themes and Apps] blacxcode:
whether running on darky 9.5 ?
[Galaxy S I9000 Themes and Apps] thedicemaster:
edofic: i did that already, except i used usb instead of usb_drive

it still showed the external_SD folder instead of usb

EDIT: almost there, did /sdcard/usb instead of /mnt/usb

i now get an error when mounting /mnt/usb(invalid argument)

using /mnt/usb/system_usb doesn't give that error, but doesn't seem to show any files.

trying a reboot now.

EDIT2: reboot, and inserting usb drive before starting ubuntu worked.
[Galaxy S I9000 Themes and Apps] Smasher816:
Thanks. I finally achieved my dream of developing java code whithout ever leaving the phone. Fyi, if you edit the ubuntu.sh to add output back on the chroot you could still have the command line in the terminal, and exit with it.

I just have one glitch. after using and stopping the virtual ubuntu i cannot get the usb mounting to work. A simple reboot will fix it though. Any idea why this is happing to me. (Im on a captivate running cm7).
[Galaxy S I9000 Themes and Apps] aaopt:
segmentation fault... is it armv7?

I get the same error ("Segmentation Fault") on my Optimus T. Both phones use armv6... I suspect this ubuntu port requires armv7. Can anyone confirm?
[Galaxy S I9000 Themes and Apps] fire314:
the error "chroot: applet not found" indicates that busybox is not installed properly. Install it again from the market via "busybox installer" to /system/xbin and select symlink busybox applets (I think these are the default settings anyway)
[Galaxy S I9000 Themes and Apps] blacxcode:
i've already install busybox 1.19.0 into "system/xbin" and then i check on terminal emulator file exist and shown on there, but i still got same error. whether i need loop?
[Galaxy S I9000 Themes and Apps] spyboy:
I have an idea of what controlling your computer with your phone via vnc client is, but a video should clear some doubts I think, like a demo you know. I'm interested in this; so I'm guessing that once you lose your connection (wifi or 3G) you are left in the limbo?. like you wouldn't be able to use the "preinstalled" apps or anything like that.?. I have Linux 0.3 for hd2 installed, is this anything like that?
[Galaxy S I9000 Themes and Apps] Infinimint:
Because the VNC Client is set to "localhost", it's basically saying that the device should connect to itself because the VNC Server is running on the same device (It's running within Ubuntu). So (I'm pretty sure) that internet would never be required.

I could try to make a video on YouTube or something and post it up, maybe later.

I'm unsure what Linux 0.3 for HD2 is (because I don't own an HD2), but if it requires replacing the OS, rebooting into the OS, or choosing it from a boot menu on startup than most likely, it is not the same. If it's running a virtual machine through Terminal, and connecting to it through VNC, than it is most likely the same.

Hope I helped.
[Galaxy S I9000 Themes and Apps] Xacky:
How long will it take?

It says ´Please wait while booting.img.. this can take some time....´

Waiting for over 15 minutes now.
[Galaxy S I9000 Themes and Apps] DanWilson:
The HD2's Linux/Ubuntu install is that, an install. It runs a custon kernel that boots the system to what I believe is an ext partition.

You don't understand how much I want that XD

Damn kernels though...
[Galaxy S I9000 Themes and Apps] spyboy:
Runs pretty good tho, I thought it was gonna be all sluggish, but no its actually speedy. its fun and useful to have an almost fully functional computer in your POCKET. The only thing is that it weights too much 3.x Gigs. I guess that's how small ad it can get. Yeah if you installed android on your hd2 I don't think another Os emulator is gonna run from it, the load would be too much.

Anyways yeah thanks for making things clerarer to the Guy 3 posts above.
[Galaxy S I9000 Themes and Apps] Danation:
The HD2 can run Android from NAND now, so WinMo isn't necessary.

I followed this guide, and it worked fine on the HD2 :)

I can't boot it the other way from Android, you can only boot into Ubuntu from WinMo, unfortunately.
[Galaxy S I9000 Themes and Apps] jastonas:
On my Lg Optimus 2X, when running sh ubuntu.sh my phone just reboots. Any suggestions?
[Galaxy S I9000 Themes and Apps] xmaskx:
H'm.

I get invalid argument when it comes to mount the loop.

Two times it worked already but then very long not...

sent from my MIUI HTC HD2
[Galaxy S I9000 Themes and Apps] thedicemaster:
stop waiting, and launch your vnc client.

the "this can take some time" is about the same amount of time it takes to find and launch your vnc app.

it never shows a message telling you it's done.
[Galaxy S I9000 Themes and Apps] Jrkoffjonson:
I haven't gotten the chance to look through all the pages on this forum but when I go to run ubuntu.sh i get this

/ $ su
/ # cd /sdcard/ubuntu
/sdcard/ubuntu # sh ubuntu.sh
: not foundline 9:
, File existsfor /data/local/ubuntu
: not foundline 11:
failed: No such file or directory
: not foundline 13:
failed: No such file or directorylocal/ubuntu
failed: No such file or directoryal/ubuntu
failed: No such file or directoryl/ubuntu
: not foundline 17:
sysctl: short write
: not foundline 19:
waiting for things to settle...
: not foundline 22:
Running ubuntu!
': No such file or directorybash
: not foundline 25:
: No such file or directorylocal/ubuntu
: No such file or directorylocal/ubuntu
: No such file or directorylocal/ubuntu
: No such file or directorylocal/ubuntu
: not foundline 32:
/sdcard/ubuntu #

Any ideas? :[
[Galaxy S I9000 Themes and Apps] Donny1987:
Thanks for this, at least one of the links in the OP didn't work anymore. Using your mirror right now :D
[Galaxy S I9000 Themes and Apps] SilverHedgehog:
I'm trying to resize the image, but I'm getting this error:

I'm a Linux noob, what am I doing wrong? It's just that 3.5 GB is too much.
[Galaxy S I9000 Themes and Apps] SilverHedgehog:
Okay, I really need some help with this stuff, Mac OS just doesn't allow me to resize anything at all, I just don't know what to do.

Could somebody make me a 1GB image?

All I need is:Firefox, Thunderbird, openoffice.org, GIMP, Transmission BitTorrent Client, eVince PDF Viewer, File Manager, Terminal, Image Viewer, Leafpad Text Editor, Synaptic Package Manager and Ubuntu Software Center, Gnash.

I just can't do it myself.
[Galaxy S I9000 Themes and Apps] xmaskx:
I can't resize smaller than 2500M. Or you will get consistency error.

Before you use the uec tool, make e2fsck with -f it was I think if you can't even resize it to 2500M. Confirm all with y.

That way it worked for me.

sent from my MIUI HTC HD2
[Galaxy S I9000 Themes and Apps] tr82691:
files download in different format

hey has anyone gotten a weird format for the files when they download them? they dont download as a zip they download as a "001 file" format. any help? thanks.
[Galaxy S I9000 Themes and Apps] dirhem:
Great topic.
[Galaxy S I9000 Themes and Apps] bluesky123:
How to change resolution?

Works on Viewsonic g Tablet (with VEGAn-TAB GingerEdition RC1), but the resolution is only 800x600...

I tried to change it via Preferences/Monitors, but it just shows "can't determine display resolution" error.

:(
[Galaxy S I9000 Themes and Apps] SGCMarkus:
hi,

i've a problem with the uec-resize-image file :/

it shows a lot of errors :(

can anyone reupload the file as small as possible?
[Galaxy S I9000 Themes and Apps] kolo200:
Amazing :D works well for me :D

But

Just how to run a usb host?? :(

I have power-cable for it.
[Galaxy S I9000 Themes and Apps] SilverHedgehog:
Is there a guide for creating these chroot images? I want to try making an image just for me.
[Galaxy S I9000 Themes and Apps] androc:
Did you try running fsck manually before resizing? Worked for me that way...

e2fsck -f ubuntu.img
uec-resize-image ubuntu.img 2500M ubuntu2.img
[Galaxy S I9000 Themes and Apps] homarr1:
Hi to all,

works very well with HTC Desire HD with stock rom.

Ubuntu can connect to internet via phone wi-fi card and have access to sd card contents and I can connect to os with vnc from a PC on the lan. Wow!

Speed is very good considering the hardware.

Now two questions:

I'd like to use a quite tiny 64 bit application we developed but this cpu and the os are 32bits so it can't be installed? or I'm wrong?

Commands inside ubuntu to stop os or logout don't work; how can it be stopped?

Thanks in advance; congratulations for this awesome site!
[Galaxy S I9000 Themes and Apps] mellp:
This works great on my EVO! Well worth deleting some music to fit the file on my sd. I really need a bigger card!
[Galaxy S I9000 Themes and Apps] bernabap:
Fire314 or anyone,

I am executing line by line to debug my problem, and I found that after this command:

"busybox mount -o noatime /dev/block/loop255 /data/local/mnt" if go to /data/local/mnt there is a lot of images and some files that seem to be some kernel crash and all next commands failed.

ani_upload_1_kernel_panic.jpg

ani_upload_2_cp_crash.jpg

ani_upload_3_forced_upload.jpg

ani_upload_4_power_reset.jpg

ani_upload_5_user_fault.jpg

charging.jpg

debug_level.inf

dummy.bin

logo_B.jpg

logo.jpg

logo_L.jpg

logo_s1ntt.jpg

logo_T.jpg

movinand_checksum_done

movinand_checksum_pass

nps_fail.jpg

nps_status

param.blk

Anyone know what this files mean? Kernel crash?

My /proc/mounts at last line:

/dev/block/loop255 /data/local/mnt j4fs rw,noatime 0 0

Is this correct?

On my Desire that I could successfully chroot it shows:

/dev/block/loop255 /data/local/mnt ext2 rw,noatime,barrier=1,data=ordered 0 0

I tried to force:

#busybox mount -t ext2 /dev/block/loop255 /data/local/mnt

but:

mount: mounting /dev/block/loop255 on /data/local/mnt failed: Invalid argument

Runing on my SGS I9000B 2.2.1 ZSJPK kernel K13E with recommended tweaks ON

/system/xbin/su OK

/system/xbin/busybox OK

all working fine

Thanks

EDIT: found my problem, I just had to enable extX support on my kernel! Duh
[Galaxy S I9000 Themes and Apps] Jeroemaster:
I got Ubuntu working after several hours ...

But I can only view the files I have on my sd card and external sd card, none of the programs start.

I'm on a Galaxy S I9000
[Galaxy S I9000 Themes and Apps] fxandrei:
It seems that this works but only for a while.

While in vnc i get disconnected.

And when i revert back to the terminal it seems that it resets (the terminal).

Is there a way i could keep the terminal alive, or the process ?
[Galaxy S I9000 Themes and Apps] fxandrei:
so i confirm this working on motorola milestone with cm7 mod (the one release on 18.04.2011).

the only problem is that the only way is to conect ur phone through adb, launch ubuntu from there (sh ubuntu.sh) and use the phone to connect to localhost with vnc.

if u use a terminal on the phone, the moment u press home to start the vnc viewer, the terminal app will be killed in a few secconds.

is there any other way i could do this ?
[Galaxy S I9000 Themes and Apps] alanthemanofchicago:
Ensure no task killers are running. I have had this problem when I use CM7's auto task-kill script and Advanced Task Killer. My advice is to use Better Terminal, it is the only one that has worked flawlessly. Also, I use Pocketcloud for VNC. (American HTC Incredible running Myn's Warm TwoPointTwo RLS 5.3)
[Galaxy S I9000 Themes and Apps] dude0316:
Any one get this to work on Leo 1024 aka tmous hd2 ?
[Galaxy S I9000 Themes and Apps] lajv7:
Will this work with the dark core kernal by the darky team?
[Galaxy S I9000 Themes and Apps] lajv7:
not true, still don't work , tried it now
[Galaxy S I9000 Themes and Apps] etatto83:
I'm using ConnectBot with my Milestone under CM7 18.04.2001 "b", and it's working without issue.
[Galaxy S I9000 Themes and Apps] zedklind:
so i got this working on my g2x but after i "su get-apt update" it slows my phone down super slow and i just got my first phone restart. let me get the logcat... hopefully either i or someone else can understand it. im new to logcat. is there a timestamp somewhere?

EDIT: i looked at the logcat and its all giberish to me.. when i get home i'll do more research on logcats but right now im at work :/. not much time to do research atm
[Galaxy S I9000 Themes and Apps] ilhe1s:
I have Ubuntu up and running on my Incredible running CM7 just fine but I can't get any of the applications to run. I have tried both Android VNC and PocketCloud and apps don't work on either. Any suggestions would be grateful. TIA
[Galaxy S I9000 Themes and Apps] darkreaper476:
Doesnt work.. just shows all the messages in the sh file... doesnt run ubuntu at all..... dont know why, no error output or anything just races through the messages and thats all... please help.

droid 1 cyanogenmod 7 gingerbread. chevyno1 kernel with ext2..
[Galaxy S I9000 Themes and Apps] mercrapper:
There is not X-Server, so you will have to get a vnc client and connect to localhost:5900.
[Galaxy S I9000 Themes and Apps] mxwebman:
I have the same problem on Motorola Xoom :(. Any idea to get it on fullscreen?
[Galaxy S I9000 Themes and Apps] fire314:
The resolution can be set in /root/init.sh (once you have booted into the ubuntu environment).. just change 800x600 to whatever you require.
[Galaxy S I9000 Themes and Apps] darkreaper476:
I understand its not running an X environment.. its not running ubuntu at all is my problem.. it just rips through the scripts fails all of em...

i got it to show me the errors. Ive tried 3 different versions of bussybox.

export PATH=/data/local/bin:$PATH

$ export PATH=/data/local/bin:$PATH

$su

# cd /sdcard/linux

# ls

Ubuntu for Android.txt ubuntu.img ubuntu.sh

# sh ubuntu.sh

WARNING: If you have more than 255 apps installed on the SDCard, then mounting the ubuntu.img will fail!

Apps on the SDCard associate with an encrypted loop device, and there are only 256 available to the system.

You have to go to Settings -> Manage Applications -> On SDCard, and move some apps back to phone storage in order to free up a loop device for ubuntu. Make sure you reboot the phone after doing this, then try again.

Please wait while booting ubuntu.img.. This can take some time...

mkdir: can't create directory '/data/local/mnt': File exists

mkdir: can't create directory '/data/local/mnt/proc': File exists

mkdir: can't create directory '/data/local/mnt/sys': File exists

mkdir: can't create directory '/data/local/mnt/dev': File exists

mkdir: can't create directory '/data/local/mnt/dev/pts': File exists

mkdir: can't create directory '/data/local/mnt/sdcard': File exists

mkdir: can't create directory '/data/local/mnt/external_sd': File exists

mount: mounting /dev/block/loop255 on /data/local/mnt failed: Invalid argument

mount: mounting /sdcard/external_sd on /data/local/mnt/external_sd failed: No such file or directory

chroot: can't execute '/root/init.sh': No such file or directory

Exiting chroot environment and sync'ing memory to storage..

DO NOT EXIT until finished - doing so may corrupt the ubuntu.img!

umount: can't forcibly umount /data/local/mnt/external_sd: Invalid argument

#

thanks
[Galaxy S I9000 Themes and Apps] mercrapper:
Some part of the process must be failing. I bet you are unable to mount the image. I have that problem with my x6, but my herotab c8 runs it perfectly. Run the below commands in the terminal and see what happens.

#################################################################

# mount linux system on our chroot environment and chroot to it #

#################################################################

busybox mount -t proc proc /data/local/mnt/proc > /dev/null 2>&1

busybox mount -t devpts devpts /data/local/mnt/dev/pts > /dev/null 2>&1

busybox mount -t sysfs sysfs /data/local/mnt/sys > /dev/null 2>&1

busybox chroot /data/local/mnt /root/init.sh > /dev/null 2>&1

#################################################################
[Galaxy S I9000 Themes and Apps] darkreaper476:
well i got rid of the 2>&1 parts to see if any errors arise and the only thing that failed was

busybox chroot /data/local/mnt /root/init.sh

"chroot: can't execute '/root/init.sh': No such file or directory"

THANKS! now how the hell do I fix this :D
[Galaxy S I9000 Themes and Apps] mercrapper:
Maybe you have a bad ubuntu.img.

Try redownloading.

Another thought, when you cd to /data/local/mnt, do you see an init.sh file?

Do you see anything in there?
[Galaxy S I9000 Themes and Apps] darkreaper476:
in /data/local/mnt is folders dev external_sd proc sdcard sys.

. will try to re DL... heres the exact sixe of the img file maybe you can match it? 3.8 GB (3,758,096,384 bytes)

thanks
[Galaxy S I9000 Themes and Apps] mercrapper:
Your img file didn't mount. I gave you the wrong lines to try.

First, restart you tablet to get a fresh start, the run the below commands in a terminal on the tablet

busybox mkdir /data/local/mnt

busybox mknod /dev/block/loop255 b 7 255

busybox losetup /dev/block/loop255 ./ubuntu.img

busybox mount -o noatime /dev/block/loop255 /data/local/mnt

If commands 2, 3 or 4 fail, then that your problem. The image file cannot be mounted.
[Galaxy S I9000 Themes and Apps] iivanovic:
I got an error that zip.001 is corrupted.

What can I do???
[Galaxy S I9000 Themes and Apps] yeahman45:
after hours of trying, i finally was able to run ubuntu on my desire.. turned out that my zip was corrupted...

question : is there a way to decrease screen resolution? how?

thx for this guide!!!