yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] houzuoguo:
I got this issue at beginning too..

Later I made a script, and run the script before exiting from ubuntu, and never had "device busy" issue anymore.

script:

tightvncserver -kill :1

tightvncserver -kill :2

tightvncserver -kill :3

reboot

so before xiting from ubuntu, run the script, that should solve the problem...
[Nexus One Android Development] D200P13:
i would really love to know if the mic and speaker is working.
[Nexus One Android Development] houzuoguo:
No they don't... seems Ubuntu can not find the mic and speaker
[Nexus One Android Development] artismyrevolt:
alright, so my question is, once the kinks are worked out, how can we access other files that are on the sdcard? i've never used chroot before, so i don't even know if that's possible. otherwise, we have a perfectly good operating system that you can run for looks, but can't modify files other than in a completely closed ubuntububble.
[Nexus One Android Development] D200P13:
thanks. almost had to risk the trouble to test it out myself. too bad because this would of been a must have for me.
[Nexus One Android Development] devex:
Always the same error. Loop...¿?¿

Hello!

I'm getting the same issue all the time:

# bootubuntu

mknod: /dev/loop2: File exists

losetup: /dev/block/loop2

mount: mounting /dev/block/loop2 on /data/local/ubuntu failed: Device or resource busy

net.ipv4.ip_forward = 1

Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4

Setting localhost on /etc/hosts

READY TO ROCK AND ROLL BABY!

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

chroot: can't execute '/bin/bash': No such file or directory

Shutting down Ubuntu

umount: can't umount /data/local/ubuntu: Invalid argument

losetup: /dev/loop2: Device or resource busy

I've changed some things in bootubuntu file but nothing changes. I'm using the Miui ROM.

Could anyone help me please? Thanks in advance.
[Nexus One Android Development] Grimms:
MIUI, there is your problem :)

Try CyanogenMod 6.0/6.1 RC1 or a nightly, then it should work. Had it working my self under CM6.0

Try CM without your own configurations to the Ubuntu files(New clean Ubuntu install).
[Nexus One Android Development] houzuoguo:
Hi, few weeks ago I made a post..

http://xdaforums.com/showthread.php?t=815532

in the post I talked about the problem that you had, please refer to post #7.

It should be caused by froyo App2SD
[Nexus One Android Development] devex:
Really thanks houzuoguo and Grimms for your answer.

I tried houzougou's files but now i'm getting this error:

* daemon started successfully *

# su

# cd sdcard

# cd ubuntu

# ls

bootubuntu fsrw ubuntu.img unionfs

exitu mountonly ubuntu.sh

# sh ./ubuntu.sh

Type 'bootubuntu' to boot Ubuntu

# bootubuntu

SETTING VARIABLES

SETTING UP LOOP DEVICE

losetup: /dev/block/loop1

MOUNTING

mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy

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

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

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

SETTING UP NETWORK

net.ipv4.ip_forward = 1

bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent

bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent

bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent

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

chroot: can't execute '/bin/bash': No such file or directory

UMOUNTING

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

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

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

umount: can't forcibly umount /data/local/ubuntu: Invalid argument

losetup: /dev/block/loop1: Device or resource busy

#

Whats the problem then?¿?

If finally it doesn't works for me i will do a new clean install how Grimms said.

Thanks in advance.
[Nexus One Android Development] funkatiko:
Having the same problem here with a Desire HD device and the latest cyanogenmod nightly....... please help!

Edit: All the problem was due to the Apps2sd from Froyo. After moving to the internal storage all my apps that were in the Sdcard, the device busy error stopped and got it work!
[Nexus One Android Development] flyingsaucer75:
Hi!

Thank your for hard work!

But can I launch all script from NexusOne terminal without do it from adb shell usb connected? Or I need just one time to do it with PC?

I'm on latest nightly build Cyanogen 6.1.1 build 294.

P.S.

Latest scripts are on first page of this topic?

Thank you in advance for your answer.
[Nexus One Android Development] houzuoguo:
I've worked out a solution that will let Ubuntu work even with Froyo App2SD ;) if you 'd like to know, check my post (the same link as above)

You can run all scripts from android terminal.

The original scripts made by the OP of this thread will work without giving problems, but I found them not very simplified and I made some optimizations to them, check out this thread:

http://xdaforums.com/showthread.php?t=815532
[Nexus One Android Development] chinkostu:
nope, its down to androidVNC (or as far as i know VNC in general)

as i can't get sound if i connect to my pc from my phone.
[Nexus One Android Development] BackfireNL:
This is not running ON your Nexus One!...

Just on your pc...
[Nexus One Android Development] virtualflyer:
I'm using this on HD sense by evil rom, I can't enter input with the keyboard, because it always write something else, maybe a is a, but s is d, if I do send input it writes correctly in the window, but it sends something else to ubuntu, maybe it's a bug of vnc and this sense keyboard, any ideas?
[Nexus One Android Development] dvirus89:
update your busybox

You shuold try update your BusyBox
[Nexus One Android Development] kkq29:
good workbrother ;) like ubuntu very much , would try ;)
[Nexus One Android Development] ijama:
Anyone can upload ubuntu file..i dunn have any pc running linux..would like to try this...

Sent from my Nexus One
[Nexus One Android Development] ijama:
At last able to boot ubuntu on my phone..thanks alot for the tutorial..reall appreciate it..

Run stock gingerbread with custom kernel..partition ext2 1024mb swap 0 fat32 rest of 16gb..using link2sd without any problem on booting to ubuntu..tried once and no problem..still learning..

Sent from my Nexus One
[Nexus One Android Development] VITTman:
htc incredible s user

Is it possible to run it on my htc incredible s? I tried to do it via terminal emulator but there is an error " losetup: /dev/loop1: No such device or address". But if I type "losetup -f" it shows "/dev/loop0". What shall I do?
[Nexus One Android Development] ImbaWind:
how to get internet connection in ubuntu ?

and i can see the keyboard , but when i type , it takes long time to appear those words,why ?

i'm using Galaxy Ace btw, thanks !
[Nexus One Android Development] houzuoguo:
When you enter Ubuntu terminal, the internet connection will already be there and it will be either Wifi or 3G depending on which one your phone is connected to. the ubuntu does not manage its own internet connection configuration.

The responsiveness may be slow at desktop environment's start-up but should be much faster in about a minute.

---------- Post added at 06:58 PM ---------- Previous post was at 06:57 PM ----------

does the kernel support loop devices?
[Nexus One Android Development] ImbaWind:
i realized tat alphabet never show up ,why?
[Nexus One Android Development] rjhay22:
Very nice :-)
[Nexus One Android Development] maxisma:
Downside: No sound because it's VNC.
[Nexus One Android Development] zedomax:
Yes, I believe this is actually possible, since the N1 is "chrooted", you can export sub-system stuff like USB and sound, the VNC is just used for displaying but USB/sound should be possible also.
[Nexus One Android Development] GldRush98:
Wow, cool hack man. Nice work. I see quite a bit of potential here.
[Nexus One Android Development] GldRush98:
Following your guide, fails at step 10:

# bootubuntu
bootubuntu
ioctl LOOP_SET_FD failed: 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
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent

bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent

Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
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.
failed.
failed.
failed.
#

Specifically it seems to first fail here in your shell script:

# mount -o loop,noatime -t ext2 /sdcard/ubuntu/ubuntu.img /data/local/mnt
mount -o loop,noatime -t ext2 /sdcard/ubuntu/ubuntu.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
#
[Nexus One Android Development] prophetjinn:
Yay it works! I'm kinda curious though, i'm having a noob problem. when i try to open any application (terminal, games, FF) it says it's opening but never opens. Is this normal?
[Nexus One Android Development] zarbam:
works great but only trouble im having is the keyboard doesnt seem to be mapped correctly..anyone else have this issue?
[Nexus One Android Development] Lou2serious:
Is ubuntu installed on an ext partition or the Fat32 partition??
[Nexus One Android Development] zedomax:
Well

Well I am having some trouble with my Evo 4G, are you trying this on Nexus One?

And rooted?
[Nexus One Android Development] zedomax:
Try

Try exiting and restarting Ubuntu. Or reboot and try again, should work.
[Nexus One Android Development] zedomax:
SD is Fat32

Well I installed it on my SD card which is Fat32 but it shouldn't matter as it's mounted on ext2 partition when mounting.
[Nexus One Android Development] evilkorn:
Same thing:

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 NexusOneHacks.net

To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
mount: can't setup loop device: No such file or directory
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
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!

chroot: can't execute '/bin/bash': No such file or directory

Shutting down Ubuntu
umount: can't umount /data/local/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
[Nexus One Android Development] brian6685:
Anyone know how much space this takes up on the sd card? If that is where it stores everything? Also, if i want to get rid of it afterwards, can i just delete it all somehow to get it back to normal without it?
[Nexus One Android Development] zedomax:
Yup

The files are about 2GB. It only exists on your SD card so when you want to get rid of it, just delete the ubuntu folder and it's gone.
[Nexus One Android Development] zedomax:
SU?

Did you do "su" before running the script?
[Nexus One Android Development] brian6685:
Awesome, Thanks. Downloading ubuntu.zip now and gonna try it out tonight, or tomorrow if it takes too long to download.
[Nexus One Android Development] prophetjinn:
I just had to reboot.

To get gnome back do I uninstall lxde
[Nexus One Android Development] houzuoguo:
Looks great :)

But I got a little problem.. I carefully followed your instructions and running CM5.0.8 on my nexus one. But got some errors when running "sh ./ubuntu.sh":

-----------------------------

modprobe: module 'ext2' not found

[H[Jmkdir failed for /data/local/mnt, File exists

[H[Junknown option -- /BusyBox v1.16.2androidfull (2010

lti-call binary.

Usage: rm [OPTIONS] FILE...

Remove (unlink) FILEs

Options:

-i Always prompt before removing

-f Never prompt

-R,-r Recurse

chmod: bootubuntu: Operation not permitted

chmod: fsrw: Operation not permitted

chmod: mountonly: Operation not permitted

chmod: ubuntu.img: Operation not permitted

chmod: ubuntu.sh: Operation not permitted

chmod: unionfs: Operation not permitted

[H[J

Ubuntu Chroot Bootloader v0.1

Ubuntu Bootloader is now installed!

This process does NOT damage Android OS!

Original Installer by Charan Singh

Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.ne

To enter the Debian Linux console just type 'bootubuntu'

---------------

And then I typed bootubuntu and got some more errors:

---------------------------

mknod: /dev/loop2: File exists

mount: can't setup loop device: No such file or directory

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

ory

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

Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4

bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent

bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent

Setting localhost on /etc/hosts

bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent

READY TO ROCK AND ROLL BABY!

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

chroot: can't execute '/bin/bash': No such file or directory

Shutting down Ubuntu

umount: can't umount /data/local/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

------------------------

I see on your video that you're using Froyo, I'm currently still using 2.1. Could that be the cause of this problem?

Many thanks :)

Btw, I did su before done all those commands.
[Nexus One Android Development] mcp2009:
I get the same errors as you and I'm on 2.2
[Nexus One Android Development] brian6685:
Works great for me! ;) Good work!
[Nexus One Android Development] evilkorn:
Yes I did su before the commands
[Nexus One Android Development] mcp2009:
I'm having the same prob as you. Just out of curiosity what ROM are you using?
[Nexus One Android Development] Lou2serious:
Ok I just wanted to be sure that my sdcard had to be partioned before I tried this.
[Nexus One Android Development] amadorsg1:
same prob

yup 2.2 rodriguezstile same exact issue
[Nexus One Android Development] JDouce:
is it possible to get a netbook 10.04 remx running like this
[Nexus One Android Development] mathieulh:
It's the chmod that fails in the bash script, I have no idea why though.
[Nexus One Android Development] britoso:
If this module is not built into the kernel youre using try switching to a kernel that includes it.
[Nexus One Android Development] electricdemon:
I've run through this tutorial countless time now and I still cant boot ubuntu on my rooted n1, any ideas?

Regards

Chris.

C:\SDK\TOOLS>adb shell
# su
su
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[Junknown option -- /BusyBox v1.16.2androidfull (2010-03-28 22:34:45 EDT) mu
lti-call binary.

Usage: rm [OPTIONS] FILE...

Remove (unlink) FILEs

Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse

chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!

Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net

To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mknod: /dev/loop2: File exists
mount: can't setup loop device: No such file or directory
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct
ory
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
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent

bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent

Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!

chroot: can't execute '/bin/bash': No such file or directory

Shutting down Ubuntu
umount: can't umount /data/local/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
#
[Nexus One Android Development] JKshowman:
phew, i thought i was thhe only one with this problem.......
[Nexus One Android Development] zedomax:
Oops, I forgot to mention!

Sorry folks for those of you having trouble, I forgot to mention that I got the same errors until I installed the latest version of busybox.

Download the attached busybox.zip, then unzip it to the root folder of your SD card,

then do:

cd /sdcard
su
sh ./installbusybox.sh

reboot then try the ubuntu, should work after that.
[Nexus One Android Development] JKshowman:
going to try that out right now :)
[Nexus One Android Development] RedShanks:
when i try installing busybox there comes an error: "mkdir: can't create directory '/system/xbin': File exists"

does this mean i already have busybox installed?
[Nexus One Android Development] zedomax:
yes

Yes, I believe those errors are fine so long as you dont get other copying errors.

Just do a "cp" after install and make sure version says 1.16.1
[Nexus One Android Development] RedShanks:
thx, it says version 1.16.1..

but when i try installing ubuntu (step 9 in your howto):

http://www.imagebanana.com/view/lz45nqt1/console.png
[Nexus One Android Development] mcp2009:
tried and still got same problem
[Nexus One Android Development] JKshowman:
yeah im still getting the chmod not allowed thing
[Nexus One Android Development] zedomax:
Looking into it.

Well, I m looking into it, looks like I am getting same errors on my Evo, I think it's the same problem, hold on!!!
[Nexus One Android Development] mcp2009:
can anyone who has it working tell us what rom they're using? I tried on Rodriquez and Leofroyo and no luck
[Nexus One Android Development] zedomax:
Try new bootubuntu

Looks like mknod and mount are having some problems but I did another script that could work.

Try downloading this new bootubuntu file and write over the old one in your /sdcard/ubuntu directory.

Then make sure to run:

su
cd /sdcard/ubuntu
sh ./ubuntu.sh

then:

bootubuntu

I think this will fix the problem. Hope so!
[Nexus One Android Development] mcp2009:
thnx gonna try now
[Nexus One Android Development] zedomax:
Just updated

Just updated!
[Nexus One Android Development] mcp2009:
thnx man it worked!! ur awesome
[Nexus One Android Development] zedomax:
Yyyyeeeaahhhh!!!!!!!!!!!

YYYYEEEAAHHHH!!!!!!!!!!!

Thanks for that so I can finally update the howto!!!

WHOOHOO!!!
[Nexus One Android Development] JKshowman:
update: the new ubuntu works :)

DANG IT STEP 13 :((((((((((((((((

(srry for caps)
[Nexus One Android Development] xMemphisx:
Tried this several times on my N1.

I'm running Paul's r21 FRF91 from Modaco. I updated busybox to 1.16.1, and I used the new boot script for bootubuntu that you included. Everytime I run, it says the bootloader installs correctly, but it won't ever boot. The output is the same that most people with errors are seeing

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 NexusOneHacks.net

To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!

chroot: can't execute '/bin/bash': No such file or directory

Shutting down Ubuntu
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/loop1: Device or resource busy
#

:(
[Nexus One Android Development] fiftyclick:
Wicked!!!

The only thing that my palm pre had that I was wondering if we could do in android, is a full linux distro. Knowing that I can install ubuntu on my phone means that the capabilities are endless!

Good luck getting wordpress going, but you might run out of memory with Apache2, php, and mysql all running. Not to mention, all inside a chroot in android.. :S
[Nexus One Android Development] fiftyclick:
I haven't tried this yet (as I am waiting for my N1 to arrive in the mail), but try typing "umount /dev/loop1" before running "bootubuntu".