Installing Debian on the G1

Search This thread

grzzer2

Member
Sep 29, 2007
27
0
Is there a place where i can get an updated dummy tutorial on how to install debian on my g1? When I type that into the command prompt nothing happens. it says bad command
 

grzzer2

Member
Sep 29, 2007
27
0
Using ADB push in windows how do I see the files from my hone in order to put the debian files in there.
 

tr1px

Member
Jan 10, 2009
7
1
Question

First of I am not a newb when it comes to linux but feeling really dumb trying to get debian on my G1.

So far I tried:

I put all the files on my SDCARD in the dir called "kit". My SDCARD is formatted FAT32. I have the modified RC30 from this site and my phone is rooted. I tried "enter telnetd enter" and tried to telnet into localhost but it does not work. Now I am using the terminal App from the market and exported all variables.

Then i tried #insmod $kit/ext2.ko and got an error like a whole bunch of people here. I also cd'ed to my kit dir on the SDCARD and tried modprobe ext2.ko and again errors.

Nothing works for me. Someone mentioned that it might be running commands from the terminal app might be as a regular user but I am not sure of this because I can mount the system partition and other things as root.

So I am really stuck now trying to come up with some more tricks. The last thing i did was put 2 partitions on my SDCARD. One FAT32 and another ext2 but that did not work either because without the kernel module loaded into android it won't even recorgnize the second partition.

I know other people here have asked the same questions and every time some one took it off-topic. Please help me out here.

Cheers.
 

SuperUserMovado

Senior Member
Jan 13, 2009
150
11
Some problems I had and resolved while "installing" debian

Some users may not be able to use the command
insmod $kit/ext2.ko
If you get an error when you in put this command you should make sure you have copied ext2.ko to /data/local
then
cd /data/local
modprobe ext2

If you are using telnet to put debian on your phone and you get a socket error. Download terminal emulator from the market.
Open it and Type
$su
#telnetd
Now navigate back to the telnet program and you should be able to connect

Because the insmod may not work for all of you I have modified Saurik's script which mounts the debian image.
This script will mount the debian image and put you into debian userland. This script should only be used if you were already able to get into debian userland following his instructions. Just change mount.txt to mount.sh and copy to a location on your sdcard. This script also assume you have saved ext2.ko in your phones local memory at /data/local
If you do not want to be put in debian userland you can use a text editor
and remove the line _ chroot $mnt /bin/bash from the script.

This is my first post on xda-developers. I have been reading the forums for a while now
since I got my first wm mobile phone a couple of years ago. I exorcised myself of the
wm devil some time ago however. I just wanted to thank all the developers out there for their
work on opening up this "open" phone.

Just to let you all know I only have a couple of months experience of using Linux on my desktop so I am not familiar
with all the Linux commands/terminology.
 

Attachments

  • mount.txt
    414 bytes · Views: 51
Last edited:

tr1px

Member
Jan 10, 2009
7
1
still not working

SuperUserMovado:

I tried what you said and used the terminal emulator to launch telnetd and was now able to to telnet localhost. Previous I moved ext2.ko to /data/local/kit with cat /sdcard/kit/ext2.ko > /data/local/kit/ext2.ko .

Now I cd'ed to /data/local/kit and did #modprobe ext2.ko and got modprobe: module 'ext2.ko' not found.
 

tr1px

Member
Jan 10, 2009
7
1
!

SuperUserMovado

Dude you changed your post. modprobe ext2 worked... Sweet I will continue now trying to make this work.

Thanks
 

SuperUserMovado

Senior Member
Jan 13, 2009
150
11
tr1px

/data/local is located on your phone not your sd card
you will have to use telnet (i used terminal) to copy the ext2 and unionfs files to your phones internal memory
so in the terminal emulator I believe you would
cp sdcard/data/local/kit/ext2.ko /data/local

someone can correct me if that command is wrong or innacurate
 

tr1px

Member
Jan 10, 2009
7
1
yea i know. I just made a dir on the phone called /data/local/kit for personal reasons.

So I got Debian running for a few seconds... I did an apt-get update and left the phone sitting for a few minutes to work on something else. When I came back telnetd stopped and along with it my telenet session obviously. So I tried to get back into Debian with _ chroot $mnt /bin/bash and got nothing but an error.

I am guessing that I need to redo all the mounts again because my phone decided it was enough of that. This brings me to the shell scripts here. Is this the time to use the remount.sh file. Also do I need to chmod ... remount.sh to something to get it going because when I tried chmod +x remount.sh it said bad mode. Without this the telnet session says denied or something like that.

Thanks in advance.
 

grzzer2

Member
Sep 29, 2007
27
0
yea i know. I just made a dir on the phone called /data/local/kit for personal reasons.

So I got Debian running for a few seconds... I did an apt-get update and left the phone sitting for a few minutes to work on something else. When I came back telnetd stopped and along with it my telenet session obviously. So I tried to get back into Debian with _ chroot $mnt /bin/bash and got nothing but an error.

I am guessing that I need to redo all the mounts again because my phone decided it was enough of that. This brings me to the shell scripts here. Is this the time to use the remount.sh file. Also do I need to chmod ... remount.sh to something to get it going because when I tried chmod +x remount.sh it said bad mode. Without this the telnet session says denied or something like that.

Thanks in advance.

How did you make a dir in the phone, I am a noob when it comes to this and have no idea how to put things in the phone dir in order to get this working
 

grzzer2

Member
Sep 29, 2007
27
0
_ mount -o loop $kit/debian.img $mnt

mount: mounting /dev/block/loop2 on /data/local/mnt failed: No such file or directory

what am I doing wrong
 
Last edited:

xMemphisx

Senior Member
Dec 7, 2008
81
33
Debian on Android -- Installer + Bootlader (Very Easy)

Just released, very simple to use, makes it a lot easier for those who would like to try it out and not go through a lot of technical stuff.

Link:
http://www.androidfanatic.com/cms/community-forums.html?func=view&catid=9&id=251#251

[Edit]
Here are specific instructions to make it work perfectly. Thanks to afbcamaro for clearing up the errors:

1. Download and the Android debian image (link above)
2. Unzip the 'debian' folder to the root of your sdcard (should look like /sdcard/debian)
3. Download and Install 'Terminal Emulator' from the market, if you haven't already, and open it up
3. type in 'su' to get root access, then 'cd /sdcard/debian', followed by 'chmod 4755 *'
4. type 'sh installer.sh' (it will say the bootloader was successfully installed)
5. type 'mv bootdeb bootdev.sh'
6. type 'sh bootdev.sh' and debian will start to run! That's all!
 
Last edited:

davidhooper4

Senior Member
Jan 3, 2009
108
11
hey when i went to the terminal emulator i did the cd then the chmod then when it came to the su ./installer.sh i did it and it said
./installer.sh: 40: syntax error: unterminated quoted string
any suggestions on whats wrong?
 

letsrootit

Member
Dec 4, 2008
19
0
The installer.sh is missing a double quote ("). That's not all either, I can't get it to boot at all. :rolleyes:

Edit: I stand corrected. Followed instructions below, and it works perfectly. Thanks!
 
Last edited:

davidhooper4

Senior Member
Jan 3, 2009
108
11
me niether so nybody could help us with installing this or actually booting into debian because ive tried almost everything
 

Rafase282

Senior Member
Oct 25, 2006
1,573
326
Bronx
Does it has to be in the root of the sdcard or can it be on /system/sd where I have and ext2 partition of 1 Gb fro app?
 

afbcamaro

Senior Member
Dec 23, 2006
209
19
Just some mistakes in his commands pertaining to our images.

su on terminal before you chmod

after which use
sh installer.sh
instead of ./installer.sh

after that rename bootdeb to bootdev.sh
and to boot debian type
sh bootdev.sh

It works perfectly. Just in time I needed to get debian working quickly on my g1 since I destroyed my phone and had to redo everything

Thanks for your work buddy.
 
Last edited:

Rafase282

Senior Member
Oct 25, 2006
1,573
326
Bronx
I did some momdifications to the stripc, first it was missing a " then i changed to the Debian folder would be on /system/sd where i have the space for app on the storage card. I'll try and see how it goes.