Linux Installer


This application can install Linux Version (Actualy Debian or Ubuntu) on your phone.

The Linux is installed separetly of android, the application doesn't delete any android files.
For that the application need some preriquieres :
- Rooted phone with id 0.
- Ext2, Ext3 or Ext4 support.
- If you install into loop, LOOP is needed into kernel.
- It is recommanded to reboot your phone before lunch this app to freed your memory.

This application hold some binaries tof install Linux, for exemple, mk2fs is embarqued into my app.
If you wan't to use Ext3 or Ext4 you must format befor use my app.

Note :
I tested on my G1 this application with my custom ROM and cynogen ROM.
Debian Lenny : Works.
Debian Squeeze : In test

Ubuntu Jaunty : Works
Ubuntu Karmic can't work on G1 (CPU is not compatible).

Chosse method

You have 2 choices :
- Loop file
This method is easier of SD Partition, but is slower that SD Partition.
The loop file can be in 1st SD Partition (/sdcard) formatted in FAT32.
The loop file is a "hard disk" for Linux, totaly independent. You can acces to Android data, with bind mounts
Now, my recovery image can boot into a loop file

- SD partition
This is the better solution if you can partition your SD card in 2 or 3 partitions, but the 1st partition must be an FAT32 for Android data on /sdcard.
The destination partition for Linux must be moubnted before lunch my app.
My recovery image, can boot into SD partition, as root, or directory, if you can, please dedicated one partition for Linux as root.


Two tutoriel are found, and tested with default settings : Debian Lenny with download server.
For informatitions, the Debian Lenny Install Download 50M of data.
- Loop file
- SD partition
Install the applcation throught Android Market, by seraching "Linux" keyword:

Install the applcation by accept permissions:

Click on the notification to lunch the application

On the first lunch, you have 3 (three) root access for testing your environement, please accept ALL SuperUser popup !

When all SuperUser popup, a message tell you to accept Statistics for debuging.

This is the main screen if you never lunch and setup the application.
Press "Menu" button and choose "Setup".

The Setup screen appear, for this tutorial, all default settings works whithout changing anything, press Back button, to save.
The configuration apper, the defaults settings work without touch anithing : Debian Leny into a 500M loop file named "Linux.loop" in th sdcard. for lunch this Linux, the script name is "linuxboot".
Detailled functions :
- Install into LOOP file
Check to box if you want use an loop file, a loop file, is a virtual disk, same as image of hard drive. The loop file can be in any directory. I recomand to put this loop file into sdcard with an extension ".loop".
- Server
Name or IP of download server. If this option is empty, the default server is used. To install ubuntu, leave emtpy.
- Distribution type
Type of distibutions, actualy, Debian or Ubuntu.
- Distribution version
Version in type distribution. Warning ! Please check your version with a real type ! Debian can be Lenny or Squeeze, but no Dapper or Jaunty ! This two end, is Ubuntu version !
- Script to lunch Linux
The command to lunch Linux. you can choose own command to lunch. It permit to install Lenny into file Lenny.loop with script name bootLenny and install. after that install debian squeez or Ubuntu Jaunty into a partition of your SD card, and use an JauntyBoot to lunch jaunty. You have two Linux distributions on the same phone !

The application exit, it's normal, is for reload settings when you change SD/LOOP method.
Search the icon of Linux Installer

Now Linux Installer have the real interface
Click on Create LOOP File

Click on Format LOOP File

Click on Copy and Extract into loop

Click on Install into LOOP

Click on Install Linux boot Script

If all of this steps works, you can register into this page.

Check the registred box

Enter username

Enter your password

If it's ok, the registred check box auto check
Press back button, the application exit, it's normal

Relunch the applcation

Now when you press Menu, you have new button "Additionals Packages".

In wrtiting ...

Native Linux !

I making an boot image for HTC G1 allow to boot your G1 directly from Linux.
Android is not affected, and not booted.
The boot image can :
Boot your phone from a Linux installation on partition of SD Card :
- If init fort at the root partition, it boot directly (recomanded).
- If no init found, it can chroot into a directory to boot from (work, but nor recommanded).

Boot an loop file containing Linux installation :
- The loop file must be in 1st SD partition.
- The 1st SD partition must do not have init file in root.
- The loop file must be in root and named with ".loop" at end of his name.

Boot from loop file is not recommanded because boot image can't actualy create a real /dev /sys and /proc filesystem, and can't umount loop file at reboot or shutdown.

You can flash your recovery partition of your phone with my boot image, and have real multiboot system.
to boot from android, boot normaly, for Linux boot your phone when you press home button.

News features in future (boot directly without choose).

The image file for boot are here :

The image can boot, but you may have a lot of warnings to explain somes modules are missing.
modules are here :
To install it type the command and reboot after extracting. Don't forget to install bzip2 (apt-get install bzip2) !
tar -jxvf modules_2.6.29-GALOULA_v1.003.tar.bz2 -C /
You can download and extract into Android mode or Debian Native mode, but modules are used only into Debian Native mode.

Updates :
- Mount loop in R/W
- Add red LED when you can choose boot.

You can test it without touch anything with this steps :
- Turn off your phone
- Attache USB cable to your phone
- Hold "CAMERA" button when power on the phone
- Press "SEND" button to enter fastboot mode.
- On your PC type "fastboot boot boot-Linux.img"
- Enjoy !

This document is the property of Gaël Perron. CopyRight © 2010-2011 Gaël Perron