For those of you who want to install Ubuntu on your Android smartphone or tablet device, here’s our universal guide on how to do it. (This guide is based off my original guide at NexusOneHacks.net)

*Note – This guide should work on most “rooted” Android smartphones/tablets with no further modification.

We will be running Ubuntu “chrooted” under Android OS, which just means that we will be running a “virtual” Ubuntu OS that runs on top of the Android OS.  Your Android OS will work fully (e.g. your phone will keep working normally) while the Ubuntu runs on top of it.

First of all, you should have your Android device “rooted” because you need root access to run Ubuntu off your Android.

Second, your Android OS must support loop devices.  Most newer Android smartphones/tablets come with this support so we can mount our Ubuntu image as a loop device.  If not, you will either have to build your own kernel with support for loop devices or you can try an aftermarket ROM for your phone as most aftermarket ROMs come with support for it.

For example, G2 Phone and Nexus One both come with loop device support so there’s no need for us to compile a new kernel for it but for others, you may have to.

How do you know this?  Just try installing Ubuntu and if it doesn’t boot, your Android device needs a kernel with loop device support.  Otherwise you are fine.

How to Install Ubuntu on Android! (Windows)

First, download the following Ubuntu.zip file (from a preferred mirror), unzip and copy over the whole ubuntu directory to the SD card of your Android smartphone/tablet device:

 

Download ubuntu.zip

(Turn USB storage ON then copy over the Ubuntu folder to the root directory of your SD card.)

(What it looks like after copied over to the SD Card)
1) Again, make sure you have your Android smartphone/tablet “rooted”!

2) You must have Android SDK installed or have access to adb.exe.

3) Make sure your Android phone/tablet is in debugging mode.   Go to Settings->Applications->Development and make sure USB Debugging is checked ON.

4) Connect your Android device to your computer via USB cable and set the USB mode to “Just Charge”.

5) Your Android device should be recognized as “ADB Device” under Device Manager.  If not, install appropriate drivers.

For all HTC Android smartphones/tablets (such as G2 Phone, Nexus One), you can download Windows drivers here:

 

HTC Windows 64-bit driver download – Click Here to Download Driver

HTC Windows 32-bit driver download – Click Here to Download Driver

6) Open up a command prompt by typing “cmd” under Start->Search programs and files.

7) Browse to your SDK directory where you installed the Android SDK:

8) Then go into platform-tools directory:

9) Type “adb devices” to double-check your Android device is recognized.

In this example, I used an HTC G2 Phone, which shows up at “HT09SR204261”.  This is fine.  However, if you get an empty device, that means you didn’t install the drivers for your phone/tablet correctly. (Go back to #5)

10) Type “adb shell” to enter the Android shell.

Then type “su” to enter super user mode, then type “cd /sdcard” and “cd ubuntu” to enter the ubuntu directory in your SD card of your Android device.

11) Next, type “sh ubuntu.sh” to run the script which will basically get your Ubuntu image ready to run on your Android smartphone/tablet.

If you get error messages, don’t worry and keep going.

12) Type “bootubuntu” to enter Ubuntu.  (Next time you enter Ubuntu, you just need to type “bootubuntu” from your /sdcard/ubuntu directory, no need to run ubuntu.sh again.

If you got “root@localhost” at this point, congratulations!  This means your Android OS comes with loop device support and Ubuntu is now running “chrooted” on top of your Android OS!!!

However, if you failed at this point, your Android OS probably doesn’t support loop devices, try installing another ROM or compiling your own kernel with loop device support.

How to Install Programs on your Ubuntu!

Once you’ve got Ubuntu running on your Android device, it’s time to install some Ubuntu packages(or programs).

Type “apt-get update” to update, this is the first thing you will need to do before installing any new programs.

How to Install OpenSSH-server on your Android Ubuntu!

Type “apt-get install openssh-server” to install OpenSSH-server.  What is OpenSSH-server?  If you want to connect to your Android Ubuntu via an IP address (and SSH into it), you will want to do this.

How to Install TightVNCServer on your Android Ubuntu!

If you want to access the GUI of your Android Ubuntu, you can install TightVNCServer, which allows you to access the Android Ubuntu via Android VNC app on your Android smartphone/tablet or even access it remotely from your desktop computer.

Type “apt-get install tightvncserver” to install.

How to Fix Language Issues

Above is after I connected to my Android Ubuntu via SSH2.  Well, for some reason my default language switched to German.  To fix that, just type “export LANG=en_US.UTF-8”:

How to Install LXDE!(optional)

Next, we will install LXDE (Lightweight X11 Desktop Environment).  Although we can use Ubuntu’s default GNOME (and trust me I love that), LXDE takes up less memory so our GUI access will be faster.

If you like GNOME, you can skip this step though.

Type “apt-get install lxde”

Next, let’s setup xstartup file so that when TightVNCServer is started, the LXDE runs instead of GNOME:

Type “cat > /root/.vnc/xstartup”

Then type:

cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession

Then hit Ctrl+D twice and enter to save the file.

How to Start TightVNCServer!

Next, let’s start the TightVNCServer and connect to it from our Android phone and my Windows 7 desktop:

Type “export USER=root” and “vncserver -geometry 1024×800”.

Here, you can change the resolution settings 1024×800 to the resolution of your liking.

Now your TightVNCServer is ready to accept any incoming connections from your phone or computer.  Just point to the correct IP address and use port number 5901 to connect.

On your Android smartphone, just download the free app “Android-VNC-Viewer” and set the IP address to “127.0.0.1” and port number 5901 to connect.

And you should be able to get into your Ubuntu like this:

You can also use desktop software like TightVNC Viewer and connect to your phone.

Do “ifconfig” to find out what your IP address is in your Android Ubuntu.

In this example, mine was connected to “192.168.1.131”.

Then connect to “192.168.1.131:5901” on your TightVNC Viewer:

Here’s LXDE running on my desktop off my G2 Phone’s Ubuntu:

Troubleshooting

Ubuntu not running?

Try typing “cp” under Android shell and if you get an error message, it means you need to install Busybox. Install Busybox and try again.

Getting Following errors?
Err http://ports.ubuntu.com karmic/main Packages
404 Not Found
Err http://ports.ubuntu.com karmic/universe Packages
404 Not Found
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/binary
-armel/Packages.gz 404 Not Found

W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/karmic/universe/bi
nary-armel/Packages.gz 404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used
instead.

Try:
cat > /etc/apt/sources.list
deb http://old-releases.ubuntu.com/ubuntu/ karmic main universe

Then hit Ctrl+D twice and Enter.

This will update the Ubuntu sources.

Final Thoughts

As said in the video, there will be a lot of improvements in the speed of Android devices in the near future.  This year, there will be a slew of dual-core 1Ghz processor-equipped Android devices being introduced.  Which just means our Android Ubuntu will run faster and faster.

Join the Conversation

251 Comments

  1. Hi,
    I just purchased a Panimage Media Tablet powered by Android 1.6 and would like to install Ubuntu on it. Can you point me to the right direction on how to do this please. I would not mind replacing this OS with Ubuntu.

  2. I have tried this on my G2 with the Bacon Bits 2.6.32.21 & Stock 2.6.32.17 Kernels and they both fail with the following message:

    # 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
    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
    failed.
    failed.
    failed.
    failed.
    losetup: /dev/block/loop1: Device or resource busy

    Both kernels are supposed to support loop devices and busybox is installed.

    1. From the command line, run “losetup” alone. You will probably see a bunch of apps that have those loop devices taken.. I’m working on a more elegant way to do this but I just uninstalled the app associated with loop1 (mine was angry birds) and then ran the script again.. and viola! It worked!

    2. I have exactly the same problem

      # 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
      bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
      ent
      bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
      ent
      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
      failed.
      failed.
      failed.
      failed.
      losetup: /dev/block/loop1: Device or resource busy

    3. i have discovered that this migth be related with link2sd, or app2sd (or any app like that) for some reason.
      with no other app installed (besides terminal emulator, and busybox) bootubuntu works just fine, but if i move any app to de sd, i got that error message….

      still trying to find a work around

  3. by changing loop1 to loop7 in the “bootubuntu” code the issue was resolved 🙂 Now how do i fix the keymapping so i can type while vnc’d into ubuntu?

  4. Installed on HTC Desire HD with a custom kernel, works great, the only issue is that the keyboard is way off, how did you fix that?

    1. Try this:

      In VNC’s xstartup file: $HOME/.vnc/xstartup

      You have to add the line export XKL_XMODMAP_DISABLE=1 before
      /etc/X11/Xsession or gnome-session (in case you use GNOME)

      1. I dont understand where to put it…. When I do the cat> /root/.vnc/xstartup it put the code your said above right before I type the lxsession and do ctrl d twice..

        Can you please help me the keyboard still isnt working I type one letter I get another.. For example I type test and it puts in nnpd

        Thanks,

        Zach

      2. Could you help me with the keyboard? Where do I find the xstartup file? I found a xstartup in /data/local/ubuntu/root/.vnc but there’s nothing in it.. As you wrote it, it looks like you have to do this in cmd. How do you do that? please help, its the only thing from making this perfect ! 😀

        1. Just load the vnc server first to create the file:

          “How to Start TightVNCServer!

          Next, let’s start the TightVNCServer and connect to it from our Android phone and my Windows 7 desktop:

          Type “export USER=root” and “vncserver -geometry 1024×800″.

          Here, you can change the resolution settings 1024×800 to the resolution of your liking.”

          Then type “vncserver -kill :1” and it will end it.

          Now your file is there to edit.

  5. i have a motorola milestone.
    and im using The FroyoMOD v2.5.0 .
    it seems i dont have loop device support.
    what can i do ?

  6. i have a motorola milestone.
    i now have the froyomod 2.5 and it seems it does not work when i run bootubuntu (i get all sorts of errors).
    the thing is i understant that ubuntu works on the stock 2.1 version.
    so what can i do to run ubuntu on my phone with 2.2 or 2.3 ?
    from what i understand i cannot recompile the kernel because it need to be signed by motorola, and if not , the bootloader wont load it.
    u probably know more than me , so is there i way i can run ubuntu on my phone ?

  7. just wanna ask i read somewhere that i can lose my camera on the phone. is it fixed or still working on ?

  8. Great guide, is it possible for you to upload just your scripts without the .img file for people who choose to build their own image using your other guide? I’ve stumbled my way into getting in mounted and chrooting into it, but I keep catching snags along the way. Would be much appreciated, thanks.

  9. On Nexus S i got it to work by modifying bootubuntu. You have to remove /block/ from the /dev lines and change the loop device to something like 99 rather then 1 or 2:

    #modprobe ext2
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
    export kit=/sdcard/ubuntu
    export bin=/system/bin
    if [ ! -d /data/local/ubuntu ]
    then
    mkdir /data/local/ubuntu
    fi
    export mnt=/data/local/ubuntu
    export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
    export TERM=linux
    export HOME=/root
    mknod /dev/loop99 b 7 99
    losetup /dev/loop99 /sdcard/ubuntu/ubuntu.img
    mount -t ext2 /dev/loop99 /data/local/ubuntu
    #mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
    mount -t devpts devpts $mnt/dev/pts
    mount -t proc proc $mnt/proc
    mount -t sysfs sysfs $mnt/sys
    sysctl -w net.ipv4.ip_forward=1
    echo “Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4”
    echo “nameserver 8.8.8.8” > $mnt/etc/resolv.conf
    echo “nameserver 8.8.4.4” >> $mnt/etc/resolv.conf
    echo “Setting localhost on /etc/hosts ”
    echo “127.0.0.1 localhost” > $mnt/etc/hosts
    echo “READY TO ROCK AND ROLL BABY! ”
    echo “Brought to you by NexusOneHacks.net and the open source community! ”
    echo ” ”
    chroot $mnt /bin/bash

    #After exit command is executed clear it all up
    echo ” ”

    echo “Shutting down Ubuntu”
    umount $mnt/dev/pts
    umount $mnt/proc
    umount $mnt/sys
    umount $mnt
    losetup -d /dev/loop99

    1. Can you let me know what’s the ROM you are using when you make it work on your nexus s, both the original article and your modification fail to work for me.

      when I execute “bootubuntu”

      it throws errors like below:

      mount: mounting /dev/loop1 on /data/local/ubuntu failed: Invalid argument

      or as per your modification, it says:

      mount: mounting /dev/loop99 on /data/local/ubuntu failed: Invalid argument

      I’m running on ROM CM7, just curious whether it’s the ROM cause the problem.

    2. Hello,
      I am an android NewB.
      I have some doubts about installing android as a Virtual Enviormnt in an android phone(Nexus S). I was wondering if you could help me with that. I was wondering if I am trying to install android as the second image, how would I go about changing the above commands. I am assuming the mount command and everything would be different.
      NH

    3. Hello,
      I am an android NewB.
      I have some doubts about installing android as a Virtual Enviormnt in an android phone(Nexus S). I was wondering if you could help me with that. I was wondering if I am trying to install android as the second image, how would I go about changing the above commands. I am assuming the mount command and everything would be different.
      NH

  10. hi,
    i am trying to install ubunto on Coretex A8 chineese tablet with freescale processor.

    Android 2.2 Tablet PC Froyo Cortex Freescale IMX515 A8 800MHz 4GB

    I have failed on the step where you write bootubuntu. It writes , that bootubuntu not found.
    Can you say exacty how to make a kernel with loop support?

    Also is there a way totally to replace Andorid with ubuntu?

    1. I think I’ve got exactly the same tablet you have.
      I also had troubles when installing ubuntu or debian on my tablet, but after trying several installers and reading various HOW TOs, I succeded to install debian as chroot (it’s the same way ubuntu would run if using the installer of this page). As Ubuntu is Debian-based, the instructions are very simmilar. In brief, what I did is to use a application called debootstrap on a pc running linux to create an installer on a ext4 external sdcard which I later plugged to my tablet to complete the installation. After that, I installed other programs (just as it is done n this page) including openssh, lxde and tightvncserver.

      I based the most important part of my procedure on Saurik’s guide: http://www.saurik.com/id/10, but with some differences: first, instead of using an image file, I used an external sdacard; second, I didn’t have to use those files unionfs.ko and ext2.ko, beacuse my kernel already recognized ext4, which is better; finally, I first installed busybox separately, with an apk downloaded from Android Market called Busybox installer. If my tablet is same model as yours, you should be able to do the same.

      In order to use debootstrap and give the necessary format to the sdcard, a computer already running linux is needed, so I burned an ubuntu live cd to boot my windows pc with ubuntu temporarily. Use GParted (it comes with the standard applications in an ubuntu livecd) to create one partition with ext4 filesystem in the sdcard. It should be at least 1Gb if you plan to install a GUI (mine is 5 Gb, to install other applications). It is also possible to create other partitions; in my case I created a Fat32 partition to store data accesible to android also.
      Next, to install debootstrap be sure to have an internet connection in ubuntu and type in a terminal:

      sudo apt-get install debootstrap

      Now to create the “installer” on the external sd, plug it to your pc, navigate inside it and type

      mkdir debian
      debootstrap –verbose –arch armel –foreign lenny debian http://ftp.de.debian.org/debian

      Packages are downloaded and extracted to the newly created debian folder of the sdcard. Notice that I used ubuntu to create the installer for debian. If you want ubuntu, you should instead write

      debootstrap –verbose –arch armel lucid

      but I’d recommend to install debian, since both distributions are very simmilar. In fact the major difference between them is that ubuntu uses GNOME DE and Debian none by default, but you can install LXDE and it’s gonna run even better in the tablet considering that it is much less hardware exigent tham GNOME.

      After that, plug the sdcard to the tablet (it MUST be rooted) and in a terminal type:

      su
      mkdir /sdcard/debian
      cd /sdcard/debian
      busybox mount -o noatime /dev/block/mmcblkp0 /sdcard/debian
      busybox chroot /sdcard/debian/debian
      export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
      export TERM=linux
      export HOME=/
      export USER=root
      sh /debootstrap/debootstrap –second-stage

      The installation takes place… Most of the instalers in the web didn’t work for me because of the export lines. Be careful, if these lines are not properly written, debootstarp might end up with a “Installation finished succesfully” message and a lot of crucial features not really installed. Then type

      /bin/bash

      If you get this promp, everything fine, you have debian (or ubuntu) installed:

      root@localhost: /

      This was the main instalation. Next, I wanted a script to automatize the log in in the future. I created a text file named debian with the following contents:

      busybox mount -o noatime /dev/block/mmcblkp0 /sdcard/debian
      busybox chroot /sdcard/debian/debian
      export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
      export TERM=linux
      export HOME=/
      export USER=root
      /bin/bash

      and placed it in an accesible folder. Next time, to login debian (or ubuntu), in the terminal emulator navigate to the folder containing this script and type

      sh debian

      and that’s it, you should get

      root@localhost:/

      From now, all the rest is installing other useful programs (openssh, lxde, tightvnc, whatever you might want), as described above in this page.

      Good luck.

  11. Finally got this working on my myTouch 4G, but for some reason I can’t seem to use “exit”. It just hangs, leaving the cursor right at the end of exit, never giving me a new line..

    example:

    # exit▌

    Rebooting ultimately does the trick, but I’d rather not reboot every time I want to close ubuntu. :/

  12. Hi Thank you very much for this excellent article on installing Ubuntu on Android tablet, Would you be able to do another article with the video on how to install Ubuntu from inside Ubuntu desktop to Android tablet.
    Thank you.
    I will be posting the article on my blog as well with your permission.

    Regards

    Richard

  13. hey thanks! it works on my samsung tab but one quick question…. how do i get it saved to where if i turn my tab off when i turn it back on all i have to do is connect because right now i will restart my tab then go to vnc viewer when i click on it its says ” VNC connection failed” but before i restarted the tab it worked great.

    Thanks,

    Zach

  14. hello… great work.. im working on this proccess now… im trying to understand in what way the ubuntu is being changed… i would like to apply this to putting a diffrent dist. of linux… opensuse to be exact… im doing this for my Droid 2 global ……. and i would like to run bot open suse and Bactack 4 … if you could help me understand the whole “ARM” of an image proccess that would be most helpful. i am aware of the link on this site but even though i see the command you ran i would like to understand the process better …
    thanks a ton … keep up the good work

  15. I also get device or resource busy. I tried changing loop1, loop7, loop9. all the same outcome. losetup shows that imgs are mounted. t-mobile g2 stock rom, but rooted. HELP! 🙁

  16. hey everyone when i input text it turns it into numbers and symbols… i tried the code below but didnt work 🙁 can someone help me?

    export XKL_XMODMAP_DISABLE=1 before /etc/X11/Xsession

    this is what i put —->

    cat > /root/.vnc/xstartup
    #!/bin/sh
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    icewm &
    export XKL_XMODMAP_DISABLE=1 before /etc/X11/Xsession
    lxsession

    thanks,

    Zach

  17. hello again — so i started everything folowing along with the doc and vid provided and i got to the bootubuntu …. and came back with this \\
    To enter the Ubuntu Linux console just type ‘bootubuntu’
    # bootubuntu
    bootubuntu
    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
    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 nonexist
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
    ent
    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
    failed.
    failed.
    failed.
    failed.
    #

    now above i noted some one had the same screen except it came back with this too..
    losetup: /dev/block/loop1: Device or resource busy

    … so im thinking that the fix applied will not help my situation ….. is this saying that my kernal isnt supporting the loop?

    if that is the case Im working with a Droid 2 global — which kernal should i flash it with and .. im a lil nervouse about doing that so if you could either explain or point me to some well writen doc/vid that would be great.

    thanks

  18. I was able to get this to run on my G2x but no internet related application will open. I am able to open anything that doesn’t have to connect to the internet such as OpenOffice, Folders, ETC. Has anybody ran into this and has fixed it? Help?

  19. Following your video succeded to install Ubuntu on Samsung i5500 Galaxy running Android 2.2.Thanks!
    Needed 1 day to figure out that Android does not have all Linux commands needed to run installation.
    Need to download busybox from android market and install in folder system/xbin.
    Then run from PC Android SDK
    adb shell
    to make folder writable
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

    /system/xbin/busybox –install -s /system/xbin
    this should create many files with linux commands under
    cd system/xbin

    Another way to set up Debian or Ubuntu on Samsung I5500 is to use Linux Installer app from Android market.

  20. well I had some trouble and I retried but now I get this. Can someone point a beginner in the right direction?

    To enter the Ubuntu Linux console just type ‘bootubuntu’
    # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    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!

    [1] Illegal instruction chroot ${mnt} /b…

    Shutting down Ubuntu
    losetup: /dev/loop1: Device or resource busy
    #

  21. Hello,
    Thanks a lot for a wonderful article.
    It worked fine on my Android Tablet PC.
    But it is not detecting the usb devices attached to the device. It shows nothing after “lsusb” . Can anyone provide solution to my problem.

  22. please help jaymz so I can get help too. I’m having the same exact issue, but with a t-mobile g2.

  23. I tried this guide. Works perfectly on my Samsung Galaxy S 2. Only problem i have is that vnc and openssh settings are not saved. It works perfectly during the first install. But if i turn the phone off, all the settings are lost and can not connect using androidvnc. How do i save the settings.

    Any help would be appreciated.

  24. Hey admin its very important question can the ubuntu run on samsung galaxy 3 with android 2.2. Please answer its urgent. Im already but only thing I want to know is will it function properly on my galaxy 3 with only 667Mhz of processor and 256mb of RAM? Please answer im eagerly waiting. Thanks in advance.

  25. Hi.
    If I do “bootubuntu” i’m getting this:
    # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    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!

    [1] Illegal instruction chroot ${mnt} /b…

    Shutting down Ubuntu
    # _

    What can i do??

  26. Its possible install ubuntu using terminal emulator.
    if Its yes plz describe

    Not able to download ubntu.zip
    Plz provide another link

  27. Hello.
    Q: Is there any way to run ubuntu without running android?
    Like in a computer, ill try to install it on a Motorola Xoom (w).

  28. hi when i boot i get a message saying “vncserver: geometry 1024800 is invalid” and on the screen when i go log on it has an X for a mouse with a grey back round. do you know any fix for this?

  29. First of all, great work! Do you think it is possible to use the latest ubuntu release 11.04, which has some new Touch-Screen features?

    And has anyone tried to use ubuntu on the Asus EeePad Transformer?

  30. hello I have a ziio 10 is it possible.to run ubuntu on it btw I wanna have libreoffice to do basic document processing.

    thanks
    rick

  31. Hi. I have a Motorola Atrix and Im thinking of putting Ubuntu on the external sd card. Will ubuntu files (with the apt-get files) actually get installed in the system or on the external sd card? I currently run ubuntu 11.04 off a sd card and hope to do the same for the Atrix whereby I dont have to modify anything.

  32. I did all of the steps, correctly as I believe.
    When I login at android vnc, I just get a gray screen with a black x as pointer, here’s a screenshot:
    http://img19.imageshack.us/img19/7357/20110619234745.png

    I really don’t know if I did something wrong, I followed your video and all commands I sent gave the same results as on your video, I hope you know what the problem is, I might redo it tomorrow, it’s already late here so.
    Thanks for the tutorial anyway, I hope much people will use it, ubuntu on a smartphone is just awesome :]
    My phone is LG Optimus 2x Speed by the way with Blazingdragon 1.8b ROM and 606 baseband.

    Greetz, Jimmy :]

      1. I changed the permissions on the xstartup file in /root/.vnc/ and it worked. I basically gave it executable permission (actually, all permissions) “chmod 777 xstartup”

    1. For those whose vnc can’t start the x server (stays with a grey screen with a X as a mouse pointer), change the permission to the xstartup file ( chmod 777 /root/.vnc/xstartup )

  33. Just did it again, couldn’t get my mind of it actually, before hand I flashed a new baseband, 502, not that it really matters for this I guess but yeah, also reinstalled my ROM, still the same, Blazingdragon 1.8b, all clean and fresh, deleted Ubuntu folder off my sdcard, put the downloaded one on it again, repeated this process but this time I didn’t install LXDE to see if it would make the difference, but it did not. I still just get a grey screen with black crosshair whereever I touch my screen, guessing my pointer. Hope you can help ASAP cause I really want to get this working on my O2X :]
    Thanks in advance, Jimmy

    1. Jummy,
      Did u resolve this? I am having the same issue on my Nexus one. Please let me know if u were able to solve this,
      Really appreciate any help.
      Thanks,
      Madhavan

  34. I had some issue, any fix for this?

    >> # sh ubuntu.sh

    sh ubuntu.sh
    modprobe: chdir(/system/modules): No such file or directory
    ←[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'

    >> # bootubuntu

    bootubuntu
    mknod: /dev/loop99: File exists
    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!

    [1] Illegal instruction chroot ${mnt} /b...

    Shutting down Ubuntu

    >> #

      1. Same error on ARM9 Rockchip based tablet.

        Nobody knows the cause of the problem?

        I’ve googled several hours without success.

    1. O.O loop99 …. u tried several times already….
      got the same issue in my Huawei UM840, not to likely to think that my device doesn’t support loop, Linux installer with lxde inside a loop (and into a microsd card!) runs very well

  35. I had to make quite a few changes to this to get it to work on my Samsung Galaxy SII but these instructions were very useful.

    Firstly, when I used adb to log into my phone, I was logged in as user “shell” but couldn’t su (I got a “permission denied” error) so I installed a ssh server from the marketplace, which solved that problem.

    The other issue I faced was the bootubuntu script. I had to change several things about this. Firstly it wouldn’t run so I had to “sh bootubuntu”. The syntax of the “if [ ! -d /data/local/ubuntu ]” line caused problems for my phone so I changed this to “if ! test -d /data/local/ubuntu”, which worked fine. Finally I have loop[0-7] devices already on my phone so I commented out the “mknod loop1…” line and changed all the other references from loop1 to loop7. With these changes, it now seems to work fine.

    Now I need to change the default language from German (fortunately my German isn’t too bad so I can at least understand what I’m reading).

    Finally, I notice that this is Karmic, which is pretty old now so I shall be having a look to see how to create a Natty Narwhal image.

    Thanks for the instructions. I appreciate that it is next to impossible to write a script that works perfectly on every phone but there was enough here to enable me to get this working well.

  36. Hi guys, any help please. im try to install in ZTE V9 and thats happens.

    # bootubuntu
    bootubuntu
    bootubuntu: not found
    # sh bootubuntu
    sh bootubuntu
    mknod: not found
    losetup: not found
    mount: Invalid argument
    mount: No such file or directory
    mount: No such file or directory
    mount: No such file or directory
    sysctl: not found
    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 nonexist
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
    ent
    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: not found

    Shutting down Ubuntu
    failed.
    failed.
    failed.
    failed.
    losetup: not found

    Any ideas?? I need so much ubuntu in ZTE!!!

  37. Edit /etc/enviroment 2nd line to “LANG=en_US.UTF-8” that fixes your ssh language switching.

    Nice stuff btw..

  38. The file ubuntu.zip download seem to be unavailable. Can you add some mirrors for it?
    Thanx

  39. Hi there,

    when i try to do this section (cat > /root/.vnc/xstartup etc) i get the following error

    “cat > /root/.vnc/xstartup
    bash: /root/.vnc/xstartup: Not a directory”

    and i am also unable to start tightvncserver

    i get this error
    “vncserver
    vncserver: Wrong type or access mode of /root/.vnc.”

    1. i also get the “no Such file or directory” error when I type ‘cat > /root/.vnc/xstartup’…

    2. I got it to work by doing the step after first. type the “export USER=root” then the geometry. then type the lines “cat >………….”

  40. Running X as root is never a good idea. I suggest creating a user account and put the lxsession script in it’s home directory and run it from there.

  41. Great job
    I like to do it on my SuperPad 3. But one question, if i have to do it throw Android SDK? can i use terminal on my tablet to run setup script and bootubuntu?
    Thanks

  42. Tried on LG P990(Optimus Speed 2X) on original Firmware.
    Seems theres no support for loop devices in it.
    How can i add this now whitout having to flash an other rom?
    I need to keeo the original one, so i guess i have to change it.
    But how?
    Thanks for any help 😉

  43. i do it from terminal.
    Sript run is OK, i get the same screen as step 11)
    But after bootubuntu i get message:
    bootubuntu: not found
    but this file (i check) exist in \ubuntu directory
    what is wrong?

    1. it sounds like he typed it in correctly if he got that error and just retyped it wrong. i got the same problem, as well as a lot of others including those with chroot and loop problems. the ‘busybox installer’ didn’t work for me that was available on the market, but the link to this guy’s busybox worked with it’s script installer. Using his busybox on my LG Vortex, it fixed the permission problem, chroot problem, ext2 problem I had with other versions, and loop problems that occured.

    2. You have to s-off your mobile I used to have the same problem (go on Google and type how to s-off your phone name ) let me know how you get along and I will try help

  44. Hello, Just how well does ubuntu run on smart phones? I’m interested in running audio programs such as puredata and perhaps doing video capture. Besides root access and support for loop devices, are there minimum hardware requirements/recommendations to run it? Is it fairly straightforward to access the hardware of the phone – audio, camera, wireless etc. ? Cheers and thanks for the information.

  45. If we want to access the Android sdcard, it is possible to insert the following code in “bootubuntu”:

    (after mounting /data/local/ubuntu)

    if [ ! -d /data/local/ubuntu/mnt/android ]
    then
    mkdir /data/local/ubuntu/mnt/android
    fi
    mount -o bind /mnt/sdcard /data/local/ubuntu/mnt/android

    After this, it is possible to access the Android sd card in:

    /mnt/android

    1. Hello,
      I was wondering if you got the android working on android phone? I am also trying to do somehtign similar. What changes did you make. I am assuming that mount commands in the bootandroid has to be changed accordingly.
      Neelima

  46. Ended up having to SSH in and update my busybox to get it to work but it was relatively painless and smooth. Thanks for the guide!

  47. A not so technical questions from an Ubuntu user that has yet to try Android…..

    How does the device function with Ubuntu installed? By that I mean does all the touch screen and other phone/tablet functionality keep working?

    If so, is it accessible at the same time Ubuntu is? or is this more like a dual-boot situation? I know you mentioned Ubuntu runs on top of Android….but thought I’d check.

    Does any touch-screen stuff work in Ubuntu?

    Basically I’m trying to determine if now or some point in the nearish future I’d be able to toss my development laptop and use an Android tablet running Ubuntu (being that we’re seeing dual-core processors in these devices).

    For example I’d be running VirtualBox in Ubuntu with all my development tools in it.

    Do you think we’re getting close to being able to pull that sort of thing off? or is the processor power still lacking?

    Thanks for your thoughts and advice….great post!

    Cheers

  48. works on my little LG Vortex, and to the guy who asked in comment, I think you can do most if not all of it in the terminal. I had to do massive updates on the java sdk since it was a fresh install and while it was doing that I did most of the access on the phone itself. it’s just annoying as hell typing commands with crazy symbols on a phone. I actually came back to the thread to see if anyone tried attaching devices, like a keyboard, to the phones and if that’d work. Didn’t want to ruin a couple cables for nothing

  49. Didn’t see any mention of this but will sites like Grooveshark.com or Hulu.com know you’re using a mobile version this way? Other than using some apps aren’t ported to Android using sites that restrict mobile use would be my only other reason for installing Ubuntu on my phone.

  50. hi i got all the way though it and all but when i start up the vnc i just get these weird strobing thing and its just a mess what did i do wrong

  51. When i run apt-get update it says can’t resolve ‘ports.ubuntu.com’ plus when i try to connect to androidvnc it says connection refused.
    I have internet because i’m connected through wi-fi to my router and i tried this connected to other router as well with the same results. Anyone knows how to fix this? Galaxy S xxjvp 2.3.4 speedmod T5 kernel.

  52. I cannot connect the android vnc viewer to 127.0.0.1:5901..
    I did everything according to procedure given in your post. It started for the first time as if it was in the failsafe graphics mode(with an error and x cursor) and then started giving an error saying “Connection refused/failed”

    Please help..

  53. The error that showed for the first time was “There is a problem with the configuration server(/usr/lib/libconf2-4/gconf-sanity-check-2 exited with status 256)”

  54. Hi there just 2 quick questions is there a faster mirror the download on the page fails halfway through for me or times out.

    Also is there a way to resize the system so theres abit more room to play with ?

  55. Alright, this rocks. I had to download from another source (look for ubuntu on nexus 1).

    Acer A500 works flawlessly. Can install using terminal app on tablet. USB keyboard and mouse both work great once you switch the VNC client into mousepointer control mode though some keybindings don’t get forwarded correctly.

    Installed Zenmap and Etherape, both work flawlessly. Sadly Aircrack-ng does not work as it doesn’t detect the network card correctly (or monitor mode is not supported).

    Two things I’m wondering though:
    1) How would you extend the FS so it’s > 2gb
    2) Is it possible to install Unity onto it as gnome is difficult to work with.

  56. Thanks alot… I tried installing this on Notionink Adam and this is working great.
    Is there anyway we can increase free size on the loop drive?

    I tried increasing the size of ubuntu.img file by using
    “dd if=/dev/zero bs=1024k count=1024 >> ubuntu.img”

    however the free space on ubuntu is still less. Any help on this will be very much appreciated. Thanks so much for this code and tutorial.

  57. Is it possible to compile a driver for usb fingerprint scanner inside the Ubuntu-on-android?
    I tried to do make, but it gave error, missing headers.
    It seems the kernel version shown in uname -r is the android devices kernel.
    How to know which ubuntu kernel its running?
    Then i can reinstall that kernel headers and try again.

  58. # bootubuntu
    mknod: /dev/loop1: File exists
    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!

    [1] Segmentation fault chroot ${mnt} /b…

    Shutting down Ubuntu

  59. cd ubuntu
    # ls
    ls
    bootubuntu
    fsrw
    mountonly
    ubuntu.img
    ubuntu.sh
    unionfs
    # sh ubuntu.sh
    sh ubuntu.sh
    modprobe: not found
    clear: not found
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    mkdir failed for /data/local/mnt, File exists
    clear: not found
    rm failed for /system/bin/fsrw, No such file or directory
    rm failed for /system/bin/bootubuntu, No such file or directory
    rm failed for /system/bin/unionfs, No such file or directory
    rm failed for /system/bin/mountonly, No such file or directory
    cp: not found
    cp: not found
    cp: not found
    cp: not found
    Unable to chmod bootubuntu: Operation not permitted
    clear: not found

    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 Nex
    eHacks.net

    To enter the Ubuntu Linux console just type ‘bootubuntu’
    # bootubuntu
    bootubuntu
    bootubuntu: not found
    #

    help

  60. Hi admin 😛 I had problems first with bootubuntu, but now it works! But when I type apt-get update, I get: “Some-indexvfiles failed to download, they have been ignored instead.” It acctually looks like no files downloads. apt-get install lxde fails too. other ways to get them??
    VERY VERY easy written and good video for noobs like me 😉

  61. LooooL. REMEMBER TO ENABLE WIFI ON PHONE WHEN DOING THIS or you get the error messages as i did

  62. Hi

    I’m attempting to follow this guide but I am having trouble making LXDE run instead of GNOME.
    When trying to run the command “cat > /root/.vnc/xstartup” I get the a responce saying that there is no such directory or file
    I tried “cp” while in the ADB shell and was told i have 1.19 but when i try it as root@localhost i am told that i don’t have busybox installed except I do; my rom (DarkyROM 10.2 EE came with 1.19.

    I then tried installing it manually from the market and found i supposedly had v1.19 installed at /system/xbin/ (the app allows you to install v1.1814, v1.17.1 or v1.19 in either /system/xbin or /system/bin) i have now tried all of those combinations.

    I also tried your ‘how to install Busybox on your android” guide but as there is already a /system/xbin directory, the script failed (I also learnt that you should never delete the xbin folder…)

    If you could shed any light on this problem id be very appreciative.

    Thebandroid

    1. I thought i may have fixed it by running ‘apt-get install busybox’ under root@localuser then doing the rest of the steps but now when i connect via android vnc i get a sort of gray screen with a cursor that follows my clicks but nothing to interact with (no icons, menus, anything)

  63. i have a nexus one rooted with cyanogenmod, does that take away the loop device support? because i keep getting errors in the end of the setup, after i put bootubuntu, a bunch stuff pops up, i wanna know why it doesnt work, cuz of no loop device support? or wat?

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Program Files (x86)\Android\android-sdk>cd platform
    The system cannot find the path specified.

    C:\Program Files (x86)\Android\android-sdk>cd platform-tools

    C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
    adb server is out of date. killing…
    * daemon started successfully *
    List of devices attached
    HT9CTP801381 device

    C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
    # su
    su
    # cd \sdcard
    cd \sdcard
    # cd ubuntu
    cd ubuntu
    # sh ubuntu.sh
    sh ubuntu.sh
    modprobe: module ‘ext2’ not found
    ←[H←[Jmkdir: can’t create directory ‘/data/local/mnt’: File exists
    ←[H←[Jchmod: bootubuntu: Operation not permitted
    chmod: fsrw: Operation not permitted
    chmod: mountonly: Operation not permitted
    chmod: ubuntu.img: Operation not permitted
    chmod: ubuntu.sh: Operation not permitted
    chmod: unionfs: Operation not permitted
    ←[H←[J
    Ubuntu Chroot Bootloader v0.1
    Ubuntu Bootloader is now installed!
    This process does NOT damage Android OS!

    Original Installer by Charan Singh
    Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
    eHacks.net

    To enter the Ubuntu Linux console just type ‘bootubuntu’
    # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    losetup: /dev/block/loop1
    mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
    e busy
    mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
    ectory
    mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
    y
    mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
    y
    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 nonexist
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
    ent
    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
    #

  64. HI!!!!!
    I installed busybox already, and I did perfect cource.
    but I have an error.
    cat > /root/.vnc/xstartup
    bash: /root/.vnc/xstartup: No such file or directory
    how can I fix it?

  65. Hi there,

    I got it working on my Tablet Olipad 100 :). However, after I restarted the tablet, the androidVNC can’t connect anymore, it gives me the message “VNC connection failed!” “localhost/127.0.0.1:5901 – Connection refused”. Any ideas?

    Thanks,
    Talita

  66. Ok… I found the problem, I had to delete the /tmp/X*-lock files. However when I connect with vnc I only get a gray screen with a “x” in the center of the screen. Ideas?? Thanks

  67. hello, seems to be a problem with the ubuntu.zip link, im downloading at 3kB/s. other than that it looks great, can’t wait to try it out.

  68. Why is the download so freaking slow could we get a torrent? if not is it the same download from the Ubuntu website or is it modified ?i have 25mb down and 3mb up shouldn’t take me longer than 5 minutes to download the ubuntu.zip

    1. Thanks for your comment….
      I was dying on that download… It said it was gonna take 14 hours to download, yet I have 30mb download… omg slow.

      Thankfully because of you, I found the link on nexusonehacks

  69. I actually got this working on my HTC Thunderbolt. Twisedumbrella over at droidforums has some good information. Google it and you will find the files needed to install on your thunderbolt. With the HTC came with a 32 GB card but it had some problems so I formatted the card and then made a fat 32 partition and a ext2 partition and ran with zedomax’s instruction. I am a total N00B with linux but was able to get her going. I did have some loop errors but that was because I didn’t have an ext2 partition on the sd card. Partition Wizard worked great. Just wanted to post my 2 cents as I did have a little trouble getting it going but finally have it running.

    Thanks zedomax and twistedumbrella!!

  70. ok..i got it to load properly. except when i try to make a folder on the desktop it says i cant, that its read only. is this only for read only? also after i reboot my evo it will not allow me to connect via vnc until i delete folder and do it all again. any help is appreciated. thank you.

  71. I got a nexus s and i get always this

    # su
    su
    # cd /sdcard
    cd /sdcard
    # cd ubuntu
    cd ubuntu
    # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    losetup: /dev/block/loop1
    mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or reso
    e busy
    mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or
    ectory
    mount: mounting proc on /data/local/ubuntu/proc failed: No such file or direc
    y
    mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or direc
    y
    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 nonex
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonex
    ent
    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/block/loop1: Device or resource busy
    #

  72. Meant this

    # su
    su
    # cd /sdcard
    cd /sdcard
    # cd ubuntu
    cd ubuntu
    # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    losetup: /dev/block/loop1
    mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or reso
    e busy
    mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or
    ectory
    mount: mounting proc on /data/local/ubuntu/proc failed: No such file or direc
    y
    mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or direc
    y
    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 nonex
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonex
    ent
    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/block/loop1: Device or resource busy
    #

  73. # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    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!

    [1] Illegal instruction chroot ${mnt} /b…

    Shutting down Ubuntu

    HELP PLEASE

  74. I followed the steps on my rooted sgs2, but get this error when connected on vnc:

    (/usr/lib/libgconf2-4/gconf-sanity-check-2 exited with ststus 256)

    the screen is just blank grey?

  75. Can we somehow get some kind of bluetooth support? Are there drivers available? I am using a samsung galaxy gio and for some reason ubuntu doesn’t detect my phones bluetooth. Suggestions?

  76. Hi, I ahve a nexus s 4g running the Peter Alfonso Rom and I have everything required but I am having the same problem that Trent had. How do you change the “bootubuntu” code? Do you change it in command prompt?

  77. What do you strip down from Ubuntu? I see you have a 2GB img, can you show us what you remove through the terminal code?

    Just trying to make a 11.10 version image…

  78. Hi, I am wondering, after I successfully booted ubuntu on android(after the “sh bootubuntu” command), I got the “localhost#” prompt, I get the ubuntu booted and I can see the regular ubuntu directories. But I can not connect to the networks. I run “ifconfig “, with l0 normally set up and wlan0 is always “UP BROADCASTING MULTICASTING”. So I guess it is waiting for dhcp reply. Then I manually set up an IP for it, it also didnt work. Is there any idea that I can resolve this problem?

  79. Hi, I am wondering, after I successfully booted ubuntu on android(after the “sh bootubuntu” command), I got the “localhost#” prompt, I get the ubuntu booted and I can see the regular ubuntu directories. But I can not connect to the networks. I run “ifconfig “, with l0 normally set up and wlan0 is always “UP BROADCASTING MULTICASTING”. So I guess it is waiting for dhcp reply. Then I manually set up an IP for it, it also didnt work. Is there any idea that I can resolve this problem?

    BTW: I can access internet from my android web brower!

  80. Sir plz plz help me…m having motorola backflip MB300 running cyanogenMode 7.1.0 with ARM6 processor
    when i type the command bootubuntu it shows the following error-

    bootubuntu :not found

    plz help me otherwise m gonna die…:'(

  81. Sir plz plz help me…m having motorola backflip MB300 running cyanogenMode 7.1.0 with ARM6 processor
    when i type the command bootubuntu it shows the following error-

    bootubuntu :not found

  82. Sir ..the command runs..but with many error messages like

    blabla cannot create
    blabla cannot umount

    and last1 is: Device or resource busy

    my friend is running this ubuntu having the same OS and CPU…plz plz help

  83. Hi Admin,

    please give me a little help. I tried it several times and i got every time the same failure message:

    chroot: can´t execute ´/bin/bash´: Input/outout error
    Shutting down Ubuntu
    failed.
    /mnt/sdcard/ubuntu #

    What can i do?

    THX!!!

  84. Anyone know why it keeps disconnecting or failing? its really annoying. It will load but it will disconnect and i get this ports 1 and 2 are locked jargon and i have to use port 3. Any help would be appreciated

  85. Can we use the latest ubuntu 11.10 instead of the ubuntu zip file mentioned in your installation process?

  86. The download server you’ve uploaded the ubuntu.zip file to, is extremely slow, Even If I’m using a french dedicated server which averages at 20mb/s it only downloads it at 5kb/s, I beg you, please reupload! I left it over night and it failed and only download 500mb of it, This is extremely frustrating.

  87. Works on Samsung Galaxy S Plus GT I9001 with Android 2.3.5 !!!

    ** “by changing loop1 to loop7 in the “bootubuntu” code the issue was resolved” **

    do this BEFORE you run “sh ubunut.sh”

    SKIP the lxde part, creates only blank screen. With GNOME it works and looks great 😉

  88. I try to install U on may Archos 101it but not done. How to fix this erro? Help me! I need ubuntu to run sopcast. Thanks.
    ————-
    # cd /sdcard
    cd /sdcard
    # cd ubuntu
    cd ubuntu
    # ls
    ls
    Music.exe bootubuntu fsrw mountonly ubuntu.img ubuntu.sh unionfs
    # sh ubuntu.sh
    sh ubuntu.sh
    mount: /system not mounted already, or bad option
    FATAL: Module ext2 not found.
    TERM environment variable not set.
    mkdir: cannot create directory `/data/local/mnt’: File exists
    TERM environment variable not set.
    chmod: changing permissions of `Music.exe’: Operation not permitted
    chmod: changing permissions of `bootubuntu’: Operation not permitted
    chmod: changing permissions of `fsrw’: Operation not permitted
    chmod: changing permissions of `mountonly’: Operation not permitted
    chmod: changing permissions of `ubuntu.img’: Operation not permitted
    chmod: changing permissions of `ubuntu.sh’: Operation not permitted
    chmod: changing permissions of `unionfs’: Operation not permitted
    TERM environment variable not set.

    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’
    # bootubuntu
    bootubuntu
    mount: /system not mounted already, or bad option
    losetup: /dev/block/loop7: device is busy
    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
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
    ent
    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: failed to run command `/bin/bash’: No such file or directory

    Shutting down Ubuntu
    failed.
    failed.
    failed.
    failed.
    loop: can’t delete device /dev/block/loop7: Device or resource busy
    ———–

  89. Hi, great post!!

    Do you always need to have your cell phone plugged to the computer in order to run the ubuntu img on the cell phone?

    Regards

  90. Seriously? Running a chmod 4777 * in /system/bin because you are too lazy to add 4 lines in your script to chmod only the files you need?

    Assuming that the third partition of the phone’s internal memory is always the partition for the /system mount point?

    The funniest part is the disclaimer *after* you run the script that This process does NOT damage Android OS! while you already damaged system files by loosening security.

    You are dangerous and the fact that you take security so lightly is disturbing from a real linux user’s point of view.
    Guess this is why your screenshots are from a Windows PC…

  91. Alot of people seem to be having a problem where they are loading the vnc client and just getting a grey screen with an “X” cursor which follows your mouse but can’t click.

    This problem is caused by a permissions error in /root/.vnc/xstartup
    alter the permissions with “chmod a+x xstartup” .

    Another problem I have found is that you keep adding localhosts files and opening a new X session every time you run vncserver -geometry etc.

    To get rid of therse “rm” all of the localhosts .pid and .log files in /root/.vnc and rm .X*-lock files in /tmp and the X* files in /tmp/X11-Unix.

    To avoid this happening run “vncserver -kill :1” Before using the exit cmd.

    Hope this helps!

  92. How exactly does it work? Will there be a more general explanation that explains to install any linux version? I don’t want to download 600mb with 5kb/s and I’d rather have arch than ubuntu on my phone.

  93. It’s really cool.
    Got a question, after the installation, can I use the phone just like the Ubuntu on PC?
    I mean can I write C/C++/Python code on the phone?

  94. It would be very nice to have a ubuntu running into my mobile – tought it would no be so fast, because of memory and processor power – but I’ve tryed doing it with yout arm ubuntu 9.10 image, and everything went well, but since repositories of karmic had went down last month – they stay up just two years – I’m unable to go under more – like instaling ssh or vnc, on lxde; Maybe I could get it throught getting every single deb needed, but this would be a wast of time, first because of the numeber of packages needed, and second because if I needed to install some new application on it, would be the same nightmare;

    You should show us how to make a ubuntu arm image, so we could make a new one with the last ubuntu released. I will try this for myself, with I get some results, I’ll post them here.

    [just for cursiosity, I’ve a galaxy i5801, know as galaxy, with 256MB of ram and 800MHz cpu oc clock]

  95. Is there any way to set up a dual boot of Purity and Ubuntu? I am running the bionic.

    That would be awesome!!! Thank you and great site.

  96. I cant mount 4 files…..

    what can i do ?

    # bootubuntu
    bootubuntu
    mknod: /dev/loop1: File exists
    losetup: /dev/block/loop1
    mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: No such device
    mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
    ectory
    mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
    y
    mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
    y
    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 nonexist
    ent
    bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
    ent
    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/block/loop1: Device or resource busy
    #

  97. I have a Toshiba Thrive…. I wanna run Ubuntu, but I also want to run Android OS Honeycomb. So how can you do a double Boot….

    Thanks…..

  98. I followed the instructions very carefully, phone is rooted, and busybox installed, I get the following errors:

    To enter the Ubuntu Linux console just type ‘bootubuntu’
    # bootubuntu
    loop1#modprobe: not found
    mknod: /dev/loop7: File exists
    losetup: /dev/block/loop7
    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
    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
    failed.
    failed.
    failed.
    failed.
    losetup: /dev/loop7: Device or resource busy
    #

    Anyone know why this might be happening? Any fix?

  99. Nice! I got it to run on my Samsung GSII

    Thanks to the tip by Madhavan (to do “chmod 777 xstartup”)

    How do I shut down ubuntu now? How do I get sshd to start at boot time and same with vnc server…

    Thanks for the guide!

  100. Hey, I’ve just completed this tutorial and everything seems to work, except that apt-get update does nothing else but return some 404 errors … I think that is because this version of ubuntu has reached it’s end of life date … so, is there possible to install a newer version? how?

  101. When I try to install, I get permission denied error and when I type ‘bootubuntu’ it says not found. I am running Galaxy S Captivate and it is rooted and it has busybox. It’s also running the Phoenix Custom ROM. Please help.

    # cd /sdcard
    cd /sdcard
    # cd ubuntu
    cd ubuntu
    # sh ubuntu.sh
    sh ubuntu.sh
    modprobe: chdir(2.6.32.9): No such file or directory
    ←[H←[Jrm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    mkdir failed for /data/local/mnt, File exists
    ←[H←[Jrm failed for /system/bin/fsrw, No such file or directory
    rm failed for /system/bin/bootubuntu, No such file or directory
    rm failed for /system/bin/unionfs, No such file or directory
    rm failed for /system/bin/mountonly, No such file or directory
    cp: can’t create ‘/system/bin/fsrw’: Permission denied
    cp: can’t create ‘/system/bin/bootubuntu’: Permission denied
    cp: can’t create ‘/system/bin/unionfs’: Permission denied
    cp: can’t create ‘/system/bin/mountonly’: Permission denied
    Unable 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’
    # bootubuntu
    bootubuntu
    bootubuntu: not found
    # ifconfig
    ifconfig
    # sh ubuntu.sh
    sh ubuntu.sh
    modprobe: chdir(2.6.32.9): No such file or directory
    ←[H←[Jrm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    rm failed for -f, No such file or directory
    mkdir failed for /data/local/mnt, File exists
    ←[H←[Jrm failed for /system/bin/fsrw, No such file or directory
    rm failed for /system/bin/bootubuntu, No such file or directory
    rm failed for /system/bin/unionfs, No such file or directory
    rm failed for /system/bin/mountonly, No such file or directory
    cp: can’t create ‘/system/bin/fsrw’: Permission denied
    cp: can’t create ‘/system/bin/bootubuntu’: Permission denied
    cp: can’t create ‘/system/bin/unionfs’: Permission denied
    cp: can’t create ‘/system/bin/mountonly’: Permission denied
    Unable 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’

  102. Man,
    I was installing this on my Galaxy Nexus and everything was going well….

    Until I tried to install openssh and tightVNCserver….

    Neither of these will install because the packages that its trying to download are no longer on the website…. Newer files are. Its trying to fetch openssh-server_5.1 which isn’t even on their site anymore.

    No matter what I do, I cant get past this point because it just keeps trying to fetch old files that no longer exist. Same thing with apt-get update…. its trying to pull files from the directory /dists/karmic/ which doesn’t even exist on the site anymore…

    /super frustrated….

    Any idea on how I can get past this?

  103. Hello,
    I got errors while runing ubuntu.sh. Then I look into this file.
    1. It calls “cp” to copy files to /system/bin. But my android doesn’t have cp command in /system/bin, so I used “dd” command to copy these files.
    2. It want to chmod 4777 to /sdcard/ubuntu, and it shown “no permission” to make changes on sdcard. I overrided it.

    The next step, I tried bootubuntu. Errors again !!!
    1. mknod not found. my device doesn’t have this command.
    2. losetup not found also.

    Based on my experience above, any ideas do you have? Or I have to give up ???

    Tks,
    blnn hh

    1. All,
      After installing busybox, everything is fine now.

      Here I would like to set a friendly reminder: your device must be rooted & you have installed busybox.

      Thanks

  104. Hi There,

    Can you please provide the instructions on installing Ubuntu on the Samsung Galaxy Note?

    Regards,

    Cesar Sotolongo

  105. For those who got the problem with the bootubuntu not found.. etc.. well I got the same problem then I realize that the problem was for permissions Then I remembered that the terminal doesn’t have BASH so I search a little and found one http://forum.xda-developers.com/showthread.php?t=537827 and then I retype bootubuntu on the terminal and the problem was gone! I hope this help 🙂 Obviously you need to have root and busybox 😉

  106. You’re outta your fekking minds if you think I’m going to wait 10+ hours to download a 600 meg file @ 5k/sec!!! Get a real file host, not a mickey mouse bunch of retards like those at downloadandroidroms.com. They must be using an old phone as their server!!

  107. hi,

    It’s really wonderful.

    what options i will have for text / mouse pointer inputs from my android device?
    does i will get keyboard and pointer options through the android-vnc viewer?

    can’t i directly boot my mobile device in ubuntu like dual-boot systems?
    is there anything like boot loader is possible for android device?

  108. hi ,
    my phone is samsaung glaxy gio , android version 2.4.3 CPU 800mhz and memory unknown storage memory is very poor , but i want to use ubuntu OS 🙂 Please you show how to make my phone .hay my friend android game is not run on ubuntu ?

  109. Hi – I want to install onto my Epad, I dont have room on sdcard – only sdcard1 – Can someone please what changes I have to make to get it working please.

    Many Thanks

    Drew

  110. For whatever it is worth, I have a rooted Asus Transformer and I downloaded “Linux Installer” from the market to accomplish steps 1 to 12, above. I installed Debian – it is bare bones and doesn’t have a desktop environment. After that was installed, I followed the instructions above beginning with “How to Install Programs on your Ubuntu!” Using this guide, I was able to get LXDE installed and running. So it works great. But I have a strange observation.

    After I get everything setup and I’m in the LXDE environment, the CPU monitor in the corner shows me at 50%+ CPU usage all of the time. It’s never below 50%, and the system response is relatively slow. I noticed something by mistake. If I l click on “log out” and I actually log out … the desktop environment doesn’t go away. A lot of the “eye candy” goes away (the borders change to be more basic, the icons look more basic, etc) BUT the whole system is way, way, WAY faster. I’d prefer the speed over the eye candy.

    Here is my question … Why does this happen? Is there any way for me to make this happen automatically when I connect by vnc? Or do I have to go through the whole process and “log out” each time?

  111. High, I was amazed by your way to run Ubuntu on Android, can I translate this to Chinese and put it on a BBS?

  112. Oh, and BTW, may I ask that what’s the different between the zip file which you offered and the ubuntu.iso from Ubuntu’s website?

  113. a better way to install linux is LINUX INSTALLER FOR ANDROID…….its free and you can download different flavors of linux.

  114. Please help me…
    Hello AndroLinux
    I have several times tried to install from the laptop via usb for Archos 101 IT. but I will only point 10 where I can not move forward.
    I think I come in contact with the SD card but it can not find the folder where I have Ubuntu.
    I read somewhere that one had installed ubunto on Archos 101IT, but now can not find the place again, so I try here if anyone can help.

  115. Hey Max,

    I just installed it on Thinkpad Tablet accordibg to your guide, which worked quite fine.
    It is good to see that it is possible.
    But for some reasons I’m not really satisfied with it, so what d i have to do to ‘uninstall’ all the performed steps/chnages.
    looking forward to an answer.
    thanks dan

  116. When I try to access sdk, I couldn’t know where it is. However, I made an answer myself.
    Default android-sdk directory is
    C:\Program Files\android\android-sdk
    After you install it, you might not be able to access platform-tools.
    I was so confused, but again I found a solution.
    You should open SDK manager (windows program) by administrator,
    and install platform tools manually.
    After that, it’ll work!

  117. I just loaded Ubuntu on my Droid X2 and everything went smoothly. I am running a CM7 Rom on my device. I ran in problems when I tried updating. The exact error that occured in your troubleshooting section is happening for me. I tried the commands you wrote without luck. I am very much a novice at the root interface commands. After entering,

    cat > /etc/apt/sources.list
    deb http://old-releases.ubuntu.com/ubuntu/ karmic main universe

    I try to update or use a apt-get command for SSH or Tightvnc and I get this response:

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Couldn’t find package tightvncserver

    Can someone help?

  118. hello Admin,

    could you plzz help me in this.. when i tried to run bootubutu in terminal (adb shell)

    it gives me following error.. not booting to ubuntu. –>

    # bootubuntu
    bootubuntu
    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!

    [1] Segmentation fault chroot ${mnt} /b…

    Shutting down Ubuntu
    losetup: /dev/loop1: No such device or address

  119. how to install vnc server manually. there is a error when typing this command “apt-get install tightvncserver”
    error = “segmentation faulty tree… 51%”

  120. i have done everything succesfully but i am not bieng able to install programs even after you troubleshooting tip pls reply

  121. I did as what you said ,and my phone is zte blade
    it runs well ,
    but when i turn on the vnc server it goes wrong ..
    the vnc server runs well , but the lxde doesn’t …
    why there is no icewm installled ??
    so i installed the icewm ,and succeed…

  122. hi there i used a vnc to boot an .img file using a transformer tf101 chrooted running ics update 4.0.3

    i was wondering would it be possible to run files like wine on 10.10 maverik ??

Leave a comment

Your email address will not be published. Required fields are marked *