[GUIDE] Ubuntu on Galaxy S

Search This thread

BenF1

Senior Member
Jun 11, 2009
462
15
South Devon
You'll be right there. The battery will be lucky to last day on a full OS. Its not designed to run on a battery so small.
 

Josh_AxeY

Member
Aug 25, 2007
10
0
Download keeps failing CRC check for me. Winrar won't decompress the zip.

Also, made the one script to run to boot it... haven't been able to try it though.
Needs to be placed in the same directory as your image.

Also, check out the below app for conveniently running the script from your handset instead of adbing, or using terminal:

GScript:
chart

GScript Lite:
chart


Code:
#!/bin/bash
#Script to start ubuntu image on SGS

su

if `test -d /data/local/mnt` ; then
   echo "/data/local/mnt"
else
   mkdir /data/local/mnt
fi

export HOME=/root
export USER=root
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH

mount -o loop,noatime -t ext2 ubuntu.img /data/local/mnt
sleep 3
mount -t proc proc /data/local/mnt/proc
mount -t devpts devpts /data/local/mnt/dev/pts
chroot /data/local/mnt /bin/bash

When I get home, I'll give the zip another go, and also grab the source for GScript and have a crack at churning out a customised version with the script built in soely for running the image should it turn out to be worth it.
 

Dark-Master

Senior Member
Jul 25, 2010
62
4
I admit that I feel great because I picked the right phone at the moment from mobile store.

This is juist great, but I think I'll wait until the full complete guide with required files are available.

Thanks for the news
 

jodue

Senior Member
Dec 15, 2009
453
37
vienna
i just read this thread and felt like i had to clarify some things as 90% of the people don't seem to understand what this is!

i have had this running 2 weeks ago from this howto.

first of all. this is not a full OS, so any questions regarding wifi/data/telephony/3g support are completely senseless. this is only a chroot environment which contains the typical programs of a ubuntu/debian system compiled for arm. it has no own kernel or drivers! it DOESN'T BOOT! the internet connection is of course just shared from android, so no need for any wifi or other drivers. and you can do apt-get install xyz to install programs!

yeah, it looks cool and you can do a lot of things you can do on a full pc! regarding performance: the guy from nexus-one-hacks compares it with a slow netbook and i think i can agree with that. but keep in mind that it runs parallel with android!
 
  • Like
Reactions: Sergej_9N3

ArminC

Member
Aug 19, 2010
21
3
blog.coralic.nl
yeah, it looks cool and you can do a lot of things you can do on a full pc! regarding performance: the guy from nexus-one-hacks compares it with a slow netbook and i think i can agree with that. but keep in mind that it runs parallel with android!

This is not for daily use and will probably not be for a long time but it is fun to play with, the performance isn't that great. I do think if you look how fast the smartphones are getting that in a year or two we will be able to run Ubuntu as a full desktop for small tasks. I wouldn't mind if i could connect my phone to a monitor and use it like a pc to internet, do office tasks and maybe some small games.
 

Joschi75

Senior Member
May 20, 2009
53
7
I apologize, it seems something went wrong with the upload. I have uploaded a new zip file and have updated the download links on the blog. I am still not authorized to submit links here so I have to ask you to go to my blog for the download link.

Thanks Armin, It's working now perfectly

Update:
When using your start script I get "test: not found", so "test -d /data/local/mnt" is failing due to missing "test" executable.
Should this be available on the SGS by factory or do I need to install it via a package (or copy it over)
 
Last edited:

lundahl

New member
Aug 12, 2010
4
0
hi,
i used your img-file and got it running in the terminal, but i'm struggling with the vnc... is there an "auto-starting" vnc server in the img? what's the password?

thanks
 

ArminC

Member
Aug 19, 2010
21
3
blog.coralic.nl
hi,
i used your img-file and got it running in the terminal, but i'm struggling with the vnc... is there an "auto-starting" vnc server in the img? what's the password?

thanks

There is no auto start, see my post about creating the image to accomplish that. To start your vnc use:
vncserver -geometry 800x480

Password is testing but you can change that if you wish.

Sent from my GT-I9000 using XDA App
 

xedamen

Senior Member
Jul 19, 2010
188
35
I downloaded the new image, put it on to the SD/ubuntu, everything is fine, but when i type "sh startA_ubuntu.sh ubuntu.img" the mounting is failed "Device or resource busy" Any idea ?
 

19arek93

Member
Aug 5, 2010
28
0
I've got problem with start ubuntu. It was starting at the begining, but i've "killed it". I was looking how to set VNC password and I destroyed something. The best part is now i see the pass is "testing". LOL

This is what I'm getting from CMD line in Win7, and CMD line emulator in my SGS. (I don't know, can i post pics?)


(Sorry for my really bad english)
 

Attachments

  • 7359d1d1f8b508d2.jpg
    7359d1d1f8b508d2.jpg
    41.3 KB · Views: 424

ethanfel

Senior Member
Aug 11, 2010
288
66
it works pretty good, exept arora, who's not launching but i have install chromium (via daily ppa) and abiword, pretty decent.

I will not obviously try Openoffice and firefox, they are too much gtk dependant. I'm using the touchpad mod btw, much more easy to use.

Now, i will try to automatise the vncserver start.

For autostart the vncserver :
When you are in your chroot ubuntu or in the vnc chroot session.

edit /root/.bashrc (with vi or leafpad)

add at the beginning of the file :
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 800x480

and that's all.

it's exactly the same than here. So thanks to them !

Next issue : when i use the "stopa_ubuntu.sh", he can't umount /data/local/mnt, any idea ?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Seems to have gone unnoticed here!



    To run Ubuntu on Android/Samsung you need to create an img file using my post, you can also use two of my start and stop scripts from here start stop.

    Step 1:
    Lets begin by preparing our device by create an folder on android, connect your phone to your computer and do:

    Code:
    1
    sudo adb shell
    2
    cd /sdcard
    3
    mkdir ubuntu
    4
    exit
    Step 2:
    Now you can upload the img file and if you like you can also upload my start and stop scripts.

    Code:
    1
    sudo adb push ubuntu.img /sdcard/ubuntu
    2
    sudo adb push startA_ubuntu.sh /sdcard/ubuntu
    3
    sudo adb push stopA_ubuntu.sh /sdcard/ubuntu
    Step 3:
    Now that you have done all the prep work you can use your ubuntu by doing:

    Code:
    1
    su
    2
    cd /sdcard/ubuntu
    3
    sh startA_ubuntu.sh ubuntu.img
    Step 4:
    To exit just run:

    Code:
    1
    exit
    2
    sh stopA_ubuntu.sh
    That’s it, no more no less

    All credit goes to Coralic

    EDIT:Here is the Ubuntu image.

    A Fix for some issues can be found here!
    1
    i just read this thread and felt like i had to clarify some things as 90% of the people don't seem to understand what this is!

    i have had this running 2 weeks ago from this howto.

    first of all. this is not a full OS, so any questions regarding wifi/data/telephony/3g support are completely senseless. this is only a chroot environment which contains the typical programs of a ubuntu/debian system compiled for arm. it has no own kernel or drivers! it DOESN'T BOOT! the internet connection is of course just shared from android, so no need for any wifi or other drivers. and you can do apt-get install xyz to install programs!

    yeah, it looks cool and you can do a lot of things you can do on a full pc! regarding performance: the guy from nexus-one-hacks compares it with a slow netbook and i think i can agree with that. but keep in mind that it runs parallel with android!
    1
    Hi ravOr,
    thanx for the answer but I still get the same error :

    Code:
    ./adb shell
    $ su
    # cd sdcard
    # cd ubuntu
    # sh startA_ubuntu.sh ubuntu.img
    /data/local/mnt
    failed.
    mknod: /dev/loop/0: No such file or directory
    losetup: /dev/loop/0: No such file or directory
    Usage: mount [-r] [-w] [-o options] [-t type] device directory
    mount: No such file or directory
    mount: No such file or directory
    chroot: can't execute '/bin/bash': No such file or directory

    I couldnt figure out how to fix this.. :confused:
    It ssems you have a weird allocation style on your device. Just try running the commands manually, type
    mknod: /dev/loop0 instead of mknod: /dev/loop/0
    or just create a folder /dev/loop and the script should run just fine.
    1
    I have error msg

    Code:
    mount: mounting ubuntu.img on /data/local/mnt failed: Block Device Required

    This happen after I type command 'sh startA_ubuntu.sh ubuntu.img'

    can anyone please help me?
    1
    Ubuntu on Framebuffer with mouse+keyboard

    Gents,

    For those interested in running ubuntu on Galaxy S with a working bluetooth mouse AND bluetooth keyboard, and using the FRAMEBUFFER of the Galaxy instead of VNC..

    MODS: hope this is the right place to put this. If not, feel free to remove/move/alter or whatever necessary.

    All credits go to all the gentlemen who have worked hard to figure out all this wonderfull stuff. I just put some things from here and there together and got this as result.

    Bear in mind that your configuration might be different, and you might have to make some changes in things I described below. This is what worked for me and just wanted to share. Feel free to modify, comment, alter or whatever you like.
    I got this working on a 1st gen Galaxy S with Cyanogenmod 9's ICS running on it.

    With this thread I got Ubuntu running on my Galaxy in the first place. But I wanted something else than VNC...

    With work of Thomas Polek ( h t t p://thomaspolasek.blogspot.com/2012/04/arch-linux-lxde-w-xorg-mouse-keyboard_16.html ) I managed to get UBUNTU running on the framebuffer with BLUETOOTH keyboard and mouse support with the following steps. I used SSHdroid for my commands in shell.

    1.In Android, connect to a bluetooth mouse and keyboard. I connected mouse first, then keyboard. Connecting in different order might cause trouble later in setting xorg.conf.

    2. fire up your ubuntu chroot as described in the first post in this thread using SSHdroid (at least this is what I did and was most convenient)

    3. type exit to go back to Android shell and mount the required /dev section to the chrooted dir.

    mount -o bind /dev /data/local/mnt/dev

    4. Kill the media + zygote service using the commands on Thomas's site from PIKPOK

    setprop ctl.stop media & setprop ctl.stop zygote

    Also kill the bootanimation:
    This worked for me but might be different in other builds.

    killall bootanimation

    5. go back to the ubuntu environment by just using the startA_ubuntu.sh again.

    6. install lxde, as GDM is too heavy. Also Nano might be handy to edit the xorg.conf later (personal flavour)

    apt-get install lxde nano

    7. Modify your xorg.conf in /etc/X11. I used the one described on the site of Thomas Polek, (available for download with WGET) and modified the mouse and keyboard "events"

    Found out that my bluetooth mouse has event9, bluetooth keyboard has event10. This probably changes order if you connect keyboard first instead of mouse.

    8. Start the lxde desktop on the framebuffer using the command on the site of Thomas :

    Start LXDE session (starts Xorg Server)

    xinit /usr/bin/lxsession &

    9. Enjoy! You should have a fully working LXDE desktop with working keyboard + mouse.

    Again, this is what worked for me, and might not necessarily work for you. Before trying these steps, please read the instructions on this thread and the thread of Thomas Polek first, so you understand what I did.

    Also sorry for my misspellings/miswordings etc. I am not an expert in linux/android so please feel free to correct any mistakes.