• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[DEV] Boot Ubuntu on your HTC Desire HD - WIP

Search This thread

LeeDroid

Recognized Developer
Jan 13, 2007
28,850
45,645
Newton Aycliffe
www.leedroid.co.uk
Ububtu for you HTC Desire HD

In June 2010, XDA zedomax got Ubuntu 9.04 running on Nexus One, tutorial is available at this thread:
http://forum.xda-developers.com/showthread.php?t=718952

[email protected] then continued studying the tutorial and worked out a way to make Ubuntu 9.04 running better, smoother and cause less errors, here's hes post:
http://forum.xda-developers.com/showthread.php?t=815532

Recently HTC_Linux team has released version 0.3 of their Ubuntu image, compare to the original guide provided by zedomax, the v0.3 release is based on the latest Ubuntu 10.10 and is a WIP, V0.4 is currently undergiong testing.

What benefits will you get from running Ubuntu 10.10 on your DHD (at least):
1. Fully functional Linux terminal, with all standard Linux command line utilities
2. Fully functional desktop browser Firefox 3.6.13
3. Ability to compile and run native Linux applications
4. Bunch of graphical Internet and utility applications as shown in the screenshots


As promised, here is a little guide to get Ubuntu Desktop running on you DHD, The image used is a WIP and has been built for use with the HTC HD2. the scripts, from the above threads modified by my self to work with the DHD


Credits:
Thanks to the great XDA-developers community.
Thanks to Zedomax for providing the original tutorial of running Ubuntu on Nexus One.
Thanks to HTC_Linux team for creating the optimised Ubuntu 10.10 image file.


Basic requirements

  • A Rooted HTC Desire HD (Ace)
  • A MicroSD with minimum 3GB free space
  • A Custom kernel wit LoopBack support (I have attatched mine :) )
  • The Below Ubuntu.rar which contains ubuntu.img & the required scripts (modified by my self)
  • An android terminal emulator -from the market
  • Android VNC - from the market
  • If you're using Froyo App2SD, move all your applications which are on SD card back to Internal Storage and ensure FroYo A2SD install location is set to internal(1) by typing #"pm setInstallLocation 1" into your android terminal. If you fail to do so, you won't be able to enter Ubuntu.



How to


1. Extract the Ubuntu.rar that you have just downloaded to an "ubuntu" folder on the root of your SD card.
2. Open your Android Terminal Emulator
3. Type “cd sdcard/ubuntu” (enter)
4. Type su to go to superuser mode
3. Type “sh ubuntu.sh
4. If you see “Type 'bootubuntu' to boot Ubuntu”, then you're almost there!
5. Type “bootubuntu” (enter)
6. You should now see “"[email protected]:/#"” Congratulations! Now you're running Ubuntu 10.10


Whenever you want to enter Ubuntu again, simply cd to the ubuntu directory and type “bootubuntu” (enter) in your Android Terminal.

To properly exit Ubuntu, you must type exit from the Ubuntu terminal.

If your Android terminal application gets killed by Android system (i.e. you lost Ubuntu terminal), you need to go back to Android terminal, type “exit” (enter), that will properly unmount Ubuntu.

Very often you can get “loop device busy” error when exiting from Ubuntu, in that case, type “exit” (enter) multiple times (it's harmless to run the“exit” script multiple times, don't worry). If still you get “loop device busy”error, don't worry, just ignore it.

Loading the GUI :D (Gnome desktop)
1. Install “android-vnc-viewer” from Market (free)
2. Enter Ubuntu terminal
3. Make sure that you have network connection (Wi-fi recommended)
4. type “apt-get update” (enter), and wait till it finishes
5. type “apt-get install tightvncserver” (enter) and answer “y” to the question
6. After you have installed tightvncserver, type “cd /bin” (enter)
7. Type the following commands (all are case-sensitive!):
“cat > x” (enter)
“rm -r -f /tmp” (enter)
“mkdir /tmp” (enter)
“chmod 777 /tmp” (enter)
“export USER=root” (enter)
“export XKL_XMODMAP_DISABLE=1” (enter)
“vncserver -geometry 1024x800” (enter)
(enter)
(At this point you will need to configure "vol-" as Ctrl in Android terminal emulator preferences)
(Now hold volume down and press D on your keypad)
“chmod 777 x” (enter)
8. The above procedure makes a script named “x”, whenever you want to start GUI, you need to type “x” (enter).
Notice that the first time (only the first time) you run “x” script you'll be prompt to enter a password for VNC connection, then you'll be asked whether to create a “view-only” password, since it is not necessary, answer “n” to the question.
9. Start “android-vnc-viewer”, create a new connection with the following settings:
Nickname: (anything you like to identify the connection)
Password: the VNC connection password that you created when ran the “x”script
Address: localhost
Port: 5901
Color format: 24-bit color (4 bpp)
Click “Connect” button, and in about a minute, you'll see your Ubuntu 10.10 desktop!
10. We still need to create one final script called “s”, now go back to your Ubuntu terminal and type:
“cd /bin” (enter)
“cat > s” (enter)
“export USER=root” (enter)
“vncserver -kill :1” (enter)
“vncserver -kill :2” (enter)
“sudo reboot” (enter)
“sudo halt” (enter)
(enter)
(press and hold Vol- & click “D” on keyboard)
“chmod 777 s” (enter)
11. If you have GUI running, you * MUST * type “s” (enter) to stop VNC server before you exit from Ubuntu terminal!
In case that your Android kills your Android Terminal application and you still have VNC server running, do the following steps:
a. Start Android Terminal
b. type “bootubuntu” (enter) to bring back Ubuntu terminal
c. type “s” (enter) to stop VNC server
d. type “exit” (enter) to exit from Ubuntu terminal

Fail to do so you will have problem with VNC connection next time you use it.
What's not currently working in Ubuntu:
1. Sound
2. Some applications may not run (I guess, due to Android memory management mechanism)

A little trick to access SD card from your Ubuntu:
1. Install “SwiFTP” from Market (freeware)
2. Set up FTP server using SwiFTP
3. In Ubuntu, “Places → Connect to Server” then:
Service type: FTP (with login)
Server: localhost
Port: (port number specified in SwiFTP, default is 2121)
Folder: /
User Name: (user name specified in SwiFTP)
Then press “Connect” and enter your password specified in SwiFTP. Now feel free to access your phone's file system!

This is a rough guide for the time being, I will hopefully continue work on this in the future (time permitting of course)

ENJOY!! :D
 

Attachments

  • CAP2011022119421.jpg
    CAP2011022119421.jpg
    32.2 KB · Views: 11,532
  • CAP201102211942.jpg
    CAP201102211942.jpg
    46.1 KB · Views: 9,781
  • CAP201102211945.jpg
    CAP201102211945.jpg
    28.5 KB · Views: 10,224
Last edited:

LeeDroid

Recognized Developer
Jan 13, 2007
28,850
45,645
Newton Aycliffe
www.leedroid.co.uk
It's cool, but a little fiddly..

Would recommend grabbing virtual tracked from the market, makes it a little easier.. I'm egarly awaiting the new .4 image, ill keep yall posted if I hear anything ;)

P s... please help seed the torrent :D

Sent from my LeeDrOiD loaded HTC Desire HD
 

leith51

Senior Member
Feb 23, 2009
3,677
771
downloading now will seed as soon as it has

finished downloading now seeding not to fast though 5kb/s
 
Last edited:

robE9

Senior Member
Dec 7, 2010
214
18
Hm, weird...everything is fine until i write bootubuntu after i get a wall of text with many errors consisting of "Device or resource busy" for example "mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: device or resource busy"

or

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

any ideea?
 

Phily757

Senior Member
Jan 6, 2010
320
18
Stuttgart
"exit" wont work. Your file is named "exitu" ;)

one other question...i had ubuntu launched, but then i messed up with the CTRL and so on, tried to "exit" ubuntu, rebootet phone, but now i cant "bootubuntu" gives me the error " cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent" and two other directories
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    Ububtu for you HTC Desire HD

    In June 2010, XDA zedomax got Ubuntu 9.04 running on Nexus One, tutorial is available at this thread:
    http://forum.xda-developers.com/showthread.php?t=718952

    [email protected] then continued studying the tutorial and worked out a way to make Ubuntu 9.04 running better, smoother and cause less errors, here's hes post:
    http://forum.xda-developers.com/showthread.php?t=815532

    Recently HTC_Linux team has released version 0.3 of their Ubuntu image, compare to the original guide provided by zedomax, the v0.3 release is based on the latest Ubuntu 10.10 and is a WIP, V0.4 is currently undergiong testing.

    What benefits will you get from running Ubuntu 10.10 on your DHD (at least):
    1. Fully functional Linux terminal, with all standard Linux command line utilities
    2. Fully functional desktop browser Firefox 3.6.13
    3. Ability to compile and run native Linux applications
    4. Bunch of graphical Internet and utility applications as shown in the screenshots


    As promised, here is a little guide to get Ubuntu Desktop running on you DHD, The image used is a WIP and has been built for use with the HTC HD2. the scripts, from the above threads modified by my self to work with the DHD


    Credits:
    Thanks to the great XDA-developers community.
    Thanks to Zedomax for providing the original tutorial of running Ubuntu on Nexus One.
    Thanks to HTC_Linux team for creating the optimised Ubuntu 10.10 image file.


    Basic requirements

    • A Rooted HTC Desire HD (Ace)
    • A MicroSD with minimum 3GB free space
    • A Custom kernel wit LoopBack support (I have attatched mine :) )
    • The Below Ubuntu.rar which contains ubuntu.img & the required scripts (modified by my self)
    • An android terminal emulator -from the market
    • Android VNC - from the market
    • If you're using Froyo App2SD, move all your applications which are on SD card back to Internal Storage and ensure FroYo A2SD install location is set to internal(1) by typing #"pm setInstallLocation 1" into your android terminal. If you fail to do so, you won't be able to enter Ubuntu.



    How to


    1. Extract the Ubuntu.rar that you have just downloaded to an "ubuntu" folder on the root of your SD card.
    2. Open your Android Terminal Emulator
    3. Type “cd sdcard/ubuntu” (enter)
    4. Type su to go to superuser mode
    3. Type “sh ubuntu.sh
    4. If you see “Type 'bootubuntu' to boot Ubuntu”, then you're almost there!
    5. Type “bootubuntu” (enter)
    6. You should now see “"[email protected]:/#"” Congratulations! Now you're running Ubuntu 10.10


    Whenever you want to enter Ubuntu again, simply cd to the ubuntu directory and type “bootubuntu” (enter) in your Android Terminal.

    To properly exit Ubuntu, you must type exit from the Ubuntu terminal.

    If your Android terminal application gets killed by Android system (i.e. you lost Ubuntu terminal), you need to go back to Android terminal, type “exit” (enter), that will properly unmount Ubuntu.

    Very often you can get “loop device busy” error when exiting from Ubuntu, in that case, type “exit” (enter) multiple times (it's harmless to run the“exit” script multiple times, don't worry). If still you get “loop device busy”error, don't worry, just ignore it.

    Loading the GUI :D (Gnome desktop)
    1. Install “android-vnc-viewer” from Market (free)
    2. Enter Ubuntu terminal
    3. Make sure that you have network connection (Wi-fi recommended)
    4. type “apt-get update” (enter), and wait till it finishes
    5. type “apt-get install tightvncserver” (enter) and answer “y” to the question
    6. After you have installed tightvncserver, type “cd /bin” (enter)
    7. Type the following commands (all are case-sensitive!):
    “cat > x” (enter)
    “rm -r -f /tmp” (enter)
    “mkdir /tmp” (enter)
    “chmod 777 /tmp” (enter)
    “export USER=root” (enter)
    “export XKL_XMODMAP_DISABLE=1” (enter)
    “vncserver -geometry 1024x800” (enter)
    (enter)
    (At this point you will need to configure "vol-" as Ctrl in Android terminal emulator preferences)
    (Now hold volume down and press D on your keypad)
    “chmod 777 x” (enter)
    8. The above procedure makes a script named “x”, whenever you want to start GUI, you need to type “x” (enter).
    Notice that the first time (only the first time) you run “x” script you'll be prompt to enter a password for VNC connection, then you'll be asked whether to create a “view-only” password, since it is not necessary, answer “n” to the question.
    9. Start “android-vnc-viewer”, create a new connection with the following settings:
    Nickname: (anything you like to identify the connection)
    Password: the VNC connection password that you created when ran the “x”script
    Address: localhost
    Port: 5901
    Color format: 24-bit color (4 bpp)
    Click “Connect” button, and in about a minute, you'll see your Ubuntu 10.10 desktop!
    10. We still need to create one final script called “s”, now go back to your Ubuntu terminal and type:
    “cd /bin” (enter)
    “cat > s” (enter)
    “export USER=root” (enter)
    “vncserver -kill :1” (enter)
    “vncserver -kill :2” (enter)
    “sudo reboot” (enter)
    “sudo halt” (enter)
    (enter)
    (press and hold Vol- & click “D” on keyboard)
    “chmod 777 s” (enter)
    11. If you have GUI running, you * MUST * type “s” (enter) to stop VNC server before you exit from Ubuntu terminal!
    In case that your Android kills your Android Terminal application and you still have VNC server running, do the following steps:
    a. Start Android Terminal
    b. type “bootubuntu” (enter) to bring back Ubuntu terminal
    c. type “s” (enter) to stop VNC server
    d. type “exit” (enter) to exit from Ubuntu terminal

    Fail to do so you will have problem with VNC connection next time you use it.
    What's not currently working in Ubuntu:
    1. Sound
    2. Some applications may not run (I guess, due to Android memory management mechanism)

    A little trick to access SD card from your Ubuntu:
    1. Install “SwiFTP” from Market (freeware)
    2. Set up FTP server using SwiFTP
    3. In Ubuntu, “Places → Connect to Server” then:
    Service type: FTP (with login)
    Server: localhost
    Port: (port number specified in SwiFTP, default is 2121)
    Folder: /
    User Name: (user name specified in SwiFTP)
    Then press “Connect” and enter your password specified in SwiFTP. Now feel free to access your phone's file system!

    This is a rough guide for the time being, I will hopefully continue work on this in the future (time permitting of course)

    ENJOY!! :D
    3
    So much hard
    No easy way?

    Sent from my HTC Desire HD using Tapatalk 2
    3
    Chroot?
    What's it?
    Please say more about it.
    Tnx

    Sent from my HTC Desire HD using Tapatalk 2
    2
    Il be playing with the honeycomb Rom next :D

    Sent from my LeeDrOiD loaded HTC Desire HD
    2
    You have apps installed to the fat 32 partition as per FroYo A2SD.

    Go to settings - applications - manage applications - select the sd tab, and move them to internal ;)

    Sent from my LeeDrOiD loaded HTC Desire HD