Linux Installer : Easy Way to Install Debian/Ubuntu on Android


Linux Installer can be downloaded here  and quick tutorial here. After download Linux Installer from Market,

  • lets open it end click menu button end setup,

       

 

 

  • then choose Distribution (Debian/Ubuntu) and version (example:Debian Lenny/Squeeze) .
  • Then fill File size up to you (default is 500mb, if you will install GUI you should fill it with bigger size)
  • Leave another setting to default, then close setting it will see like this:

  • Then click create target loop, after that finish click format loop, and mount loop, after that it will see like this:

  • Click install in loop and it will download .deb package from repository server and install it, how long time that it need is dependend on your internet connection and your device capability. After installation finish you can run it with terminal. You can use Connecbot terminal or adb shell.

$ linuxchroot

  • How to add GUI (LXDE desktop)

first you need to update package

root@Galoula-ARMEL# apt-get update

root@Galoula-ARMEL# apt-get install lxde

  • How to show LXDE GUI on Android VNC

– First install Android VNC from market then

– install tightvncserver on Debian/Ubuntu (on Android device not your computer)

root@Galoula-ARMEL# apt-get install tightvncserver

– How to add LXDE profile on tightvncserver ? –> lets write on Nano:

root@Galoula-ARMEL# nano /root/.vnc/xstartup

then add this text:

#!/bin/sh

xrdb $HOME/.Xresources

xsetroot -solid grey

lxsession

or if Android phone screen is to small and it is difficult to use nano, use this command :

root@Galoula-ARMEL# echo ‘#!/bin/sh’ >> /root/.vnc/xstartup

root@Galoula-ARMEL# echo ‘xrdb $HOME/.Xresources’ >> /root/.vnc/xstartup

root@Galoula-ARMEL# echo ‘xsetroot -solid grey’ >> /root/.vnc/xstartup

root@Galoula-ARMEL# echo ‘icewm &’ >> /root/.vnc/xstartup

root@Galoula-ARMEL# echo ‘lxsession’ >> /root/.vnc/xstartup

– too start tightvncserver (i use 320×240 aka ldpi device, lets change it depend on your Android Device)

root@Galoula-ARMEL# vncserver -geometry 320×240

(you will be asked password, set it exampe 000000 )

– then open Android VNC and fill it setting like that:

Nickname : linuxchroot

pasword : 000000

Adress : 127.0.0.1

Port : 5901

Username : linuxchroot

– then click connect and lets enjoy that 🙂

addition :

u can also  install lxde offline , by download lxde pakage and its dependencies  on your computer then transfer them to debian armel and on debian armel terminal:

# dpkg -i *.deb to install

but before it , u must get list of lxde dependencies with this (on debian armel terminal):

# apt-get --print-uris --yes install lxde | grep ^\' | cut -d\' -f2 > lxde.txt

145 thoughts on “Linux Installer : Easy Way to Install Debian/Ubuntu on Android

    1. Yes it save for Samsung Galaxy Mini Asian Rom, this app just create linux.loop on sdcard then mount it (linux.loop) on /data/local/mnt/Limux om Android devices, then run it with linuxchroot command

      as for as i know to install LXDE it need Openbox as it dependencies, but i dont know to switch desktop manager (LXDE with Openbox) in Linux Installer,

      1. btw what distribution and version which you install ? Debian / Ubuntu? version?
        i have got error to when i try install Ubuntu Natty, debootstrap error too, it may be similar to your problem, then i install Debian Squeeze and it work without error, i recommend you to try another distribution and version, and i recommend Debian Squueze because i have tried it before and it was succes

        btw about :

        “http://imageshack.us/photo/my-images/830/screenshot1320848724602.png/
        http://imageshack.us/photo/my-images/249/screenshot1320848704414.png/
        http://imageshack.us/photo/my-images/31/screenshot1320848692447.png/
        i got used the cyanogen mod 7.1 with android 2.3.7 by quarx last nigthly 111109
        http://forum.xda-developers.com/showthread.php?t=1033654

        i dont know much about it, but about debootstrap failed, it can be read on :

        http://bebas.ui.ac.id/v17/au/csiro/datamining/debianbook/book.pdf
        http://www.debian.org/doc/manuals/debian-reference/ch09.en.html#_chroot_system

        on your image there are error statement like this:
        can not install into target ‘/data/local/mnt/Linux’ mounted with noexec or nodev
        debootstrap: line 425: cant create /data/local/mnt/Linux/test-dev-null:permission denied

        may be debootstrap error in line 425 so debootstrap cant create /data/local/mnt/Linux/test-dev-null because “permission denied”
        debootstrap is used to create a Debian base system from scratch, without requiring the availability of dpkg or apt. It does this by downloading .deb files from a mirror site, and carefully unpacking them into a directory which can eventually be chrooted into.

        about your CM7 motorola Defy kernel, i dont know about it, i do apologize.. but i try this Linux Installer on CM7 too (Galaxy Mini),
        i pray that you can succes install it.. 🙂

      2. now i got updated the linux installer (this only update if my lcd density is 240)
        and now i got this error

        kernel features is not know because the /proc/config.gz file is not found!

      3. “now i got updated the linux installer (this only update if my lcd density is 240)
        and now i got this error

        kernel features is not know because the /proc/config.gz file is not found!”

        try to backup it with titanium backup then uninstall it, then reinstall it again, i dont know about it, i do apologize 🙂

  1. hey man what to enter in the connectbot when opening the first time? i know its a noob question… what to enter “username@hostname” ? please reply

  2. Ive tried this with squeeze, however it doesnt show the desktop at all. it shows an x pointer and a grey screen. any ideas?

      1. Linux Chroot app dont show GUI, to show its GUI you must use Android VNC app, and in Ubuntu/Debian in linuxchroot you must install tightvncserver to emulate it

      2. tried using vnc and it didnt work. i did every little instruction given. hell i tried it more than once. nothing

      3. i need a miracle more than luck man. even with a loop file that size it wont show the gui. its really got me puzzled

      4. oh yeah. one more post. any idea which ubuntu install works best and will actually have the packages i need as none seem to have vnc in the distro.

      5. managed to get it running. i did it a different way for now.
        used
        # startlxde
        #vncserver -geometry (resolution)

        i’d like to know how to save that into debian so it runs automatically for vnc client

      1. what kind of error it is? what error messages on terminal when you install lxde?

        if you dont have tightvncserver before:
        # apt-get install tightvncserver

      1. i had some issue, so i use Debian

        may be , there are something in /etc/apt/sources.list to change or fix repository issue and try apt-get update to update repo

      2. yes i think Debian more stabil , Ubuntu option in Linuxchroot marked with * , isn’t it?

        when i used Linux installer first time i use Ubuntu and got packages installation problems , then i used Debian and wasnt find similar problem

  3. $ su# linuxchroot
    W: debian squeeze is already mounted. Entering chroot…
    I: Executing /etc/init.android/rc_mount.sh
    Galoula LinuxInstaller not found or Android Bind is not active!
    I: Entering chroot…
    I: Executing /etc/init.android/rc_enter.sh
    root@Galoula-ARMEL:/# dpkg –configure -a
    dpkg: failed to write status database record about ‘module-init-tools’ to ‘/var/lib/dpkg/status’: No space left on device

      1. i have 4gb free on my card already but 533mb on phone memory. Don’t know how to savely delete from internal mem.

        samung galaxy tap p1000

    1. ‘/var/lib/dpkg/status’: No space left on device:

      may be the problem is linux.loop file size, linux.loop is a file which be mounted as / “root” ,

      i had similar problem before, when i made linux.loop just 70 MB, it was mean: my / “root” just had 70 MB , and it showed: “No space left on device” altough my internal and sdcard free space is big,

      so i tried to make linux.loop file size bigger. that is on settings–>linux.lopp size,
      but it will erase linux.loop before,

      so try to *backup all deb packages before that, (because they are big size, 50 MB or more,) , then create a new linux.loop bigger, and start again, when Linux Installer start to download deb packages again, try to transfer deb packages that you *backup to /data/local/mnt/linux/var/cache/apt/archieves so debootstrap can make / “root” system from them (deb pacakages backup) ,

      the linux.loop size is relative, depending on whatever you will install on it, if you want LXDE , it is less than GNOME,

      1. I am a noob in this. How do we backup the deb n then transfer it back, can u be more specific. Thanks in advance.

      2. when linux.loop is mounted

        copy all deb packages from /data/local/mnt/*Linux/var/cache/apt/archives to sdcard
        copy with root file explorer or adb shell or others

        *Linux maybe Debian or Ubuntu

  4. works amazing on samsung nexus s with rooted android 4.0.3. Thank you for the instructions. The only thing i changed was instead of “>> /root/.vnc/xstartup” I had to do “>> /root/xstartup”, then it worked great. currently running Debian Squeeze on lxde. Again, thank you for the info. 😀

      1. sob ane pas install size loopnya kecil terus ga bisa install vnc.. cara ubah ukuran loopnya gimana ya?supaya ga usaah install dr awal lagi.. pliss.. pake bhs indonesia ya.. hehe aane ga ngerti english

      2. ane juga pernah nanya hal kaya gitu ke pembuat apikasinya, katanya sulit kalo manual soalnya kan pake aplikasi Linux Installer serba otomatis, tinggal klik klik aja, jadi bikin yang baru aja , tapi paket deb yang udah didonlod dibackup dulu, buat dipake pas bikin yang baru lagi bro

        pakiet deb nya coba cari cari di /mnt/Linux/ di Android atau semisalnya, nanti ada direktori /var/cache/apt/archives , nah disitu ada paket deb yang uda didonlod buat bikin sistem root Ubuntu/Debian, backup dengan cara copy ke sdcard pake terminal / aplikasi kaya Root Explorer, terus bikin linux.loop yang baru terus nanti pas donlod deb yang baru lagi (pas klik install) , tingal transfer dari backup-an ke /var/cache/apt/archives lagi biar ga donlod paket deb lagi (lumayan lebih dari 50 mb-an)

  5. Hi, all from Spain:
    Installing now in tablet WowPad x210.
    Distro: Debian Stable (Ubuntu doesn’t install).
    Important ussue: THIS distro needs MORE than 500 MB after updating (don’t know others).
    Triing now after creating Loop with 700 MB.
    Will tell you more details.
    Regards

  6. Oooops..
    Sorry for previous message.
    Installation crashed again., but it seems not a problem of Loop’s space, but FREE space. The updating collapses when triing to install files (a lot of them) in other locations (/usr/bin , /usr/share/locale , /usr/bin and others (message: “failed in write on buffer copy for backend dpkg-deb during ‘……..’: No space left on device”
    Will start again reducing Loop to 400 Mb and see. May be 2 Gb internal memory is not enought for Android and Debian bind?.
    I’ll see and tell.
    Regards.

  7. Well…, I’m not sure:
    After “apt-get update” and resolving needed packages, terminal says something as “421 Mb of additional disk space needed”. Then, after a lot of installed packages, error (no space)
    What’s the Bootstrap size?
    What’s the Distro size once installed? (in and out Linux.Loop).

    OK, here we go again:
    – Distro: Debian Stable
    – Loop 600 Mb
    – Free disk space 311 Mb
    – Debootstrap was successfull
    – Update Linuxchroot in Android successfull

    Go to console (Terminal Emulator)
    – apt-get update: all right
    – apt-get install lxde
    Right……right…… a lot of poackages to install….
    – 354 packages to install
    – Message “After this operation, 457 MB of additional disk space will be used”

    Hummmm……I’m afraid this is not good (again)

    – Continue…
    – Getting packages….
    – 1… 5… 38…60….86….131…169…201…239…282…354
    – Cofiguring Keyboard…and more…
    – Selecting previous deselected packages…
    .
    .
    .
    .May be?….

    NO

    Only ten packages to unpack: “No space left on device”

    Can try with 800 MB, but I’d like to preserve some space for applications. Any lighter distro?

    Thank you

    1. you’re welcome, yes , i agree with you, i need 900 mb to install just LXDE gui, need more sdcard with big capacity, i dont know other distro wich can be installed via deboostrap, may be should need more capacity sdcard, cmiiw..

  8. I’ve noticed, thanks.
    Another fail, 800Mb now.
    I’ll try 900 but, what about later applicatios, like OpenOfiice?Where will be installed?At Loop or in other location?.
    Thamks.

    1. btw have you install root system without gui?
      i am sorry i dont predict how much space for OpenOffice, but i guess it is not much difference space from OpenOffice on Ubuntu/Debian desktop altough it is armel package,
      you also can do apt-get clean to empty /apt/archive (but try backup it first), so it will give more size on loop

      1. Sorry, it was a mistake the reference to OpenOffice (too many hours in front of computer and tablet…)
        Of course, i was installing with GUI.
        I’m correcting another problem now; something concerning to have crashed Android system and having to reburn and reinstall apps. Nothing important, but some time to spend.
        I’ll return to try in a while, just when another invasive program (wife) frees me after shopping.
        Regards.

      1. hp ane motorola droid x, pas buka aplikasinya dapet peringatan missing kernel module /proc/config.gz

  9. installed twice and cant get rid of error “gargoula-armel:n is taken because of /tmp/.xn -lock (n after armel and .x is a integer number) when i run vncserver, and i got refuse connection in androidvnc, what can i do?

  10. Hello everyone.
    to me it all works ok, but when I restart the tablet VNC did not connect to address 127.0.0.1, why?

    I tried different installations, but at this point does not go ahead ….
    please help!

    You are mythical, this port is magnificent!

  11. yes, linuxchroot is running, and the passwd is 000000 as the guide.

    The istallation go smooth, every time, without problems, but when i try to connect with androidVNC, it refuse the connection…….

  12. when I’m on linux, and reboot the phone, how do I do to return in Linux, ?
    I have to repeat the process somewhere? or should I just mount Linux.loop with ConnectBot I type “linuxchroot”, then I go and I connect to vnc?

    P. S. As I write ConnectBot where it says: username @ host name: port addres?

    Thanks in advance!

  13. apa bisa untuk semua android mas? hm…. ini bisa untuk fitur lengkap HP gan? misal telpon dan sms plus internetannya? kira-kira minimum spesifikasinya apa?
    makasih.

    1. internet bisa, muter musik juga bisa

      sms sama nelpon belum bisa pake Ubuntu secara Ubuntu buat mobile juga belum rilis, lagipula ini pake chroot

      spek minimal, saya ga tau pasti , yg pasti saya mencoba pake Galaxy Mini waktu itu, klo pake Galaxy Tab/ tablet lainnya tentu lebih mantep lagi karena layarnya gede,

  14. Thanks for the great tutorial! I had a few errors, but fixed them all by checking the comments – loop file had to be 1000, setup for tightvnc had to be in /root/xstartup and needed to use startlxde before geometry
    Seems to be running fine now! Using a Samsung Galaxy S GT i9000

  15. hi.. i have a question can u write how the xstartup file would look like when i want to use icewm? thx i already got the lxde working so its easy to edit the file..

  16. E: 1 – Unknown compression type for in .//var/cache/apt/archives/gzip_1.3.12-9ubuntu1.1_armel.deb

    appears every time…tried all versions no luck wt should I do

  17. I did what ever u said and now it is showing lxde package cannot find.i updates my package now what to do.totaly waste of time.

  18. About to try this out.. First I got it working, but when I installed the GUI filed I ran out of disk space. Is this because I have allocated too small space (default 500MiB) for loop file?

  19. Thanks for the tip, zico_newbie, I created a loop file of 2048 MiB, just to be on the safe side, and I installed the lxde files with success, although the desktop is only light grey with no start bar in android-vnc, and mouse pointer is an x. I am starting over now, building Debian in stead of ubuntu on a clean SDcard to see if it makes a difference. I’ll keep you posted on my progress. Sorry, I am an extreme newbie with no linux experience.

    1. add this text

      #!/bin/sh
      xrdb $HOME/.Xresources
      xsetroot -solid grey
      icewm &
      lxsession

      to /root/.vnc/xstartup

      if the directory doesnt exist , try to make aka mkdir .vnc directory,and do not forget to install vnc server in Ubuntu

    2. add this text

      #!/bin/sh
      xrdb $HOME/.Xresources
      xsetroot -solid grey
      icewm &
      lxsession

      to /root/.vnc/xstartup

      if the directory doesnt exist , try to make aka mkdir .vnc directory,and do not forget to install vnc server in Ubuntu

  20. I managed to do something, but now I’m getting a greyscreen with a X in the middle. I have lxde installed.

    Even after download selinux, I can’t enable it, is it the problem? How much should I set for the loop file? is 1Gb ok? Sorry for the large ammount of questions.

  21. slm knal..om buat ngetik di connect boot ane g bisa ngetik tanda koma di atas.sn echo nya.soalnnya g ada tanda itu di keyboardku.. ada solusinya g om..email y..klp bisa email no tlpnya sekalian. .thanks

  22. berhasil om..thanks bgt om tutorialnya,hehehe,akhirnya galaxymini ane bisa ngerasin juga pake debian….thanks bgt deh om pokonya..u are the best,..mantaaaaap..

      1. heheheheh..satu pertanyaan lgi y om..cara bukanya kembali gimana y om..maksudnya langkah2 nya..thanks.

  23. Is there a way to get access to the Directories outside of my Chroot-Environment? I tried to mount my Phones SD-Card in Debian, but i came to no results. Can you help me?

    1. i didnt get it, when i want to transfer file from Android system to Linuxchroot system, i transfer manual to directory that Linuxchroot is mounted, manually in Android environtment

  24. I might have a solution for those who tried this and failed:

    1. install busybox installer, vncviewer, a terminal and complete linux installer from the market. Make sure your phone is rooted.

    2. run complete linux installer, and download the linux available to your choosing, extract it on sdcard in a folder.

    3. run complete linux installer and tap run script.

    4. done.

    Tried this using samsung galaxy w and works very slow running ubuntu 12.04 small installation.

  25. When I initially left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and now whenever a comment is added I get four emails with the exact same comment. Perhaps there is a means you can remove me from that service? Thanks a lot!

  26. Hi, i am getting an error while installing lxde.the is in dpkg that says that idconfig is missing.please help me bro.

  27. Greetings, I do think your website could possibly be having internet browser compatibility problems. Whenever I take a look at your blog in Safari, it looks fine however when opening in IE, it has some overlapping issues. I simply wanted to give you a quick heads up! Besides that, excellent website!

  28. assword:
    arning: password truncated to the lengt
    of 8.
    erify:
    asswords do not match. Please try again

    how to enter password in vncserver in galaxy y
    assword:

  29. pls tell me how to enter password in vnc server where my keyboard is not working in my galaxy y.pls tell me soon i am waiting to enter into debian in my android

      1. Pls tell me how to enter vncserver password in debian on my galaxy y without using computer
        i have successfully installed all pakages i am not able to enter this last step

  30. Is galaxy y is compatable to run debian ?
    If yes what are the steps to run that
    pls tell me all the steps from starting

  31. hello friend,
    can we change android os in my tablet with linux mobile os? or firefox os?
    maybe you can help givethe tutorial, thanks

  32. Just use Linux Deploy available from Play store. It’s much easier to install any distro with, then just use TightVNC to log in to the Linux GUI. The sections of Linux Deploy are self explanatory and the distro is installed to your SDcard (usually labled sdcard0 or something similar).

    You should have at least a 4GB sdcard, 8GB card is even better so you can set 4GB for your Linux distro install and still leave some space on your SDcard for backups and other files. Linux Deploy works with Unbutu, great with Debian, even Kali and many others, also with fairly frequent expanding support for more distros.

Leave a reply to Bonesy Cancel reply