[Droid Eris Android Development] composerdude:
[LINUX] Debian Lenny on Droid Eris

Here it is, folks! Instructions for running Debian Lenny on your Eris. I'll work out the rest of the kinks this weekend, God willing, and I'll hopefully have a working MeeGo image for download after I've worked out the kinks. Have Fun!!

1. Create ARM image containing Debian Lenny

In Linux command line

- Download Debian ARM Installer

wget http://ftp.de.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/initrd.gz

wget http://ftp.de.debian.org/debian/dists/lenny/main/installer-armel/current/images/versatile/netboot/vmlinuz-2.6.26-2-versatile

- Create disk image

qemu-img create -f qcow deb-arm.img 4G

- Run QEMU VM to run Debian ARM Installer

qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-2-versatile -hda deb-arm.img -initrd initrd.gz -append "root=/dev/ram" -m 256

- In Debian installer, follow prompts

I chose the following user access, root-pass:debian91, user:debian and pass:debian91

Install desired defaults. I initially went with desktop environment; core environment may be best for MeeGo

- Reboot VM ONCE to permit it to statisfy any changed dependencies; ensure that -initrd and -kernel args are removed

qemu-system-arm -M versatilepb -hda deb-arm.img -append "root=/dev/ram" -m 256

2. Create filesystem on phone and copy Lenny

In Linux SUPER-USER command line

- Backup SDCARD if necessary

- Enter superuser mode

"sudo sh" or "sudo bash"

- Partition SDCARD

Use partition editor of choice (I used GParted)

FAT must be first partition

Create second partition as ext3

- Mount EXT3 partition

mkdir sd

mount -t ext3 /dev/sdb2 sd

- Convert QCOW image to RAW image

qemu-img convert deb-arm.img -O raw deb-arm.raw

- Mount RAW image as loop

mkdir image

mount -t ext3 deb-arm.raw image -o loop,offset=32256

- Copy image contents to EXT3 partition on SDCARD

cp -r image/* sd

- Unmount both SDCARD and RAW image

- umount deb-arm.raw && umount /dev/sdb2

3. Bind necessary nodes and create chroot jail

In eiter ADB or in rooted phone command line (either method MUST BE SUPERUSER!!!)

- Enter superuser mode

"su" or "adb su" (make sure to accept and remember if asked on rooted phone)

(NOTE: The folowing commands should use "adb busybox" as a prefix if using ADB in terminal)

- Mount EXT3 partition (should be /dev/block/mmcblk0p2)

mkdir /data/local/debian

mount -t ext3 /dev/block/mmcblk0p2 /data/local/debian

- Bind the necessary nodes

mount --bind /dev/pts /data/local/debian/dev/pts

mount --bind /proc /data/local/debian/proc

mount --bind /sys /data/local/debian/sys

sysctl -w net.ipv4.ip_forward=1

- Enter into Debian system

chroot /data/local/debian /bin/bash

4. Installing MeeGo and opening an Xsession through VNC

- COMING SOON!! (like, over the weekend)

Connecting chroot to VNC

Running MeeGo environment

- Why Not Now

Finding the best way to get an xserver on Android... possibly without VNC

Seeing which is better, install MeeGo before copying to SDCARD, or after

- Possible future: adapting Lenny to favorite distro flavor

- This would take a lot more of my time, and those who want to convert it to ubuntu can google it more easily