Debian on the Empeg: A HOWTO© Amit Singh. All Rights Reserved. Written in 2001
As many might agree, it's easiest (and clean) to host the entire file-system on an NFS server, which the Empeg can mount and chroot into. I use a Red Hat Linux 7.2 "box" (a Sony VAIO laptop) as the NFS server. The entire procedure is fairly simple, as described below, and can be extrapolated to a local disk install as well.
Please note that the word "download" wherever used is tantamount to "get your hands on by hook or by crook". Moreover, the character '#' has been used to mean the root shell prompt, as well as a comment character in this description.
PLEASE USE AT YOUR OWN RISK. NO LIABILITIES WHATSOEVER ARE ASSUMED ON MY PART AND I SHALL NOT BE HELD RESPONSIBLE FOR ANY DAMAGE OR LOSS(ES) CAUSED TO YOU IF YOU CHOOSE TO FOLLOW INSTRUCTIONS DESCRIBED HERE.
Let us assume that you would be downloading the Debian ARM distribution from ftp.debian.org. The steps are given below.
0. The NFS Server
Designate a directory, say, "
/export/debian", on the NFS server. This directory will be exported read-write, with no root squashing, to the Empeg. Security issues are NOT addressed here! For example, on a typical Linux box, the
/etc/exports will look like:
empeg.somedomain" should be replaced by the IP address or host name of the Empeg on your network.
Please remember to make sure that NFS is working properly before proceeding. Laws of paranoia and Heisenberg's principle dictate that the NFS server be restarted, and any fire-walling be appropriately taken into account.
1. Downloading the Debian base file-system and packages
Next, we need to download the base file-system, which is a ~15.5 MB compressed tar-ball. The location is (please check for updated versions):
Unpack this archive in
/export/debian, preserving permissions.
# tar -C /export/empeg -xpzvf <SOME path>/base2_2.tgz
Make a directory
/export/debian/packages, where you can (should) download Debian packages that you intend to install for use on the Empeg. Look under:
on ftp.debian.org for packages too numerous to mention here. You might want to download the following file and figure out which package you need (you can see package dependencies too):
Needless to say, the telnet daemon and the ftp daemon would be nice to download.
All packages you download should be kept in
2. Onto the Empeg
- Through a serial connection to the Empeg, drop to the shell (type 'q').
- Mount the root file-system read-write.
- Create a directory
/mnt/debian, where we shall be NFS mounting the above mentioned file-system.
# mkdir -p /mnt/debian
- Mount the NFS file-system. Assuming your NFS server is called
linux.somedomain, you need to do the following:
# mount -t nfs -o rw,nolock linux.somedomain:/export/debian \ /mnt/debian
ls /mnt/debianto make sure that the NFS mount worked.
- Mount the proc file-system on
# mount -t proc proc /mnt/debian/proc
ls /mnt/debian/procto make sure that the mount worked.
- Since the base file-system we created above does NOT have Empeg specific
/dev, we do the following:
# cd /dev; tar -cpvf /mnt/debian/tmp/devices.tar .
- The Empeg does not have the chroot command to begin with, but it should be
present at this point in
/mnt/debian/usr/sbin. We can create a simple script called "
/sbin/debian" this way:
cat > /sbin/debian #! /bin/sh # --begin-- HOME=/root export HOME echo "empeg" > /proc/sys/kernel/hostname # You might or might not want to put this here. # mount -t proc proc /mnt/debian/proc /mnt/debian/usr/sbin/chroot /mnt/debian /bin/sh -l #--end-- ^D
- We run the above script, which will (hopefully) put us into a nice ARM
Linux environment. If the script does not work for some reason, try a simple
# /mnt/debian/usr/sbin/chroot /mnt/debian /bin/sh -l
/tmp/devices.tar, preserving permissions:
# tar -C /dev -xpvf /tmp/debian.tar
- It's a good idea to add a user at this point, and also set the root password (note that this will be done in the chroot'ed environment).
- At this point the system should appear to be fully functional. More
packages can be installed by using "
dpkg". (Remember that we have debian packages downloaded in what now appears as
/packages). If you choose to install
ftpd, you would need to run
/usr/sbin/inetd(unless you install versions of these daemons which are not "controlled" by
- Also, please note that an out of the box Apache will NOT run with an out of the box Empeg kernel (including the development version) because Apache wants System V IPC, which is not compiled in (and loadable module support is not enabled). However, this can be remedied.
- Finally, the system is "ready" (whatever that means). You can
tweak it, for example, make
/sbin/debiando more stuff, like running
login, and so on. You can "arrange" for rc scripts to be run in the chroot'ed environment if needed.