How to Install Ubuntu on Your Nexus One/Android!

by Nexus One Hacks on Tuesday, July 6th, 2010

This guide is for those of you who want to install Ubuntu as a sub-system under your Nexus One or any other rooted Android smartphone, I’ve tried to make it easy as possible for everyone.

UPDATE: Now Ubuntu is also available on HTC Evo 4G!

As you can see, I’ve used a rooted Nexus One here but you could have trouble with other Android phones as not all Android phones are built exactly alike but might work well also, you never know until you try it.

I am also working on Ubuntu on my rooted HTC Evo 4G, that should be available later this month over at HTCEvoHacks.com.

You could probably also run Ubuntu directly off your Nexus One/Android phone but that probably means not being able to use it as a phone and you probably would lose your camera.

To be on the practical side, I think it’s ideal to run Ubuntu along with your Nexus One/Android phone as I will be showing you here.

This Ubuntu install will not affect your existing Android system, the Ubuntu terminal will run in the background while the Ubuntu X11 graphical user interface will run as an app under Android VNC app.

Why are you installing Ubuntu on your Nexus One/Android phone?

Being able to have Ubuntu on your Nexus One/Android phone means that you can run native Ubuntu/linux applications off your phone!

I also see many uses in college engineering classes when they are studying Ubuntu/linux.  Instead of heading to the lab or having dual-boot on their computer, students will be able to use their Nexus One/Android phone as a test device.

Even for web designers, their Android phone can become a portable test web server to test out their new designs.

The list will go on and there’s absolutely no reason why we shouldn’t run Ubuntu or other linux systems on Android phones.

Lastly, for open-source people like me, free code is priceless, it’s going to be what’s driving the world in the next 10-20 years, if it ain’t already.

I don’t want to bore you with my philosophy so let me show you step-by-step how to install Ubuntu on your Nexus One.

How to Install Ubuntu on your Nexus One/Android Phone!

Before anything, download ubuntu.zip and unzip it:

ubuntu.zip on Megaupload

or ubuntu.zip on FileFactory

(Please feel free to mirror other places if you’d like!)

1. First, you will need a rooted Nexus One/Android phone.  If you have a Nexus One, go follow these directions and root your phone first!

UPDATE: Also, you need to install the latest Busybox, try this guide here to install Busybox.

2. Once you have a “rooted” Android phone, you will be able to run Ubuntu under Chroot.

What is Chroot?

I just found about this myself the other day while doing this but Chroot in layman’s terms is basically the ability to run other operating systems under your current system (in this case Android).  Chroot was initially developed to test new operating systems in a virtual environment but will work perfectly in this case for our project here as it will allow us to use Ubuntu as a “virtual” machine under Android system.  Yes, just think of it like Sun Virtualbox or VMWare for Android and other linux systems.

On one more note, you can only “chroot” another operating system made for your system’s architecture.  For example, most new Android smartphones including Nexus One, HTC Evo 4G, and Droid X all use ARM architecture CPU, meaning you can only use ARM-based linux systems/ports.

In this case, we are lucky because Ubuntu has an ARM-port.   It’s most likely the case that you can also “chroot” other linux devices that support ARM.  I am also working on chrooting other popular distros like Fedora, Gentoo, and more.

3. Now you understand what Chrooting is, let’s copy over the files we need for chroot.   These files include an image file of Ubuntu ARM (basically root filesystem that can be mounted onto Android phone using the command mount), setup script file (ubuntu.sh), chroot boot/launch file (bootubuntu), unionfs, fsrw, and mountonly.

Copy these six files over into your SD card’s root folder under folder name “ubuntu“.  Or you can just unzip the file I provided and copy the ubuntu folder over to your SD card’s root folder.

(Yup, I am already working on other Linux distros!  But Ubuntu is my favorite.)

The script files were modified (by myself) from other instructions on the web on installing Debian to a G1 phones (thanks to Saurik).   Btw, Debian and Ubuntu are pretty much the same linux as Ubuntu is just an extension of Debian so you should be able to easily run Debian too using the same method, just change the file names.

4. Before we go any further, make sure to “Turn off USB storage” on your phone so we can access the SD card from ADB Shell.  Let’s also make sure your USB Debugging mode is checked under Settings->Applications->Development.  (And yes, don’t forget to connect your Nexus One/Android phone to your computer via USB!)

5. I am assuming you’ve already installed the Android SDK (while you were rooting your phone) so let’s head to your Android SDK directory and load up ADB Shell.

For Windows, go to your Android SDK Tools directory such as c:\sdk\tools and type “adb shell“.

(FYI, cd is the command you can use to browse to your sdk\tools directory.  For Windows, do cd \sdk\tools and for Mac/Linux, do cd /sdk/tools.

For linux and Mac, go to your Android SDK Tools directory such as /sdk/tools and type “./adb shell” or it can also be “sudo ./adb shell” for Ubuntu.

6. Once you are in the ADB shell, you should see a “#”symbol.  Great, let’s start bootin’ Ubuntu right away.

7. Type “su” to enter superuser mode.  Btw, if you get error on this part, that means you have not rooted your phone! (or you might have to installed a rooted ROM.)

8. Next, type “cd /sdcard/ubuntu“, which will take you to the directory where you’ve copied the Ubuntu files over to.

9. Type “sh ./ubuntu.sh” to run the setup script.  You only have to run this once or whenever you change the script file bootubuntu.

10. Once that completes, type “bootubuntu” to “chroot” or boot into your new Ubuntu on your Android!

If you get the “localhost” sign, congratulations!  You’ve just installed Ubuntu on your Nexus One/Android phone!

If you didn’t get that and you got an error falling back to the ground at 200MPH back at the “#” symbol, don’t worry, I did that about a thousand times for 2 days straight, you are not alone.

Try rebooting your phone and repeat steps 5 through 10 CAREFULLY and I am sure you will get it working.  A lot of times, our eyes can lie to us while following step-by-step directions, really!

Also, if you are not using a Nexus One here, you could be running into other problems as I have still not yet been able to chroot into Ubuntu on my HTC Evo 4G.

How to Get X11 GUI up and running on your Nexus One/Android Phone!

11. I actually prefer the command line over GUI because it saves so much memory and I am pretty proficient doing things in the terminal but the GUI gives you a full desktop experience over Ubuntu so first, you will need to download the latest version of Android VNC Viewer in form of .apk file.  After downloading it on your phone (or copy it over to your SD card after you download it on your computer), open it up and install the app.

12. You will next need to install some files via Ubuntu apt-get installer.  Go back to the chrooted Ubuntu terminal and type:

apt-get update

to update your Ubuntu packages then:

apt-get install tightvncserver

to install the TightVNCServer and:

apt-get install lxde

to install the LXDE.

13. Next type:

export USER=root
vncserver -geometry 1024×800

Here you can set your password to VNCserver like I did as “123123123“.

*Note – You can also change 1024×800 to the exact resolution of your Android phone’s LCD resolution but I found that a bit higher resolution gives you better display, so the Nexus One has 800×480 but I set it to 1024×800 for better viewing.

Next, we are going to add the following to /root/.vnc/xstartup file using cat command:

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

Then hit Ctrl+D twice and Enter key.

14. Next open up the Android VNC app on your Nexus One/Android phone and enter the password you set earlier in step 13 and set the Port to 5901.

15. Next hit connect and voila, you should get something like this, a cool GNome Ubuntu screen!!!

16. Now, let’s setup your chrooted Ubuntu so you can make the VNCserver run everytime you start the chrooted Ubuntu.

17. Next, let’s add some code to the /root/.bashrc file, which runs at every boot of your Ubuntu so the VNCServer runs automatically when you start the Ubuntu.

cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×800

Then hit Ctrl+D twice and Enter key.

Next, we will concatenate the file we just made front and /root/.bashrc into a new file called temp:
cat front /root/.bashrc > temp

Then we will copy the new file temp over the existing /root/.bashrc.

cp temp /root/.bashrc

(I used Windows command.com terminal, which keeps echoing things twice.  It only happens on Windows because of echo!)

*Note – The reason why I used cat command to do everything here is for Windows users because the vi text editor doesn’t function correctly within Windows shell.  But you can always just use your favorite Ubuntu text editor if you are using Linux or Mac.  (Just add contents of file front into the beginning of /root/.bashrc This way, I only have to write one howto manual that works for every platform.  For Windows users, you can also install SSH (do “apt-get install openssh-server“) and use an SSH client such as PuTTy.)

To check that it’s working you can exit out of Ubuntu back into Android shell:

exit

then boot Ubuntu back up:

bootubuntu

Now everytime you chroot/boot your Ubuntu, the VNCServer is start automatically at start-up.

You can use Terminal Emulator app (freely available on Android market) to start the Ubuntu chroot by entering:

su
bootubuntu

so you don’t need to connect  to ADB shell to launch Ubuntu, giving you the freedom to use Ubuntu along with Android whereever you go.

That’s it!

BOOTUBUNTU UPDATE FIX

UPDATE: For people having trouble getting it to work (thanks to people testing it at XDA Developers), try downloading the new bootubuntu file here then:

Go run the ubuntu.sh by doing on ADB shell:

su

cd /sdcard/ubuntu

sh ./ubuntu.sh

then

bootubuntu

Credits

  • Thanks to Devs at XDA Developer for the Ubuntu ARM image for HTC HD2, which I used then resized it to 2GB so I can put more stuff on it, works fine with other Androids.
  • Huge thanks to AndroidFanatic for showing me how to put X11 on the screen via VNC.  I used their guide for Debian and worked perfectly with Ubuntu.
  • Even more thanks to Saurik (Jay Freeman) for the Debian G1 script, which I hacked for Ubuntu on Nexus One!


Related News and Resources



209 Responses to “How to Install Ubuntu on Your Nexus One/Android!”

  1. Ubuntu on Nexus One Android! | Nexus One Hacks Blog Says:

    [...] Tether Restore Follow us on Twitter « OLED Hack Doubles Battery Life on Nexus One! How to Install Ubuntu on Your Nexus One/Android! [...]

  2. tonton Says:

    Very nice!!! Keep the great work coming bro!

    [Reply]

  3. SAI Says:

    Wow great work! but I seem to be having problems running this…for some reason I can’t get the right permissions for ./ubuntu.sh. Yes I did “su” first but still doesn’t work. This is what I typed in and what I got back:
    http://yfrog.com/1fn1ubuntuproblemp

    Any help is appreciated!

    [Reply]

    alecaldi Reply:

    Problem is you are not switching (I had the same problem) USB connection to “only battery load” (I have it in spanish, “solo carga”). Go to notification upper bar and under USB connection switch it to this mode. Thus you’ll have a freed sd card from any deny permission. I don’t know if by now you have solved the problem, anyway I replay you.

    Good luck.

    [Reply]

  4. bobby Says:

    cant wait till you get this up and running on the evo

    [Reply]

  5. Phil Says:

    I am on a rooted nexus one running stock FRF91. I am getting “chroot: can’t execute ‘/bin/bash’: No such file or directory”

    when attempting to input command “bootubuntu” after running sh ./ubuntu.sh

    Any ideas? I am using su also, I have followed your steps precisely.

    [Reply]

    Nexus One Hacks Reply:

    Please try the update bootubuntu file, updated on this post at the end!

    [Reply]

    bobby Reply:

    im getting the same error with the updated bootubuntu..but then again im on an evo

    [Reply]

    Renae Reply:

    Awesome! this works great! I’m a big fan of yours now! :D

    [Reply]

    Michael Reply:

    i’m still getting the same error as i get before with the new bootubuntu file and i’m running on a nexus one and followed all instructions.
    please help

    [Reply]

    TheJoneJone Reply:

    Hi, I have the same problem on FRF91.

    I tried the modified bootubuntu, it still doesn t work
    Here is the problem :

    mount -t ext2 /dev/block/loop1 /data/local/ubuntu
    mount: Device or resource busy

    So I can’t mount the disk image… :(

    [Reply]

    Autoriev Reply:

    I get the same error with the updated bootubuntu. I’m running Kang-o-rama (FRF85B) with the latest stable busybox. I’m running WIN7 64bit if that affects anything.

    [Reply]

    Jay Reply:

    I got the same Error. But i have tried the updated file..
    Nothing will work…

    [Reply]

    Chris Reply:

    The updated version did not work for me, still getting the /bin/bash error.

    [Reply]

    Andon Reply:

    It hangs at the command line:

    cat > /root/.vnc/xstartup

    how long should it take at this step?

    Nexus One Hacks Reply:

    It’s not hanging, you keep typing after! :)

    Tony Reply:

    Got this working on my N1 with Cyanogenmod 6 a1… updated the bootubuntu file to use loop5 in all places instead of loop1. Seems something holds loop1, but loop5 has been working well for me.

    Be sure to edit it in /sdcard/ubuntu/ , then re-run the “sh ./ubuntu.sh” to get it in place. I also reboot the phone before trying to run bootubuntu after changes, since the loops are on the android side, not inside the chroot.

    Ken Reply:

    Hi, i am also on a rooted Nexus One running FRF91 and still getting “chroot: can’t execute ‘/bin/bash’: No such file or directory” even after downloading the update bootubuntu file. Any suggestions?

    [Reply]

    TheJoneJone Reply:

    it seems that the problem concerns people with 16G sdcard. Do you confirm?

    BarcaDroid Reply:

    I have the same problem, Also have a 16G sd card and running froyo 2.2 FRF91 nexus one.
    problem is not with this tutorial nether the files used in here. I get the same message when I try to clear my dlvik-cache in the terminal. Please advice!!…

    Michael Reply:

    how do we change loop 1 to loop 5?
    please help!!!

    volgar Reply:

    i have 4gb card and the same problem. nexus one cm6 rc1

    “chroot: can’t execute ‘/bin/bash’: No such file or directory”

    openback Reply:

    Yeah, same here with a 16GB card. I did have it run ONCE, though, but then this again.

    ScottRTL Reply:

    Yup, loop5 resolved the issue for me, and I have the 16GB sdcard on Nexus One Cyanogen6RC1 FRF91.

    Just mount your your SDcard to your computer and edit the bootubuntu file in the /sdcard/ubuntu dir and find replace all loop1 ‘s with loop5 ‘s

    Worked like a charm for me.

    openback Reply:

    No luck on mine. I’m getting the same error. I’m also on CM6 RC1 with a 16GB card with one partition. I’ve tried loop1, 2, and 5. After removing ‘clear’ from ubuntu.sh, I see that ‘modprobe ext2′ is failing because that module doesn’t exist. Sounds like that may be the issue, but I don’t know where I could get that module for this kernel.

  6. התקינו Ubuntu על מכשיר ה-Nexus One שלכם! | DroidIL Says:

    [...] מ-Nexus One Hacks הצליחו להתקין גרסא תקינה ופועלת של מערכת ההפעלה [...]

  7. Android Hack – How to Install/Run Ubuntu on your Nexus One/Android! Says:

    [...] Anyways, I’ve wrote a step-by-step instruction guide over at my NexusOneHacks.net blog so, head over there for that. [...]

  8. Pinguins Móveis » Blog Archive » Hack da tarde: Ubuntu no Nexus One Says:

    [...] ter um Ubuntu com X11 e tudo no seu Nexus One? Siga as instruções bem completas e mastigadinhas postadas no Nexus One [...]

  9. Renae Says:

    Hi, I really appreciate this step by step! My bootubuntu fails, however, at the

    “mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt” every time.

    I have stepped through line by line of the script and get the following error:

    # mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
    mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
    mount: can’t setup loop device: No such file or directory

    but my $kit is defined properly and my $mnt is.

    any help? TIA!!

    [Reply]

    Renae Reply:

    Edit: I modded the bootubuntu and voila – I have ubuntu! Thanks!!

    [Reply]

  10. bobby Says:

    this is what i get on my evo

    mknod: /dev/loop1: File exists
    losetup: /dev/block/loop1: No such file or directory
    mount: No such file or directory
    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: line 22: can’t create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
    bootubuntu: line 23: can’t create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
    Setting localhost on /etc/hosts
    bootubuntu: line 25: can’t create /data/local/ubuntu/etc/hosts: nonexistent directory
    READY TO ROCK AND ROLL BABY!
    Brought to you by NexusOneHacks.net and the open source community!

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

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

    [Reply]

    Jay Reply:

    I got the same Error! (Motorola Milestone)

    [Reply]

    alecaldi Reply:

    same error on Moto milestone, 2nd bootubuntu only changes the error marginally.

    [Reply]

  11. SAI Says:

    Hey Renae, can you tell us what you did to get it to work?

    [Reply]

  12. Triz Says:

    Why cant i open firefox or any ubuntu apps.

    [Reply]

  13. Nexus One running Ubuntu (and how to install) Says:

    [...] nexusonehacks] [...]

  14. twopointfour Says:

    Hey, I recently had a similar problem with running mysql inside of a chrooted jail (not on an android phone, but I’m sure its the same thing). I’m pretty sure it’s a chroot problem, and the /etc/init.d/mysql script just doesn’t work. It doesn’t mean you can’t run a mysql server though, you just need to run mysqld manually.

    I wouldn’t suggest this if you’re planning on hosting any sort of production data in there, and though I think this closes the database cleanly (without data corruption) I wouldn’t bet on it. But here’s how you can restart mysqld in a chroot jail (as root):

    killall mysqld
    /usr/sbin/mysqld &

    There are lots of options you can pass to mysqld too, but the defaults should work fine. Awesome article! I think I’ll try getting ubuntu installed on my Droid :) .

    [Reply]

    Nexus One Hacks Reply:

    Dang, I tried everything but MySQL simply doesn’t want to start on my Nexus One Ubuntu, if you’ve got solution to this, I’ve got $50/Paypal donation coming ur way asap.

    [Reply]

  15. Jason Says:

    Once you’ve got it installed is it possible to run Ubuntu via the phone? I’d like to setup the phone as a sort of mini server so I can plug in my old G1 and use it as a simple webserver.

    [Reply]

    Christian Reply:

    Should work. I can access the Ubuntu on my phone with a simple vncviewer on my PC. You just have to be in the same internal network (e.g. via WLAN) and know the internal IP of your mobile device. To see the surface of your “mobile-ubuntu” just type e.g. 192.168.178.23:5901
    In my case it works perfectly. I can take over the whole system from my PC…

    [Reply]

  16. Michael Says:

    i still have the same problem with the new updated bootubuntu because everytime i type bootubuntu on cmd it fails and shows this sign #

    [Reply]

  17. Ubuntu porté sur le smartphone Android Nexus One | WebDevOnLinux Says:

    [...] Source : nexusonehacks [...]

  18. Fisch mit Fahrrad – Ubuntu auf dem Nexus One » Nexus, Ubuntu, Interesse, Anleitung, Video, Ergebnis » mobiFlip.de Says:

    [...] Interesse hat, das Ganze selber auszuprobieren, der kann dieser Anleitung folgen.  Allerdings habe ich sie selbst leider noch nicht ausprobieren [...]

  19. lveyo Says:

    it is so cool!!
    can it run on my HTC Hero?

    [Reply]

  20. Android - Ubuntu na Nexus One Says:

    [...] instalacji znajdziecie w tym wpisie w serwisie Nexus One [...]

  21. Lore Says:

    Great work!
    2 questions:
    1)Does it work also for HTC Desire?
    2)When I wipe to change ROM, should I repeat this entire guide?

    Thanks a lot

    [Reply]

  22. Running Ubuntu Linux on your Nexus One | My Android World Says:

    [...] via nexusonehacks.net [...]

  23. Ubuntu sur Nexus One | FrAndroid - LA communauté francophone Android Says:

    [...] en place de cet environnement sur le téléphone  Android, en dual-boot, est décrit sur le site nexusOnehacks.net, à travers une vidéo et un tutorial. Outre le fait de passer sur l’un ou l’autre [...]

  24. How To: Install Ubuntu On Nexus One Says:

    [...] Here is the complete step by step guide on how to install Ubuntu on your Nexus One according to Nexus One Hacks.You will need to have a rooted Nexus One in order to embark on this porting procedure. Please do [...]

  25. Installer Ubuntu sur un téléphone Android (ARM) Says:

    [...] la procédure d’install est expliquée sur ce site. Evidemment, le process est quasi identique pour d’autres téléphones comme le HTC Evo 4G et [...]

  26. How-To: Install Ubuntu on a Nexus One | Daring Minds.Com Says:

    [...] spent this past Independence Day weekend cramming Ubuntu on to his Nexus One and has produced a short how-to explaining the [...]

  27. Instalar Ubuntu en NexusOne | aplicaciones android Says:

    [...] instalarlo deberás tener acceso Root al móvil, la web oficial donde se ha creado el proyecto es esta, donde encontrar los pasos necesarios para llevar a cabo la [...]

  28. Dual-booting Ubuntu Nexus One tutorial released [Video] - SlashGear Says:

    [...] now, thanks to a new tutorial, your Google Nexus One can double up as your test web server.  NexusOneHacks has persuaded Ubuntu to live in harmony with Android 2.2 on the Google smartphone, producing a [...]

  29. Ivan Says:

    Great work! Thanx.
    But could you make the .img file smaller?

    [Reply]

  30. Video: Ubuntu su Nexus One « Nexus One Italia – Il blog italiano sul Google Nexus One Says:

    [...] seguente link trovate la guida per l’installazione di ubuntu su un Nexus [...]

  31. Ubuntu Linux Caught Running On Nexus One via VNC Says:

    [...] of interesting things with their devices nowadays, and this next piece highlight is no exception. NexusOneHacks has published a tutorial which will show Nexus One owners how they too can get Linux distribution [...]

  32. Ubuntu Berjalan Pada Google Nexus One Says:

    [...] #nexusonehacks [...]

  33. Ubuntu Running on Nexus One | Android Dudes Says:

    [...] releases of Android 2.x and now it’s also the first to get an install of Ubuntu. The guys at NexusOneHacks have a created an amazing and comprehensive tutorial of how to get the usually desktop OS onto your [...]

  34. Install Ubuntu on Nexus One or Android Phone Says:

    [...] NexusOneHacks for Full Guide on [...]

  35. Lore Says:

    does it work also for Desire?

    [Reply]

  36. Mike Says:

    I tried it on a rooted Motorola Milestone and I’m also getting “chroot: can’t execute ‘/bin/bash’: No such file or directory” after running “bootubuntu”. I also tried the updated “bootubuntu”, with the same result.

    I did several reboots and followed all the steps. Any suggestions?

    [Reply]

    Nexus One Hacks Reply:

    Need to update kernel with support for Loop devices!

    [Reply]

    Mike Reply:

    Ok, that worked, thanks! But I now have another problem, when I connect via VNC, I have a grey background and an X mouse cursor.

    [Reply]

    Nexus One Hacks Reply:

    Try waiting a bit or reboot and try loading it again, sometimes it lags.

    Ken Reply:

    where can i find the update kernel with support for loop devices?

    [Reply]

    Nexus One Hacks Reply:

    You can compile it yourself but most Nexus One ROMs come with it as default. See here for compiling: http://htcevohacks.com/htc-evo-hacks/how-to-build-your-own-htc-evo-4g-android-kernel/

    Michael Reply:

    can it work on the nexus one?

    alecaldi Reply:

    I don’t get it, after compiling the kernel for a HTC evo should this work on motorola milestone? It’s there a way to get a compiled kernel without doing so much work or it’s forced?

    Greg Reply:

    Hi Mike,

    I’ve a Milestone too. Where do you download kernel with support for loops devices?

    TIA!!

    [Reply]

  37. Come installare Ubuntu su Android | AndroidLab Says:

    [...] Fonte: Nexus One Hacks [...]

  38. Bench Says:

    Need more mirror man. Filefactory is snail speed! or even better, put it on bit torrent!

    [Reply]

  39. Gadgetsteria Says:

    [...] the full rundown and instructions (if you so choose to do this yourself), jump on over to NexusOneHacks.net and get to it. **Be sure to clear your calendar for the afternoon. Have fun… BGR > Feel [...]

  40. Planet Android » Blog Archive » Nexus One gets Ubuntu install [Video] Says:

    [...] releases of Android 2.x, but it’s also one of the first to get a usable install of Ubuntu.  NexusOneHacks have a massively comprehensive tutorial showing how to get the usually desktop-bound OS onto the [...]

  41. Video: Ubuntu running on a Nexus One « Whella : All About Mobile Says:

    [...] Keen to give it a whirl? Full instructions (and another video) are available at Nexus One Hacks. [...]

  42. Ubuntu en el Google Nexus One Says:

    [...] hace más de un año, a algún otro loco se le ocurrió instalar Debian en un HTC Dream, pero las instrucciones de Nexus One Hacks para instalar Ubuntu en el teléfono de Google son bastante más detalladas. Y hay que reconocer, [...]

  43. Installing Ubuntu In Nexus One Says:

    [...] guys at NexusOneHacks.net have managed to install and run Ubuntu in Nexus One. And best of all they have installed it in such [...]

  44. Nexus One gets full Ubuntu / Linux port Says:

    [...] details below!How-to video below, and all necessary files can be found at the Via link below:[Via: NexusOneHacks.net] If you enjoyed this article, please consider sharing [...]

  45. Seth Says:

    If you’re such an advocate of open source then why are you running Windows? (screenshots show windows ui)

    [Reply]

    Nexus One Hacks Reply:

    Haha, I use Ubuntu mostly but using Windows for Windows people so I can show them how to do it. Linux is easier so…

    [Reply]

  46. Install Ubuntu on Nexus One Says:

    [...] via NexusOne Hacks [...]

  47. Nexus One running Ubuntu Says:

    [...] to run Ubuntu on your Nexus One, then don’t think that it’s impossible. Folks over at NexusOneHacks finally installed the Ubuntu on the Nexus One. Have a look on the video to see how is it [...]

  48. Indian Art Says:

    Sweet! Now one can take Ubuntu just about anywhere.

    Ubuntu is so versatile it can peacefully co-exist with Android. Now thats an irresistible combination!

    [Reply]

  49. Rafyvitto Says:

    Can someone reupload ubuntu, it was taken down by both filefactory and megaupload.

    [Reply]

  50. dave Says:

    If you can port ubuntu to the N1, you think theres a chance at a WebOS port?

    [Reply]

  51. sam Says:

    hi

    Do you work this way with other distributional like backtrack 4 & how if so

    [Reply]

    VIRIIMIND Reply:

    Backtrack 4 on N1? Ahh That would be awesome!

    [Reply]

    Bad4u Reply:

    I second that! I will do this once someone figures out if its possible. Dont care about a gui. I can run in command….

    super portable aircrack! say WHAT!?! :P

    [Reply]

  52. Ubuntu joins Android on Nexus One, apocalyptic repercussions nowhere to be found /  Pusat Berita Says:

    [...]  |  Nexus One Hacks  | Email [...]

  53. David Jonas Says:

    anyway in hell you could get this working on D/s , more specifically mt1.2 ?

    [Reply]

  54. Fergus Says:

    Just like to say that ‘apt-get update’ doesn’t update the packages only the package lists ‘apt-get upgrade’ is what you need.

    [Reply]

  55. Ash Says:

    Been trying to get it working on Samsung Galaxy S … No luck so far. Remote desktop appears but with no top bar / apps ….

    [Reply]

  56. HeliumFX Says:

    would it be possible to get this working on the Moto Droid? I have a rooted Droid and would love to get ubuntu.

    [Reply]

  57. Ubuntu on Nexus One | SilVeR's World Says:

    [...] a post on installing Ubuntu Linux onto Nexus One here.. This is getting me VERY VERY tempted to do this as I’m currently using Nexus One, but the [...]

  58. Ubuntu Assimilates Nexus One, Resistance Futile | Sumotown.com Says:

    [...] of our favorite sites NexusOneHacks.net, has put out an article on how to install Ubuntu on you guessed it, thee Nexus One. Now you can apt-get to your [...]

  59. Tyler Says:

    attempting this on the original droid with FRF84B Froyo build installed…and all is well until i get to where i’m instructed to type “bootubuntu” into my terminal…i get a message saying “bootubuntu: not found”…i’ve tried the updated file and repeated the adb shell steps ad nauseum..any ideas…

    [Reply]

    Turi Reply:

    I have the same problem?? Any Luck?

    [Reply]

    Micael Reply:

    I have the same problem with trying to run bootubuntu (not found)
    even though its obviously there. Googled a little and it seems like its a quite common problem on the HTC Desire which I also have.

    [Reply]

  60. sabin Says:

    Will we be able to install ubuntu in G1 or not??

    [Reply]

  61. dvdivx Says:

    I would love to try this on my incredible but no one can tell me if chroot would work because the nand lock on boot up. Also why ubuntu? It’s great for laptops but does the touchui work? also what about dual booting with a lighter OS like Meego?

    [Reply]

  62. Grant Says:

    So does Ubuntu have the drivers for networking on the nexus out of the box?

    [Reply]

  63. Matt Says:

    Would this work with droid?

    [Reply]

  64. VIRIIMIND Says:

    Mirrors Please!!

    [Reply]

  65. Tyler Says:

    So after I reboot my phone, When go and do the bootubuntu and go to my VNC, the screen is grey pixels with an x instead of a mouse pointer… Did I do something wrong?

    [Reply]

  66. grays Says:

    Great work! but can you tell me how to shutdown the ubuntu..

    [Reply]

  67. ExaByte DataBase Says:

    I really loved the end of that video adding wep cracking tools for testing purposes I was going to buy a ViliV umpc and hope to get ubuntu running on ti to do my testing but if you could get this to run I will drool all over myself I cant wait to see the day aircrack-ng will run on the Nexus or my Evo even though the Evo’s network card is horrid very limited range someone has to hack that thing to work at full potential I have been trying to find a fix with no luck do you think that the nexus or evo will support packet injection? do you have a spot where I can donate to the cause

    [Reply]

  68. Video: Ubuntu on Nexus One | Technorotic Says:

    [...] on the tooth and want to try out Ubuntu on your Android mobile , you can find a detailed guide on this link and video review [...]

  69. Rich Says:

    I follow all your steps but when i get to the part were its says “to enter the debian linux console just type “bootubuntu” i type that and it says bootubuntu command not found help plz thanks

    [Reply]

  70. Ken Says:

    Help please!

    To enter the Debian Linux console just type ‘bootubuntu’
    sh-3.2# bootubuntu
    bootubuntu
    Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
    /system/bin/bootubuntu: line 22: /data/local/ubuntu/etc/resolv.conf: No such fil
    e or directory
    /system/bin/bootubuntu: line 23: /data/local/ubuntu/etc/resolv.conf: No such fil
    e or directory
    Setting localhost on /etc/hosts
    /system/bin/bootubuntu: line 25: /data/local/ubuntu/etc/hosts: No such file or d
    irectory
    READY TO ROCK AND ROLL BABY!
    Brought to you by NexusOneHacks.net and the open source community!

    Shutting down Ubuntu

    [Reply]

    Nexus One Hacks Reply:

    Try the second script I uploaded at the bottom of this post!

    [Reply]

  71. Ubuntu Ported To Nexus One | xda-developers Says:

    [...] UPDATE: I’ve posted full step-by-step guide on how to install Ubuntu and X11 on your Nexus One… [...]

  72. clacks Says:

    Failing at the bootubuntu too..Tried it lots of times. Help!!!

    [Reply]

  73. brad clifton Says:

    what case is he using on his phone…… im really curious.. i want one.

    [Reply]

    Nexus One Hacks Reply:

    This one: http://www.youtube.com/watch?v=jXGHVjO3zUE

    [Reply]

    brad clifton Reply:

    um clearly not

    [Reply]

  74. How to Install Ubuntu on HTC Evo 4G! | HTC Evo 4G Hacks! Says:

    [...] that, you can follow the same steps used here for Nexus One at NexusOneHacks.net. They are exact same files, we just needed to update the kernel to add support for loop devices. [...]

  75. shahid Says:

    I’ve done all the steps as mentioned but when i connect with vnc, it connects with some 4 colors mode. I’ve change the mode to 24bit colors but nothing happened. also icons of ubuntu are not showing in the upper left corner.
    I also noticed that in the video the vnc viewer showing some ZRLE encoding but mine does not have ZRLE encoding.. Any suggestion ??

    [Reply]

  76. x0r0x Says:

    great idea !
    but , a version of Backtrack would be greater !!!!

    [Reply]

  77. nndsccg87 Says:

    Hi,

    I think i must be missing a step here. I was able to run through this fine twice and get things working. The problem is as soon as i reboot my phone and try to run bootubuntu i get an error message “chroot:can’t execute ‘?bin/bash’: No such file or directory” “shutting down ubuntu”

    Is there a step i missed? I can exit out of ubuntu and restart as many times as it want .. untill i reboot the phone…

    Im somewhat lost here but LOVE this idea.

    [Reply]

  78. האנדרואיד מגביל אתכם? תריצו Ubuntu על Nexus One Says:

    [...] לאנשי הקוד הפתוח, ה-Nexus One, הופך לאהוד עוד יותר, הודות ל-NexusOneHacks, מעכשיו תוכלו גם אתם להריץ על הנקסוס שלכם את מערכת [...]

  79. Google Nexus One Gets Ubuntu-ed Says:

    [...] is here! Geeky folks (one geeky folk, to be precise) from a rather ominously named blog called nexus one hacks has posted a rather longish video that can potentially help you port Ubuntu on to your highly [...]

  80. Ubuntu auf dem Nexus One/Android - funrecycler Says:

    [...] man es wirklich braucht? Ist ein sportlicher Anreiz, aber seht selbst. Das How To ist gleich mit [...]

  81. Video: Ubuntu running on a Nexus One Says:

    [...] Keen to give it a whirl? Full instructions (and another video) are available at Nexus One Hacks. [...]

  82. shahdi Says:

    CAN ANYONE PLZ TELL ME HOW TO SHUTDOWN THE UBUNTU ?????

    [Reply]

  83. 智能手机 | 桌面变移动 Ubuntu塞入Nexus One手机 | SmartCellPhone Says:

    [...] 安装教程地址:http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/ [...]

  84. Slava Says:

    This should be made in to an Android app with full automation :)
    I am getting

    #bootubuntu
    mknod: /dev/loop2: File exists
    mount: can’t setup loop device: No such file or directory

    on my N1 running CM6 nightly (july 9 build)

    [Reply]

    Slava Reply:

    I examined ubuntu.sh abit and commented out #clear commands to see what is going on.
    here is what I get:

    # sh ./ubuntu.sh
    modprobe: module ‘ext2′ not found
    mkdir failed for /data/local/mnt, File exists
    ..

    [Reply]

  85. Installare Ubuntu su HTC Nexus One: video dimostrativo e tutorial Says:

    [...] Il video comunque è abbastanza esplicativo, mentre per il tutorial potete leggere questa guida. [...]

  86. Mabo_c Says:

    first thx for hard-working and very nice work done!
    And I totally succeed install the ubuntu in my N1.
    (but spend some times at that mistake-bootubuntu)

    I have some doubt to ask. Thank you for answering if you really have time.
    Because I am a noob of linux & android.

    1.I don’t know how to switch off the ubuntu. No matter I type poweroff in system or console, it it not work. No matter I kill all the task( terminal and vncserver) ubuntu is there,nothing changed. Except I reboot the N1 and su, bootubuntu,again!

    2.I don’t remember in which step, I saw the ubuntu originarl UI like ur video. But after
    reboot it is change to that LXDE. Really if I can choose, I wanna that “ubuntu UI”.

    3.If I work a little fast, the system turn to not working! I click any app is no response and cpu is normal. First time I opened the firefox used like 1 minutes.
    What I mean is the system is really easy to crash,stay there do nothhing,cpu keep normal.

    4.And for keyboard from vncserver not so good, sort of symbol cant work. But use send text(in the menu) can fix this problem.

    [Reply]

  87. BrandonG777 Says:

    Fail on CM6alpha1

    # modprobe ext2
    modprobe: chdir(2.6.34-cyanogenmod): No such file or directory

    [Reply]

  88. alecaldi Says:

    Hi, I got this message after bootubuntu command. I have a motorola milestone for Android 2.1 Personal (Argentina)- May a different device be a problem? or it’s just (as it seems) to be a problem of permissions. I went to /dev and there’s no /loop2 file or whatsoever. And don’t know what can set LOOP_SET_FD to fail due to be busy.

    Any help would be great. Thanks.

    mknod: /dev/loop2: File exists
    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

    [Reply]

  89. Scott Says:

    I’m going to try this on a HTC Magic, I’m not sure if it will work very well because it’s a fairly low spec Android handset. I’ll post back my results, just in case any one is curious.

    Also, as a side note: the android.zip that I download, are the sources available anywhere? I’m always cautious about installing stuff that I can’t get the source for ;)

    Cheers guys!

    [Reply]

  90. n8taylor369 Says:

    I wonder if I can use this method to put my build of Chromium OS on my phone… HMMMMM, I am off to try!

    Great work on this by the way!!!

    [Reply]

    Wes Campbell Reply:

    any luck with this?

    [Reply]

  91. Ubuntu instalado en Nexus One : Noticias2D Says:

    [...] vez ha sido el editor de NexusOneHacks que se ha permitido a colgar el manual en su web para la disponibilidad de cualquier [...]

  92. Ubuntu joins Android on Nexus One, apocalyptic repercussions nowhere to be found | eBook Top Readers Says:

    [...]  |  Nexus One Hacks  | Email [...]

  93. gofike Says:

    How to configure wi-fi connection? / Etc / network / interfaces – not
    —————
    google tranlate

    [Reply]

  94. Video: Ubuntu running on a Nexus One | iPhone 4 | iPhone | iPhone Review | iPad | iPod | iTunes Says:

    [...] Keen to give it a whirl? Full instructions (and another video) are available at Nexus One Hacks. [...]

  95. Instalar Ubuntu en el Nexus One Says:

    [...] ayudarte a realizar el hack, en NexusOneHacks han subido un video completo que sirve como guía y muestra de su [...]

  96. awakecoding Says:

    is there a way to cleanly “shutdown” ubuntu after booting it with the script?

    [Reply]

  97. zacthespack Says:

    Has anyone tried this on the HTC Magic (32b)? im downloading it and going to give it a try but both download links are so slow :( once i have downloaded it however i will most likely stick it on a torrent if there isnt already one, if thats ok with you

    [Reply]

    zacthespack Reply:

    Ok well its just going to slow i gave up and im going to bed, but in the morning i will download it and post a torrent if there still isnt one by then

    [Reply]

  98. Ben Says:

    I’ve got corruption on my ubuntu.img.

    How do I fsck the loop mount system??

    [Reply]

  99. gofike Says:

    Configuring wi-fi??? Help please :-( I can not update packages…

    [Reply]

  100. gofike Says:

    Configuring wi-fi??? Help please :-( I can not update packages !

    [Reply]

  101. How to Install Ubuntu Linux on Your Android Phone: Nexus One or HTC Evo 4G - Android | Android phone | Android apps - Cute Android Says:

    [...] on your Android phone means that you can run native Ubuntu/linux applications off your phone! Now Nexus One Hacks blog shows that How to Install Ubuntu Linux on Your Android Phone: Nexus One, HTC Evo 4G or any other [...]

  102. Jack Says:

    What a downer. Why can’t anyone port something kewl like Windows vista to the Nexus One? What’s the use of all this linux crap, it can’t run exes and cool stuff like VLC player.

    Lame :(

    [Reply]

    Wes Campbell Reply:

    do you know what youre saying?? vista?!? linux is the ultimate computing OS. its what android is. vista is crap compared to this. compared to anything actually. :P

    [Reply]

    Ari Reply:

    VLC does run on linux. What’s more, it is free and open source software like GNU linux, not proprietary like microsoft products

    [Reply]

    Linux-Guy Reply:

    Are you Joking Ari? You must be the stupidest person in the world. Sell your google phone and go get a crappy blackberry and then come back here and tell us how great “Windows” is. Vista was the shortest lived Windows OS because it was a piece of crap. Only retarded people would want to crap all over their Android phone.

    [Reply]

  103. Nexus One dual-boot: Android y Ubuntu Says:

    [...] NexusOneHacks Comparte este [...]

  104. RichieDaze Says:

    Which distro version of ubuntu is this?

    [Reply]

  105. Ubuntu corriendo sobre el Nexus One : Fandroid Says:

    [...] Nexus One Hacks Categories: Android, Nexus [...]

  106. Ubuntu sul Google Nexus One: non è uno scherzo (video) | TUXJournal.net Says:

    [...] marchiato Google, addirittura in dual-boot con Android 2.2. Gli autori hanno anche scritto una guida molto ben dettagliata su come installare il sistema operativo Canonical sul dispositivo. Una volta [...]

  107. eleven Says:

    Hi, I’m a Chinese blogger. can I translate this article to Chinese?? I’ll keep your link.
    thanks.

    [Reply]

  108. charley Says:

    hey

    trying to get backtrack working on my x10
    need advice

    thanks charley

    [Reply]

  109. Ubuntu en un Nexus One | Developing Frogtek Says:

    [...] link hará las delicias de nuestro particular Linuxero Jose. Por lo visto hay alguien que se ha dedicado [...]

  110. Darragh Says:

    Still can’t get it to work either sadly, even with the updated bootubuntu.
    I keep getting the can’t find /bin/bash. Looking back through the output I can see that there are previous errors, starting from not being able to hit loop1.
    I tried what another poster suggested, switching to loop5, but this didn’t work either…

    Any suggestions?

    [Reply]

    Michael Reply:

    how do you switch loop1 to loop5?

    [Reply]

  111. gotthard Says:

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

    Shutting down Ubuntu
    failed.
    failed.
    failed.
    failed.

    Also having this problem

    [Reply]

  112. Wes Campbell Says:

    I know it says “…/Android phone!” but does this work on the Moto Droid A855?

    [Reply]

  113. JohnQ Says:

    sucessfully installed on HTC DESIRE.

    user from China

    JohnQ

    [Reply]

  114. Labby_co_uk Says:

    Great article, but do we really need to run vncserver as root or can the passwd for user “ubuntu” be changed?

    I am having child spawning problems when I attempt to run xterm which may be connected to running as root.

    [Reply]

  115. ScottRTL Says:

    Is anyone else geting the error “umount: can’t umount /data/local/ubuntu: Device or resource busy”

    Then when you try to bootubuntu again, it doesnt work?

    [Reply]

    ScottRTL Reply:

    I tried exiting VNC and umount again, but I get the same error… also cant shutdown ubuntu fron the VNC client….

    [Reply]

  116. Ari Says:

    I want to buy a nexus one that works with ubuntu. I see some people with a certain model are having trouble. Which kind should I buy?

    [Reply]

  117. Will Shackleton Says:

    I managed to get this to work on Cyanogenmod 6.0 (Android 2.2 Froyo) by chrooting Ubuntu straight off the SD card on a separate partition. I think that 2.2 just doesn’t work with loopback devices for some reason.
    Anyway, the process to do this is fairly simple, and requires a Linux computer:

    Create an UNFORMATTED partition of about 2.3GB at the END of your SD card. I would advise people to use GParted, since it is easy to use.
    Copy the ubuntu.img disk image to this new unformatted partition:
    [code]
    sudo dd if=ubuntu.img of=/dev/sdb2
    [/code]
    Make sure to get the right partition (/dev/sdb2), or you may mess up your computer/SD Card very badly! GParted lists the partition names when you partition the card.
    Resize the partition to about 2.4GB with GParted to allow the ext2 filesystem to fill the partition.

    Now, use the following bootubuntu file:
    [code]
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
    export kit=/sdcard/ubuntu
    export bin=/system/bin
    export mnt=/data/local/ubuntu

    export PATH=:/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin

    export TERM=linux
    export HOME=/root

    echo "Mounting drive..."
    mount /dev/block/mmcblk0p2 $mnt

    echo "Mounting /dev/pts..."
    mount -t devpts devpts $mnt/dev/pts
    echo "Mounting /proc..."
    mount -t proc proc $mnt/proc
    echo "Mounting /sys..."
    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 "Loading Ubuntu"
    echo " "

    chroot $mnt /bin/bash

    echo " "

    echo "Unmounting Ubuntu..."
    umount $mnt/dev/pts
    umount $mnt/proc
    umount $mnt/sys
    umount $mnt
    echo "Done!"
    [/code]

    WARNING: this is only for experts, and is only a guideline for what to do!

    [Reply]

    DaleW Reply:

    What is the purpose of resizing the partition after the Ubuntu image is copied?

    [Reply]

    Nexus One Hacks Reply:

    So, the partition has enough room to install software.

    [Reply]

  118. NSCXP2005 Says:

    Would this be able to work on the HTC Hero? That would be so amazing if it could work.

    [Reply]

  119. Michael Says:

    i think the problem is with the loop1 i’m trying to switch to loop5 but i don’t know how.
    any help is appreciated
    thanks in advance

    [Reply]

  120. mark80 Says:

    Hey guys im trying this on a rooted lg gw620 tried both bootubuntu with loop5 and the original one and im always getting the

    # bootubuntu to chroot
    bootubuntu to chroot
    mknod: /dev/loop5: 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/loop5: No such device or address

    Then again maybe is just me wishing to run it on my cupcake… Pls. Share your thoughts.

    [Reply]

    brian Reply:

    Did you remember step 4?

    >4. Before we go any further, make sure to “Turn off USB storage” on your phone so we can access the >SD card from ADB Shell. Let’s also make sure your USB Debugging mode is checked under >Settings->Applications->Development. (And yes, don’t forget to connect your Nexus One/Android >phone to your computer via USB!)

    If you forgot that then the file system will probably already be busy and prevent the Mount.

    [Reply]

  121. Подкаст об Ubuntu: Выпуск #6 — Ехидный единорог | Мир Ubuntu Says:

    [...] Ubuntu везде: HTC HD2, Google Nexus One, HTC Evo 4G — AndroidU1 — Canonical обучает — Ещё про Центр [...]

  122. Ubuntu su Google Nexus One | Blog | recomputer.it Says:

    [...] NexusOneHacks potrete trovare un tutorial dettagliato per installare ubuntu sul vostro N1, mentre dopo il salto [...]

  123. Michael Says:

    this is what i get on my nexus one:

    # 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

    [Reply]

    brian Reply:

    Did you remember step 4?

    >4. Before we go any further, make sure to “Turn off USB storage” on your phone so we can access the >SD card from ADB Shell. Let’s also make sure your USB Debugging mode is checked under >Settings->Applications->Development. (And yes, don’t forget to connect your Nexus One/Android >phone to your computer via USB!)

    If you forgot that then the file system will probably already be busy and prevent the Mount.

    [Reply]

  124. Labby_co_uk Says:

    Hi

    I had a little issue with this script – every time “bootubuntu” was run it spawned a new vnc session :1 :2 :3 etc.

    I fixed the issue by changing /root/.bashrc with the following:
    vncserver :0 -geometry 1024×800

    Simply by adding the :0 to the line vncserver will only spawn one session, failing if :0 is already running thus preventing multiple sessions.

    Another issue I am having is that
    vncserver -geometry 1024×800
    the × in that line is not a standard x (compare the following line):
    ×x

    The x in your instructions above needs to be replaced with a standard x rather than a unicode character

    [Reply]

    Linux-Guy Reply:

    YOU ARE TOTALLY AWESOME! Everyone… I have wasted much time figuring this out for an Evo OTA 1.47.651.1. I followed all the steps and made SURE to use the new bootubuntu file during a fresh install of Ubuntu. Labby co uk gave me the info to fix the issue where VNC Droid was not finding the Desktop. Basically like he says “I fixed the issue by changing /root/.bashrc with the following:
    vncserver :0 -geometry 1024×800″

    &

    “Another issue I am having is that
    vncserver -geometry 1024×800
    the × in that line is not a standard x (compare the following line):
    ×x”

    Fixed the issue also… When you set up your VNC client it should look like this.

    Port: 5900 and Address: localhost — Also be sure to enter your password.

    Enjoy! Thanks Everyone! I will post when I get Backtrack up and running! Or at leaster ettercap.. XD

    [Reply]

  125. Ubuntu Ported To Nexus One - HTC – Windows Phone – Android – iPhone – News - Smartphone News Says:

    [...] UPDATE: I’ve posted full step-by-step guide on how to install Ubuntu and X11 on your Nexus One… [...]

  126. Tom Says:

    woo! works since most recent updated bootubuntu!

    i love you.

    [Reply]

  127. bernard Says:

    works well except keyboard mapping issues when using vnc from my mac to the nexus
    keyboard mapping is all over the place

    [Reply]

  128. Jesse Says:

    For people this is working for: are you using Froyo?

    [Reply]

  129. Nexus One gets Ubuntu install [Video] | TechsZone Says:

    [...] releases of Android 2.x, but it’s also one of the first to get a usable install of Ubuntu.  NexusOneHacks have a massively comprehensive tutorial showing how to get the usually desktop-bound OS onto the [...]

  130. BebeN Says:

    Новый скандал произошел 4 августа в сплетнях отечественной светской компании. На одном из интернет-ресурсов были опубликованы фото голой Дарьи Сагаловой, на которых можно увидеть все прелести звезды. Сама же актриса отрицает подлинность существования этих снимков, называя их бездарной подделкой. Сам сайт голые знаменитости пестрит различными фотографиями знаменитостей, возможно, что это обычный пиар и не более.

    [Reply]

  131. Zonesan Says:

    Hi all,
    I just installed ubuntu on my nexus one with froyo successfully.
    if you met a error while running bootubuntu and it says /dev/loop1 is busy, I sugguest tha you use this bootubuntu, and would this blog writer update the file? The reason of error is because some other apps are using /dev/blick/loop1. so we change to another block device, I create a new node that minor number is less than 255 but bigger than 200, and named it to ubuntu. you can see what changed in bootubuntu script.
    Enjoy yourself!

    Here is new bootubuntu:

    #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/loop1 b 7 0
    mknod /dev/block/ubuntu b 7 200
    losetup /dev/block/ubuntu /sdcard/ubuntu/ubuntu.img
    mount -t ext2 /dev/block/ubuntu /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/block/ubuntu

    [Reply]

  132. Zonesan Says:

    Hi All,
    you may also download this bootubuntu file via https://zoobook.org/bootubuntu
    busybox installer is avaliable in app market. current version is 1.17.

    [Reply]

    niematunikogo Reply:

    Zonesan: fantastic! it works, thank You!
    Also great thanks to author of this “hack”

    [Reply]

    hayanbom Reply:

    thx.. Zonesan . I’ll try it again . =)

    [Reply]

  133. niematunikogo Says:

    how to change lxde to classic gnome?

    [Reply]

  134. hayanbom Says:

    to Zonesan : i just run the your bootubuntu script . but i received error message as below.

    ” failed: No such file or directoryk3 on /system
    bootubuntu 40 : Syntax error: end of file unexpected (expecting “then”) ”

    what’s wrong ? I’m using the CM6 N1 RC2 ROM .

    thx.

    [Reply]

    Zonesan Reply:

    Hi hayanbom,

    I’m not sure if your bootubuntu script is integrated. You can download it again and retry.

    [Reply]

    hayanbom Reply:

    thx for answer Zonesan . I’ll try it again . =)

    [Reply]

  135. alvinx Says:

    It worked on my Milestone at the 1st try.
    But I missed installing lxde so I only could connect to an empty xsession.
    The I installed lxde (apt-get install lxde), the command installed some software-packages but apt-get did not finish and stopped at a certain point, my phone just showed a black screen without reacting anymore… so I disconnected the usb-connection to my phone and pulled the battery to reboot my Milestone.
    When rebooting it reacts kind of laggy, it takes very long to populate the android home-menu (where the apps are shown), after a while all is loaded and it seems fine.
    But when I connect with adb shell now, I am already root (# at the beginning), I don’t need to type “su” to get root anymore… the same when I connect locally on the phone via Connectbot, I am already root now.
    Rebooting or shutting down the phone does not change the situation.
    It seems to be root on any shell permanently.

    What happened here ? Any ideas ?
    How can I get rid of this “permanent root shell” now ?
    I fear that I have to wipe my phone or even reflash the rom to get to the previous state :/

    Any hints highly appreciated !

    Cheers alvinx

    [Reply]

    alvinx Reply:

    Now I did a wipe factory reset and now my phone does not boot anymore, there’s a boot loop now… DAMN !
    Where’s my nandroid backup… ;(

    [Reply]

  136. Coralic » Creating chroot for arm on Ubuntu with rootstock Says:

    [...] always there are people I would like to give credits to, and this time it’s Nexus One Hacks. var a2a_config = a2a_config || {}; a2a_config.linkname="Creating chroot for arm on Ubuntu with [...]

  137. Seth Says:

    Hi Max, author

    I’m not sure you noticed: in the end of the demo vid you are actually running 3 simultaneous desktop sessions at once (:1, :2 and :3). That is pretty awesome considering the speed

    I didn’t think you noticed, because you kept connecting back to the first session (:1 on port 5901) each time with the Android VNC viewer. That should have been port 5902 and 5903 respectively to really test whether that .bashrc mod worked

    $0.02

    [Reply]

  138. Darkmonkey21 Says:

    I have tried all bootubunt files and fixes and i am still getting errors either chroot: can’t execute ‘/bin/bash’: No such file or directory or a if then error someone please help

    [Reply]

  139. Alien Says:

    Would be possible to port this on the Samsung i9000 Galaxy S?
    I´m trying this now. I think, that I will get the drivers problems.
    So could you make this for this phone too?

    [Reply]

  140. Derek Says:

    I have everything working except the lxde does not look like the gnome desktop. It looks like the lxde style desktop. The first time I followed your instructions it looked like the gnome desktop, however a reboot caused it to switch to the lxde look and I can not get back the gnome styling.

    Also for any of you wondering if this works on the incredible, it does. I followed this guide but used it on my incredible running Cyanogen 6 RC3 and have to say it runs amazingly well. I did not have to change the kernel as Cyanogen’s rom has a modified kernel in it with loopback devices enabled.

    [Reply]

  141. Jeffrey Hatley Says:

    I know that this is for the N1 but I have a DINC and was told by more than one person that I can use these steps to install it on that but I get this error when I try to run the install file.
    I am running the CyanogenMod 6 RC3 with the 2.6.32.15-g936g68g kernal. I am fully rooted and have S-off. Any help would be appreciated.

    # sh ubuntu.sh
    sh ubuntu.sh
    modprobe: chdir(/lib/modules): No such file or directory
    ←[H←[Jmkdir failed for /data/local/mnt, File exists
    ←[H←[Jrm: invalid option -- /
    BusyBox v1.18.0.git (2010-08-11 01:17:17 CDT) multi-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: Value too large for defined data type
    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’

    [Reply]

    Gilbert Reply:

    have you got it to work? i have the same problem with cm6 rc3

    [Reply]

  142. sma007 Says:

    i am getting the error with me x10i android any help please

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

    [Reply]

    messa Reply:

    are u using a droid x as i have the same responce

    [Reply]

  143. credentiality Says:

    I stripped down your disk image and upgraded it to Lucid. Got it down to 72MB! Check it out:
    http://code.google.com/p/android-cruft/wiki/LucidWithAndroid

    [Reply]

    tryagain Reply:

    Nice work! my preferred method for sure, THANKS!

    [Reply]

  144. I've got Ubuntu on the PDN. Says:

    [...] it will be a little smoother, but I doubt it. If anyone is wanting to try this, I used this guide: How to Install Ubuntu on Your Nexus One/Android! The most important thing, do not use the ubuntu.sh, it changes some permissions in /system/bin. [...]

  145. Me Says:

    Anyone had any luck with getting Backtrack working? I have this working on my HTC Desire, don’t know if it supports Packet Injection though

    [Reply]

  146. tryagain Says:

    How would I resize the ubuntu.img? I ask because the .img size is not allowing me to:
    do-release-upgrade -d

    Does this .img otherwise autoexpand when packages are installed? I haven’t tried yet, trying to update and fix the vnc keyboard mapping issue. Great work so far.

    [Reply]

  147. Come installare Ubuntu sul Nexus One? « Flaviusso & La Scaricata Says:

    [...] Allora per trovare la guida completa cliccate qui. [...]

Leave a Reply

Featured Sites from Our Network