Sunday, March 8, 2009

Install emdebian on ARM device

Here is how I've successfully installed emdebian on my Fujitsu-Siemens Loox N560. I assume there is an already installed emdebian-tools package and cross-compilers. Next thing is to run the following commands:
cd /tmp;
mkdir grip/
sudo debootstrap --arch=arm --foreign lenny grip/
cd grip/
sudo tar -czf /tmp/emdebian-grip-arm-debootstrap.tgz .

Then SD card is to be partitioned with fdisk. For example it could be:

cfdisk /dev/sdX
mkfs.ext3 /dev/sdXy

where sdX - is a device for an SD card. And sdXy is a partition that is supposed to be used for linux on the SD card. Then mount the linux partition and untar the emdebian-grip-arm-debootstrap.tgz:

mount /dev/sdXy /mnt
cd /mnt
tar zxpvf /tmp/emdebian-grip-arm-debootstrap.tgz
ln -s bin/sh init
cd /tmp
umount /mnt

Now we can boot linux from the partition. When linux has booted and a command line appeared, run the following commands step by step:
cd /debootstrap
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
run ./debootstrap --second-stage
dpkg --configure -a
rm /init
cd /
ln -s sbin/init init

Now it is time to reboot linux again. This time a login prompt should work. Use root login and no password. Then configure basic settings:

echo 'nameserver' > /etc/resolv.conf
echo ' localhost' > /etc/hosts
echo ' myhost' >> /etc/hosts
echo 'myhost' > /etc/hostname

use actual nameserver IP instead of Reboot PDA one more time. Then configure network:

ifconfig usb0 netmask
route add default gw
Make sure network is up and running. Then upgrade your installation:

echo 'deb sid main' > /etc/apt/sources.list
apt-get update
apt-get dist-upgrade
apt-get install ...whateveryoulike...

And configure network properly.
cat > /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug usb0
iface usb0 inet static
dns-search your.domain


  1. I would love to give this a try, however I'm not able to get a console on the n560 PDA.
    Can make a "how to" to get me there?
    Or can you make a quick tarball of your 2 CF partitions, so I can play around with it?

  2. I tried to do it, but I have a question: how can I "boot linux from the partition"? The N560 can't boot from SD yet and my PC isn't armel, so how?

  3. a great question. if I know what device the sd card slot had I could probably get haret or cebootlin to boot from there. or are you using a virtual system to get this running.