1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Booting Ubuntu on DROID?

Discussion in 'Android Hacks and Help' started by surfbuckeyesbc, Jul 8, 2010.

  1. surfbuckeyesbc
    Offline

    surfbuckeyesbc New Member

    Joined:
    Jun 5, 2010
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Ohio
    Hey guys! I followed the link below and tried to see if I could get Ubuntu running through VNC on my Droid, as this guy was able to do on his N1. I know that the phones have differences, and unfortunately, I got to the "bootubuntu" part before it said it couldn't load, that my device was busy.

    I am assuming that it just isn't working on the Droid, as the dev himself said it wasn't working on the Evo, but I was wondering if any of you wonderful Devs here at the forum have tried to do something similar on Droid. This would be awesome and HUGE geek points. Fingers crossed! Let me know if I can assist in anyway.
  2. Dave12308
    Offline

    Dave12308 New Member

    Joined:
    Nov 15, 2009
    Messages:
    3,269
    Likes Received:
    50
    Trophy Points:
    0
    I know there used to be a post on the old Alldroid on how to install Debian on your DROID, but sadly all of that content is gone. It didn't mention Ubuntu, but it should be possible. I know it was supposedly a pretty finicky process, for one thing you had to have a minimum of ext2 enabled in your kernel or loaded as a module. I will search around and see if I can find an archived copy.
  3. manny83
    Offline

    manny83 New Member

    Joined:
    Jul 9, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    I am also interested in a Moto Droid version of it. I got interested after reading this site: http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/. I also tried this Nexus One version and it doesn't work on the Droid (It's probably not supposed to anyway). I attached the output that shows all the error messages.


    Basically it also says that the device is busy. It looks like it starts to fail at this part of bootubuntu, or before:

    mknod: /dev/loop1: File exists
    losetup: /dev/block/loop1
    mount: No such device

    I don't understand any of that. For what it's worth, I found this while searching around for a way to make it work: http://www.droidforums.net/forum/droid-development/46838-debian-instructions-missing.html which lead to Debian fully working on the Motorola Droid! Included is an ext2.ko module for those of us running stock kernels that lack ext2fs support. (I will provide support in comments.) : Android which lead to Google Translate.
    Last edited: Jul 9, 2010
  4. crabs
    Offline

    crabs New Member

    Joined:
    Jun 15, 2010
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    0
    MKAYYYY.

    I also boot ubuntu with chevys kernel so your in luck.

    Get the ext2.zip from here Index of /froyo/4.3/kernels

    and rename it update.zip and flash it.

    Then boot back up and go to the terminal emulator and type
    "su"
    press enter
    "/system/xbin/chevyno1/ext2"
    enter again
    "cd /sdcard/ubuntu"
    ENTER
    "sh ./ubuntu.sh"
    Enter
    "bootubuntu"

    The reason you got the errors is because it couldn't mount the ext2 ubuntu image without a ext2 kernel module.\



    Same for you manny.
    How in the hell would it be limited to the nexus one anyway?
    Debian, ubuntu, etc in chroot will work on any android phone providing the kernel has the ex2 module.
    Last edited: Jul 9, 2010
  5. mrh4tch3t
    Offline

    mrh4tch3t New Member

    Joined:
    Jul 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    tried with no success

    hello. i came across this forum and tried what you said. but still have no luck getting it to run on my moto droid. just wanted to know if either of you actually got it to work on your moto droid
  6. crabs
    Offline

    crabs New Member

    Joined:
    Jun 15, 2010
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    0
  7. titans
    Offline

    titans Premium Member Premium Member

    Joined:
    Dec 3, 2009
    Messages:
    2,664
    Likes Received:
    0
    Trophy Points:
    0
    That looked like the blue scren of death at first =)
  8. manny83
    Offline

    manny83 New Member

    Joined:
    Jul 9, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for all the help! I will try it. But first, I have Bugless Beast v0.4 froyo. I have no clue what kernel I have. Can I just flash chevy's kernel from Rom Manager on top of what I have? I'm making a backup just in case before I try it.
  9. manny83
    Offline

    manny83 New Member

    Joined:
    Jul 9, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    By the way, my kernel version says:

    2.6.32.9-g103d848
    Android-build@apa26 #1
  10. wuyanks
    Offline

    wuyanks DF News Team Premium Member

    Joined:
    Nov 6, 2009
    Messages:
    2,390
    Likes Received:
    0
    Trophy Points:
    0
    can someone put together some instructions on how to do this, from beginning to end? :)
  11. manny83
    Offline

    manny83 New Member

    Joined:
    Jul 9, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    I went ahead and installed the ext2 module by using the update.zip file (renamed from ext2.zip). On my current kernel. I tried running the ubuntu install script. The output looked the same. Ran bootubuntu and its output was the same as before too.

    Then I flashed chevy1's 1ghz LV kernel and tried to install and boot ubuntu again. That didn't work either. I did not wipe cache and data when flashing the kernel.

    Should I just go ahead and install simply stunning 4.4? Would that make a difference?

    I don't have an ext2 partition on my SD card. Is that what I overlooked? Dammit, lol. I'm going to keep trying.
  12. surfbuckeyesbc
    Offline

    surfbuckeyesbc New Member

    Joined:
    Jun 5, 2010
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Ohio
    If i'm installing via CW, i can just install from SD and not rename update.zip correct? And its my thoughts that this is an extension file that goes on TOP of your existing chevy kernel, is that also correct assumption? And then one we get to bootubuntu, we just follow the rest of the video's steps to be able to boot on the go without being adb-ed in?
  13. manny83
    Offline

    manny83 New Member

    Joined:
    Jul 9, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    I used CW and reapplied the update.zip. It looked like it took it but I don't know. I type modprobe ext2 and it says no such file or directory.

    I'm still getting the same error. I'm going to create an ext2 partition on my sd card when I get home from work. The install script may be looking for a partition to write to.

    I'm using connectbot to run the commands locally instead of adb, since I'm at work. But I can't just back up my sd card here.
  14. surfbuckeyesbc
    Offline

    surfbuckeyesbc New Member

    Joined:
    Jun 5, 2010
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Ohio
    Yah, it was a no-go for me as well. Does that mean we need to reformat our cards?
  15. manny83
    Offline

    manny83 New Member

    Joined:
    Jul 9, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    I'm no expert at this stuff (as you can probably tell), but what I'm going to do is back up my sd card, format it, then use the "partition sd card" option in rom manager, the one we use to enable apps2sd by creating a hidden ext2 partition. If I'm right, then I will put the ubuntu folder back in my sd card and try it again. If it works, then I'll put all my stuff back on the card.

    Crabs, can you tell us how you did it, what rom and kernel you have, etc? The video you made was great. Thanks!
  16. surfbuckeyesbc
    Offline

    surfbuckeyesbc New Member

    Joined:
    Jun 5, 2010
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Ohio
    Looks like i might be getting it now
    I will post complete instructions based on all this wonderful input as soon as i have it up and running and tested.
  17. surfbuckeyesbc
    Offline

    surfbuckeyesbc New Member

    Joined:
    Jun 5, 2010
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Ohio
    OK. I got this to work, and it was very cool, but it did slow my Droid down quite a lot, I had a lot of launcher re-draw and other memory related issues, it's possible it would run smoother once it is all settled in, but running a desktop platform on a mobile chipset is doable, but definitely taxing. I am now going to post step by step instructions, WHICH I TAKE NO CREDIT FOR! I have gotten ALLLL of these steps from other great devs and I just merged the different pieces together so its in one post. Thanks to everyone who helped.

    First things first, you MUST BE ROOTED! Secondly, you must have SDK on your PC installed, and have the ability to adb into your Droid from command line. These instructions are for Windows.

    1. Root your droid, set up your SDK and all that jazz. Also, make sure you are using a Chevy kernel, and download the Chevy ext2 file and flash it. If you are using SPRecovery, rename it to update.zip. If using CW, just flash as a normal ROM. I would backup at this point too. File can be found here, THANKS @CRABS!

    Index of /froyo/4.3/kernels

    Also, make sure you have downloaded Android VNC!! The app can be found here:

    Downloads - android-vnc-viewer - Project Hosting on Google Code

    2. Download the ubuntu boot pack to your PC. I am going to upload an updated version of NexusOneHack's docs that has the working bootubuntu file updated in the zip so you don't have to do it manually. This will be in my next post... i am uploading to Megaupload as we speak.

    For now, here is the ubuntu zip file and the working ubuntu text file. You will need to download the zip, extract it, then copy the working ubuntu text file into that folder and OVERWRITE the existing one.

    ubuntu.zip on Megaupload
    bootubuntu file here

    I am consolidating into a single updated file but it's taking forever to post to Megaupload.

    3. Move the six files into a folder called "ubuntu" (without "") to the root of your SDCard. You can also just move the entire UN-zipped file there as well. Just make sure it is the ubuntu folder only, which contains six files inside. It will be just over 2 GB.

    4. Unmount your SDcard and enable USB Debugging.

    5. Open command prompt (cmd in the run field for Windows)

    6. Do to your SDK tools directory (i.e. mine was C:\Users\Chris\Desktop\android-sdk_r06-windows\android-sdk-windows\tools) Long i know lol

    cd C:\Users\Chris\Desktop\android-sdk_r06-windows\android-sdk-windows\tools

    7. Run adb shell

    adb shell

    8. Type su, hit enter

    9. Type /system/xbin/chevyno1/ext2, hit enter. This will make sure the file extensions are available for your ubuntu installation.

    10. Type cd /sdcard/ubuntu hit enter

    11. Type sh ./ubuntu.sh hit enter

    12. Type bootubuntu hit enter

    Now you have installed Ubuntu and booted it through the shell, but you do not have ubuntu on the go yet, and to get to the GUI, you need to run some more commands.

    I am not going to start over here with the numbering scheme, but if you're having problems at this point, please re-try the steps and make sure your files are the correct ones.

    First, we need to make sure we have all the files we need to complete the install.

    13. Type apt-get update hit enter

    14. Type apt-get install tightvncserver hit enter

    15. Type apt-get install lxde hit enter

    16. Type export USER=root
    vncserver -geometry 1024x800


    (you can choose your resolution here, just don't make it too small)

    17. Set up an easy to remember password.

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

    then hit Ctrl+D twice and Enter key (will return as ^D^D in command prompt)

    19. Open up Android VNC on your Droid. Enter the password you created and set the port to 5901. Also, set the colors to 24 bit, as this will give you the most colors to choose from and the most detailed screen. HIT CONNECT!

    Give it a few minutes to load but you should now see the ubuntu legendary orange backgroup. Give it a few minutes to boot up and for those who know linux, it should look incredibly familiar.

    Now, we want to be able to boot into ubuntu while not plugged in or using adb on our PCs.

    20. Type:
    cat > front
    export USER=root
    cd /
    rm -r -f tmp
    mkdir tmp
    cd /
    vncserver -geometry 1024x800

    then hit Ctrl+D twice and Enter key (will return as ^D^D in command prompt)

    or whatever resolution you choose.

    21. Type cp temp /root/.bashrc and hit enter

    22. To test it, exit ubuntu and go back into Android shell by typing exit

    23. Boot back in by typing bootubuntu
    NOTE: you can now use your terminal emulator on the Droid by typing
    su
    bootubuntu


    This will give you the ability to run ubuntu on the go, and for you to be able to autostart vnc whenever you type su bootubuntu in the emulator.

    Again, I was NOT NOT NOT the one who did all of this, i got my details from nexusonehacks.net @CRABS in this very thread for the Droid workaround.

    There are alot of good uses for this, and a TON of people who made this possible. I just wanted to put it into an easy to use thread. I AM NOT THIS SMART!
    Last edited: Jul 9, 2010
  18. wuyanks
    Offline

    wuyanks DF News Team Premium Member

    Joined:
    Nov 6, 2009
    Messages:
    2,390
    Likes Received:
    0
    Trophy Points:
    0
    thanks so much for the complete breakdown^^ can't wait to try it later.

    one question, do you think setting up a swap partition would help? i think that was done when devs got debian running on the Droid way back in the day.
  19. surfbuckeyesbc
    Offline

    surfbuckeyesbc New Member

    Joined:
    Jun 5, 2010
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Ohio
    I didn't do anything like that, its possible its embedded somewhere in the code, but following these instructions (granted a few times as little things here and there didn't seem to want to work first run through) i was able to get a functioning, ubuntu desktop. Just ran slow. The swap might speed things up, not sure, because my free mem never dipped below 32 mb even when running VNC and i was still having issues.
  20. wuyanks
    Offline

    wuyanks DF News Team Premium Member

    Joined:
    Nov 6, 2009
    Messages:
    2,390
    Likes Received:
    0
    Trophy Points:
    0
    interesting... well you know all about how Linux handles memory, so it auto-kills stuff once it gets low; that's why it never dropped below 32mb. maybe someone more versed in Linux can answer if swap would help, and how one would go about setting that up :)
Search tags for this page
android backtrack device or resource busy
,
android modprobe: chdir(/system/lib/modules): no such file o
,
backtrack on android can't execute bin/bash
,
backtrack on android ioctl loop set fd failed device or reso
,
chdir or cd droid razr
,
ext2 no such file or directory android
,
modprobe ext2
,
modprobe no such file or directory in android
,
modprobe: chdir(/lib/modules): no such file or directory
,
modprobe: chdir(/lib/modules): no such file or directory in
,
ubuntu for driod razr
,

ubuntu motorola droid

,

ubuntu on motorola droid

,
ubuntu on motorola razr maxx
,
what is modprobe ext2?