Ubuntu Installation Guide on Android – Part 1

This is a guide I wrote on a forum few years ago, it was originally in Italian, but I translated it into English to publish it here.

As the title suggest, this is a guide that shows how to install Ubuntu on an android phone, I used the an HTC-G1 with Cyanogenmod 5.0.8. 

Before I begin, the required credits:
This guide can be easily found on the web, but I think the author is Paolo Sammicheli since he made the first guide and prepared the file I’m going to utilize.

Q. Why then follow mine and not his?
A. Because It took me 4 days to figure out how it worked, I will guide you step by step and help you to solve all the errors you could get, or at least all the ones I found.

This guide was written by myself, I took a cue from those already existing and from my experience of these days spent to boot Linux.

One last thing:
You can not install Linux without knowing some important things of this system, I put 2 Wikipedia links so that you can document yourself enough. I retraced them because they helped me deal with it!

The mount points: Mounts ENIT
The permissions: Chmod ENIT

Ok, let’s start
You will need a Linux Operative System because the file inside the archive can only be extracted with Linux, Windows will give errors. I used Kubuntu 8.04 and I also worked with EXT file system (Windows does not recognize it).
You will also need the Android SDK

Here we go
Download this package Ubuntu.tar.gz
it is the zipped Ubuntu we are going to use for Android.

Download also the Startubuntu
This is the script to start Ubuntu from Android console.
I modified it to let Ubuntu be started from the EXT partition on the memory card, I automated the chmod and minor fixes.
I would recommend using a memory card at least class 4.

My SD card is: FAT(3.1GB) – EXT(590MB) – Swap(90MB)

What we are going to do is to create a Mount Point on the sd card which will mount the file inside the EXT partition.

  1. From Linux, copy the archive inside the EXT partition of the memory card and from there, extract it.
    DO NOT extract and then copy the Ubuntu folder into EXT.
  2. Download the startubuntu and copy it in the root of the memory card (fat).Create also a new directory called “ubuntu” in the same position.
  3.  If you worked from the recovery you can reboot your phone to access to Android. Else reboot it anyway as it will “refresh” the EXT
  4. plug the phone to the pc and use this command to access to the shell:
    ./adb remount
    ./adb shell
    

    It is important to find the directory that Android uses to mount the EXT partition.
    My mount point is under /sd-ext/ just in the root of the linux system.

    To check your ext mount point you can have a look at the fstab file.
    Give this command to your phone:

    cd /etc
    cat fstab
    or just
    cat /etc/fstab
    

    Here you can find your mount points, mine are:

    /dev/block/mtdblock3    /system yaffs2  rw
    /dev/block/mtdblock4    /cache  yaffs2  rw
    /dev/block/mtdblock5    /data   yaffs2  rw
    /dev/block/mmcblk0p1    /sdcard vfat    rw
    /dev/block/mmcblk0p2    /sd-ext auto    rw
    

    The last one, mmcblk0p2 is my ext partition and it is inside sd-ext directory.
    If yours is different you have to edit the startubuntu to match your ext mount point.

  5. If everything is done right, it should start from the first time.
    For every changes made to the ext, it is better to reboot.
    Give an:

    ./adb remount 
    ./adb shell 
    cd sdcard 
    sh startubuntu 

    and if you don’t see any errors but just the cool Ubuntu pic, you’re done.

     root@localhost:/# 

    You’re on Ubuntu!


If not, check better your mount point and all the paths.