From Android Wiki
This is a guide on how to install Debian onto the microSD card on your G1, it DOES NOT replace the default Linux operating system.
- You'll need to root your phone, instructions on Rooting_Android are there.
- There is an automatic installer package available here. Download it and move it to your microSD card.
- Unzip the installer package, move the entire Debian folder to the root of your SD card. If it isn't this location, it won't work. (It should be /debian)
- Go to the Android Market and download the application called "Terminal Emulator" (if you haven't already), open it after it installs.
- Enter the following commands, hitting enter/return after each line. Authorize the program in SuperUserWhitelist if it asks you.
cd /sdcard/debian su chmod 4755 *
- Then type installer.sh and the installer should run!
If chmod 4755 * gives you an error stating that you do not have permissions, close Terminal Emulator and run su again, this time when SuperUserWhitelist asks for if you should give Terminal Emulator super user permissions hit yes instead of always.
If running installer.sh tells you that installer.sh could not be found, type su, followed by sh installer.sh.
A different guide to installing Debian on an Android phone is available at http://bayleshanks.com/tips-computer-android-g1 An Android app to automate the installation of Debian: https://github.com/guardianproject/lildebi/