I managed to get Ubuntu running on my Incredible earlier today. As far as i know this is the first successful attempt on an Incredible. Below the proof-of-concept video is a basic how to.
http://www.youtube.com/watch?v=HMYvQ5r_OyAhttp://www.youtube.com/watch?v=MiuThOzaAIQ
Less crappy video than my first one. It's a bit long though as it starts from installing the kernel. Watch it on youtube and see the description for links to specific, significant points of the video.
First you must have the following:
Here is a zip file with the kernel, Ubuntu image, and the below script: http://www.megaupload.com/?d=WO094E5Q
Setup
You will probably need to install a new kernel as neither the stock kernel, nor the hydra kernels (as of this post) support loopback devices.
Once you have an appropriate kernel, run the ubuntu.sh script.
That's it! if you see "root@localhost:/#" it worked. Try "cat /etc/issue" to see the version of ubuntu the image is based on.
If you're interested in how it's done read through ubuntu.sh, it is really simple.
Getting a GUI
If you want a graphical environment you will need to install vncserver in ubuntu and use androidVNC to connect to the localhost. Use the following commands from within ubuntu
Known Issues
If you come up with a fix for any of the below issues, post a reply.
I would like say thanks to samwathegreat from the xda-developers forum for the kernel compiled with CONFIG_BLK_DEV_LOOP=y. I was stuck at mounting the ubuntu image until I found his post.
Also to the nexusonehacks.net page on how to install ubuntu on your nexus one. The ubuntu image is right from their zip file, and reading through their scripts was very helpful, though it turned out to be much easier on the incredible.
##### BEGIN ubuntu.sh #####
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
mkdir /data/local/ubuntu
mount -o rw,loop -t ext2 $kit/ubuntu.img $mnt
busybox mount --bind /dev/pts $mnt/dev/pts
busybox mount --bind /proc $mnt/proc
busybox mount --bind /sys $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo waiting for things to settle...
sleep 5
echo Running ubuntu!
chroot $mnt /bin/bash
#After exit, cleanup
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
#####END ubuntu.sh#####
http://www.youtube.com/watch?v=HMYvQ5r_OyAhttp://www.youtube.com/watch?v=MiuThOzaAIQ
Less crappy video than my first one. It's a bit long though as it starts from installing the kernel. Watch it on youtube and see the description for links to specific, significant points of the video.
First you must have the following:
- Rooted Incredible
- ClockworkMod Recovery
- Nandroid backup (very important)
- Kernel that supports loop devices
- busybox
- Disk image of ARM Ubuntu
Here is a zip file with the kernel, Ubuntu image, and the below script: http://www.megaupload.com/?d=WO094E5Q
Setup
You will probably need to install a new kernel as neither the stock kernel, nor the hydra kernels (as of this post) support loopback devices.
- Unzip the incredible_ubuntu.zip file and place the three file in a folder called ubuntu on the root of your sd card.
- Boot into Recovery
- Select "install zip from sdcard"
- Select "choose zip from sdcard
- Select "ubuntu/"
- Select "kupdate-signed.zip"
- When complete, reboot
Once you have an appropriate kernel, run the ubuntu.sh script.
- Open a terminal session (either using adb shell or a terminal emulator downloaded from the android market)
- su
- run "sh /sdcard/ubuntu/ubuntu.sh"
That's it! if you see "root@localhost:/#" it worked. Try "cat /etc/issue" to see the version of ubuntu the image is based on.
If you're interested in how it's done read through ubuntu.sh, it is really simple.
Getting a GUI
If you want a graphical environment you will need to install vncserver in ubuntu and use androidVNC to connect to the localhost. Use the following commands from within ubuntu
- apt-get update
- apt-get install tightvncserver
- apt-get install lxde
- vncserver
Known Issues
If you come up with a fix for any of the below issues, post a reply.
- It's slow. Deal with it...
- when you type exit in the chroot'd environment processes may still be running. Restart your phone to kill everything.
- The keyboard isn't mapped properly (at least for me) when connecting via VNC.
I would like say thanks to samwathegreat from the xda-developers forum for the kernel compiled with CONFIG_BLK_DEV_LOOP=y. I was stuck at mounting the ubuntu image until I found his post.
Also to the nexusonehacks.net page on how to install ubuntu on your nexus one. The ubuntu image is right from their zip file, and reading through their scripts was very helpful, though it turned out to be much easier on the incredible.
##### BEGIN ubuntu.sh #####
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
mkdir /data/local/ubuntu
mount -o rw,loop -t ext2 $kit/ubuntu.img $mnt
busybox mount --bind /dev/pts $mnt/dev/pts
busybox mount --bind /proc $mnt/proc
busybox mount --bind /sys $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo waiting for things to settle...
sleep 5
echo Running ubuntu!
chroot $mnt /bin/bash
#After exit, cleanup
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
#####END ubuntu.sh#####