Installing Debian on the G1

Search This thread

binary.koala

Member
Mar 10, 2009
9
1
hey FukTheRegister,

could you give us some insights on how do you make your own images? i would like to bake one with 2.6.31 Karmic kernel, since it has wl12xx driver... ;)

there is also a ARM kernel here http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot
do you think it is usable with the jaunty install you performed?

chrz,


I create an image to Install Ubuntu (The Debian version is making !) via netinstall.

Just download the image : http://www.galoula.net/fr/Tutoriels/HTC-DREAM-G1/FTP/Native_Ubuntu/Ubuntu-Install.img , fastboot the image (Don't flash it !!!), and configure USB-Networking.

The installer work on my French G1, with a French keymap of G1 (with some difference for special keys in the installer).

My readme file : http://www.galoula.net/fr/Tutoriels/HTC-DREAM-G1/FTP/Native_Ubuntu/Readme.txt

I think it's easier to install with this image.

Please report your suggestions.
 

FukTheRegister

Senior Member
May 4, 2009
123
27
Paris
www.galoula.net
hey FukTheRegister,

could you give us some insights on how do you make your own images? i would like to bake one with 2.6.31 Karmic kernel, since it has wl12xx driver... ;)

there is also a ARM kernel here http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot
do you think it is usable with the jaunty install you performed?

chrz,

I use this tutorial to unpack and repack boot images : http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images

Simply download "http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot/initrd.gz" in your exmple, and repack the boot image with the netboot initrd !

You may add the initrd support to the kernel.
 

FukTheRegister

Senior Member
May 4, 2009
123
27
Paris
www.galoula.net
Hi word !

I have created an initrd (in testing) to boot on any partition of SDCARD, and if init don't find an init or sh binaries, he list Directory for boot in by chroot.

It's works with two Debian.


I also test to copy the /system and /data from Android to a Subir on my sdcard.
I have unpacke boot.img from android and copy it in the same directory.

The real new ?

I can FROM Debian, chroot in the Android and can make calls !!!

It's certify of the kernel of Debian CAN makes calls !!!

But I havn't yes the network connection.

I search for binarie for Debian to make call WITHOUT chroot on Android directory.

WARNING : This solution is very bad because it create a REAL new /proc /dev and /sys IN the chroot directory !

Code:
Debian-ARMEL:/# cat /mnt/Debian/root/Dual.txt
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S<   15:40   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [ksoftirqd/0]
root         4  0.1  0.0      0     0 ?        S<   15:40   0:00  \_ [events/0]
root         5  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [khelper]
root         6  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [netns]
root         7  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [suspend]
root         8  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [kblockd/0]
root         9  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [kseriod]
root        10  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [kmmcd]
root        11  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [btaddconn]
root        12  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [btdelconn]
root        13  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [kondemand/0]
root        14  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [qmi]
root        15  0.0  0.0      0     0 ?        D<   15:40   0:00  \_ [rpcrouter]
root        16  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [detection/0]
root        17  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [krpcserversd]
root        19  0.0  0.0      0     0 ?        S    15:40   0:00  \_ [pdflush]
root        20  0.1  0.0      0     0 ?        D<   15:40   0:00  \_ [kswapd0]
root        21  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [aio/0]
root        30  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [kadspd]
root        31  0.0  0.0      0     0 ?        S<   15:40   0:00  \_ [panel_on/0]
root        32  0.0  0.0      0     0 ?        D    15:41   0:00  \_ [msmfb_refreshd]
root        33  0.0  0.0      0     0 ?        S<   15:41   0:00  \_ [kapmd]
root        38  0.1  0.0      0     0 ?        S<   15:41   0:01  \_ [mtdblockd]
root        39  0.0  0.0      0     0 ?        S<   15:41   0:00  \_ [synaptics_wq]
root        40  0.0  0.0      0     0 ?        S<   15:41   0:00  \_ [kstriped]
root        41  0.0  0.0      0     0 ?        S<   15:41   0:00  \_ [hid_compat]
root        52  1.0  0.0      0     0 ?        S<   15:41   0:06  \_ [mmcqd]
root      2743  0.0  0.0      0     0 ?        S    15:44   0:00  \_ [pdflush]
root         1  0.5  0.1   1968   180 ?        Ss   15:40   0:03 init [2]
root       777  0.5  0.3   2236   332 ?        S<s  15:41   0:03 udevd --daemon
root      1859  0.0  0.8  28688   836 ?        Sl   15:42   0:00 /usr/sbin/rsyslogd -c3
102       1872  0.0  0.2   2656   232 ?        Ss   15:42   0:00 /usr/bin/dbus-daemon --system
root      1884  0.0  0.4   5552   424 ?        Ss   15:42   0:00 /usr/sbin/sshd
root      1954  0.1  0.5   8480   536 ?        Ss   15:42   0:00  \_ sshd: root@pts/0
root      1956  0.0  0.4   4764   436 pts/0    Ss   15:42   0:00  |   \_ -bash
root      1961  0.0  0.1    296   116 pts/0    S+   15:42   0:00  |       \_ /init
root      2279  0.0  0.1    740   144 ?        Ss   15:42   0:00  |           \_ /system/bin/sh
1000      2280  0.0  0.1    808   156 pts/0    S    15:42   0:00  |           \_ /system/bin/servicemanager
root      2283  0.0  0.2    848   228 pts/0    S    15:42   0:00  |           \_ /system/bin/vold
root      2285  0.0  0.1    668   136 pts/0    S    15:42   0:00  |           \_ /system/bin/debuggerd
1001      2287  0.0  0.4   7868   440 pts/0    Sl   15:42   0:00  |           \_ /system/bin/rild
root      2289  2.3  9.1  70552  8956 pts/0    S    15:42   0:12  |           \_ zygote /bin/app_process -Xzygote /system/bin --zygote --start-system-server
1000      2605  5.2 18.0 143720 17716 pts/0    Sl   15:43   0:25  |           |   \_ system_server                                                          
1001      2661  0.6 10.8 108568 10684 pts/0    Sl   15:43   0:03  |           |   \_ com.android.phone                                                      
10005     2701  0.1  9.5  98320  9368 pts/0    Sl   15:44   0:00  |           |   \_ com.android.mms                                                        
10007     2735  0.1  9.5  98568  9404 pts/0    Sl   15:44   0:00  |           |   \_ com.android.inputmethod.latin                                          
10000     2746  0.7 12.4 100240 12260 pts/0    Sl   15:44   0:03  |           |   \_ com.android.email                                                      
10001     2768  0.2 10.0 107092  9852 pts/0    Sl   15:44   0:01  |           |   \_ com.android.calendar                                                   
10010     2791  0.1  9.7  96368  9544 pts/0    Sl   15:44   0:00  |           |   \_ com.google.android.apps.maps                                           
10014     2802  1.0 10.0  95628  9872 pts/0    Sl   15:44   0:04  |           |   \_ android.process.media                                                  
10018     2817  0.1  9.3  99568  9224 pts/0    Sl   15:44   0:00  |           |   \_ com.android.alarmclock                                                 
10038     2835  0.2  9.4  92348  9324 pts/0    Sl   15:44   0:01  |           |   \_ net.jaqpot.netcounter                                                  
10014     2844  0.0  9.2  92012  9056 pts/0    Sl   15:44   0:00  |           |   \_ com.android.camera                                                     
10008     2877  0.1  9.2  91888  9048 pts/0    Sl   15:45   0:00  |           |   \_ com.android.bugreport                                                  
10013     2911  0.3 10.0  95684  9896 pts/0    Sl   15:48   0:00  |           |   \_ com.google.process.gapps                                               
10007     2939  5.2 17.9 108632 17672 pts/0    Sl   15:49   0:05  |           |   \_ android.process.acore                                                  
1013      2291  0.2  1.2  25284  1188 pts/0    Sl   15:42   0:01  |           \_ /system/bin/mediaserver
1002      2294  0.0  0.1   1172   188 pts/0    S    15:42   0:00  |           \_ /system/bin/dbus-daemon --system --nofork
root      2298  0.0  0.1    800   172 pts/0    S    15:42   0:00  |           \_ /system/bin/installd
1008      2305  0.0  0.4   3372   440 pts/0    Sl   15:42   0:00  |           \_ /system/bin/akmd
root      2309  0.0  0.0   1268    36 pts/0    Sl   15:42   0:00  |           \_ /sbin/adbd
root      2626  0.4  0.7   8636   732 ?        Ss   15:43   0:02  \_ sshd: root@pts/2
root      2628  0.1  0.9   4764   904 pts/2    Ss   15:43   0:00      \_ -bash
root      2955  0.0  0.9   4204   948 pts/2    R+   15:51   0:00          \_ ps faux
root      1917  0.0  0.2   3868   272 ?        Ss   15:42   0:00 /usr/sbin/cron
root      1937  0.0  0.1   1560   124 tty1     Ss+  15:42   0:00 /sbin/getty 38400 tty1
root      1938  0.0  0.1   1560   124 tty2     Ss+  15:42   0:00 /sbin/getty 38400 tty2
root      1940  0.0  0.1   1560   124 tty3     Ss+  15:42   0:00 /sbin/getty 38400 tty3
root      1942  0.0  0.1   1560   124 tty4     Ss+  15:42   0:00 /sbin/getty 38400 tty4
root      1943  0.0  0.1   1560   124 tty5     Ss+  15:42   0:00 /sbin/getty 38400 tty5
root      1944  0.0  0.1   1560   124 tty6     Ss+  15:42   0:00 /sbin/getty 38400 tty6
 

binary.koala

Member
Mar 10, 2009
9
1
great, thanks for the hint. i will post my images when i succeed ;)

I use this tutorial to unpack and repack boot images : http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images

Simply download "http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot/initrd.gz" in your exmple, and repack the boot image with the netboot initrd !

You may add the initrd support to the kernel.
 

binary.koala

Member
Mar 10, 2009
9
1
i'm following the tutorial, but can not get my boot.img to actually boot. i can repack your 'boot-recovery.img' successfully, but i can not make a new bootable image using vmlinuz-2.6.31-100-imx51 + initrd.gz from http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot/

where is the trick?

do i need to use msm kernels? i noticed that your 'native-ubuntu' and 'native-debian' kernels are the same, did you use openmoko kernel there? if yes, how would it be possible to use current ubuntu-arm kernels?

chrz!
d

I use this tutorial to unpack and repack boot images : http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images

Simply download "http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot/initrd.gz" in your exmple, and repack the boot image with the netboot initrd !

You may add the initrd support to the kernel.
 

FukTheRegister

Senior Member
May 4, 2009
123
27
Paris
www.galoula.net
i'm following the tutorial, but can not get my boot.img to actually boot. i can repack your 'boot-recovery.img' successfully, but i can not make a new bootable image using vmlinuz-2.6.31-100-imx51 + initrd.gz from http://ports.ubuntu.com/ubuntu-ports/dists/karmic/main/installer-armel/current/images/imx51/netboot/

where is the trick?

do i need to use msm kernels? i noticed that your 'native-ubuntu' and 'native-debian' kernels are the same, did you use openmoko kernel there? if yes, how would it be possible to use current ubuntu-arm kernels?

chrz!
d

Simply the vmlinuz-2.6.31-100-imx51 is not for G1 phone !
You can repack the boot.img with my kernel from my recovery.img and with the initrd.gz of netboot.

And yes, I use msm-kernel sources from openmoko in my boot images, but I did not test kernel from Ubuntu arm. I don't know if he can boot, and if he has drivers for the phone.

The OpenMoko kernel is a fork of Android kernel, if I understood well.
 
Last edited:

redfvc

New member
Sep 4, 2009
1
0
Debian on the G1 cupcake CRC1

Hi all. I've tried installing Debian with the saurik's guide: http://www.saurik.com/id/10 and I have some problems. This is what I did:

1. On my standard (not ADP) G1 cupcake CRC1 I've used InstantRoot application to acquire root ( http://neilandtheresa.co.uk/Android/ ).

2. I've connected to my phone via adb shell, entered su and started executing the steps from the saurik's guide.

3. I've encountered problems while doing the insmod (I was given the same output as on the emulator - that this version of android hasn't been compiled to run insmod). But I didin't worry, saurik has stated that some newer android versions have support for ext2 so the insmod part isn't necessary.

4. mknod /dev/loop0 b 7 0 gives me permission errors. This doesn't happen on emulator and nowhere (google, irc) did I find any help.

Somebody at IRC adviced me to run the 'id' command. Even when I'm in su it doesn't return the "uid=0(root) gid=0(root)" (as it does in the emulator), but the same output as when run from outside the su (some lengthy list but _without_ root).

I. Does this mean that using the InstantRoot application didn't give me root privileges?

II. Is it possible to have debian on G1 CRC1 standard cupcake rom?

Thanks in advance for any help!
 

ransu

Senior Member
Oct 3, 2008
50
3
Fuktheregister, does your install of debian replace the android os? If not how do you choose to boot into debian instead of android?
 

tep065

Senior Member
Fuktheregister, does your install of debian replace the android os? If not how do you choose to boot into debian instead of android?

I came across a thread somewhere last night (at work now) that said it does not replace the Rom, it is just a shell. I would assume u would load it like an app on top of your current Rom. I in the process of researching this to apply it soon. Not too familiar with it, and been ages since i've messed with Linux in general. But I did read about the shell thing last night. I'm guessing that it will use the drivers that the rom has to run debian instead of coding new drivers specifically for debian...i'm prolly wrong but that makes sense to me if its just a shell and not a rom replacement
 

FukTheRegister

Senior Member
May 4, 2009
123
27
Paris
www.galoula.net
Fuktheregister, does your install of debian replace the android os? If not how do you choose to boot into debian instead of android?

My Debian Instal DOESN'T replace android.

In my test configuration Debian is on the 3thrd partition of my SD card.

To choose the OS on boot, I have make an custum recovery image.

If you boot your phone "normaly" you have Android, if you boot your phone on recovery mode (HOME + POWER) you boot on Debian.

I have make a new initrd, to have a "mega" recovery :
- It'as can boot Os on any partitions.
- It's can boot OS in a DIRECTORY (ex Debian, Ubuntu MID ...)
- It's can make a nadroid backup (not stable at this time)
- It's can leave on shell with Us or FR Keyboard.

Acutaly, I have a 2nd G1 phone, I test to install Debian in the NAND Flash, with Android on SD for the fun.
 

ransu

Senior Member
Oct 3, 2008
50
3
Oh i get it now. Why does everybody talk about the old debian method? This is waaaay better. You should start a new thread just for your debian install with a really complete tutorial that goes over every details for dummies like myself.

I still am wondering how big the 3rd partition needs to be. Also, Im assuming all the commands in the tutorial are done in the linux terminal? Do I need adb installed?
 
Last edited:

mrandroid

Senior Member
Jun 25, 2009
330
17
Miami
www.darklome.com
Guys I posted simple instructions on my site and in the forum here on how to install Debian... It's easy to boot... once installed, you just open up terminal and type
$ su
# bootdeb

and it boots up.

It's around 700-800MB... if you install a GUI you'll need to resize the debian Image to 1.5GB (minimum) and install the GUI.

I have each tutorial up... install debian, resize image and install a GUI. (My instructions included are to do it from a computer or straight from the phone if ytou don't have a linux computer)

The debian file I have on my site has been modded to work on Cupcake, Donut and Hero Builds. All you need on your phone is to have ROOT.

*** All of it runs from a DEBIAN folder on your SDCard so a Class 6 card is recommended ***
 
Last edited:

ransu

Senior Member
Oct 3, 2008
50
3
Guys I posted simple instructions on my site and in the forum here on how to install Debian... It's easy to boot... once installed, you just open up terminal and type
$ su
# bootdeb

and it boots up.

It's around 700-800MB... if you install a GUI you'll need to resize the debian Image to 1.5GB (minimum) and install the GUI.

I have each tutorial up... install debian, resize image and install a GUI. (My instructions included are to do it from a computer or straight from the phone if ytou don't have a linux computer)

The debian file I have on my site has been modded to work on Cupcake, Donut and Hero Builds. All you need on your phone is to have ROOT.

*** All of it runs from a DEBIAN folder on your SDCard so a Class 6 card is recommended ***

I appreciate it, but I've done that type of install before. Using vnc viewer to log into a debian gui running ontop of android is very slow. Fuktheregister has created a dual boot method. You don't even start Android. I can only assume its much faster, but Im trying to figure out all the details first.
 

blackknightavalon

Senior Member
Feb 1, 2009
3,216
534
Somewhere in NYC
Guys I posted simple instructions on my site and in the forum here on how to install Debian... It's easy to boot... once installed, you just open up terminal and type
$ su
# bootdeb

and it boots up.

It's around 700-800MB... if you install a GUI you'll need to resize the debian Image to 1.5GB (minimum) and install the GUI.

I have each tutorial up... install debian, resize image and install a GUI. (My instructions included are to do it from a computer or straight from the phone if ytou don't have a linux computer)

The debian file I have on my site has been modded to work on Cupcake, Donut and Hero Builds. All you need on your phone is to have ROOT.

*** All of it runs from a DEBIAN folder on your SDCard so a Class 6 card is recommended ***

Does anyone else get a reboot error when 1) running this for the first time and 2) typing in "# sh bootdeb"?

Running CM4.2.5 and trying to get it working. Followed initial instructions from here.
 
Last edited:

ccunningham83

Senior Member
Feb 13, 2009
234
1
Dallas
Debian problems

I am trying to perform the install as outlined from here:

http://www.myhangoutonline.com/2009/11/22/install-linux-on-your-g1/

When I get to step 10 and type:

Code:
sh /scripts/onetime.sh

I get:

Code:
sh: Can'topen /scripts/onetime.sh

Everything else seems to install fine. I didn't notice a change when it rebooted after typing:

Code:
sh bootdeb

in step 9. It just reboots then I go back to terminal recovery to proceed with step 10. I never get to set the root password. I would like to have it installed with the GUI as outlined in this tutorial

http://www.myhangoutonline.com/2009/11/25/resize-your-linux-image-from-phone-or-computer/

I first have to get Debian up and running first.