Greetings Folks

FYI, here's a (reasonably detailed, IMHO) note on how to get a full-blown Debian distribution working on the Empeg, without (greatly) messing with the player itself.

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) 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.

DISCLAIMER: 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 . Here are the steps:

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:

        /export/debian    empeg.somedomain(rw,no_root_squash) 

"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 firewalling 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

        /debian/dists/potato/main/disks-arm/2.2.25-2001-06-10/base2_2.tgz 

on ftp.debian.org .

Unpack this archive in /export/debian, preserving permissions.

        # tar -C /export/empeg -xpzvf /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

        /debian/dists/potato/main/binary-arm/ 

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):

        /debian/dists/potato/main/binary-arm/Packages.gz 

Needless to say, the telnet daemon and the ftp daemon would be nice to download. All packages you download should be kept in /export/debian/packages.

2. Onto the Empeg


  • Through a serial connection to the Empeg, drop to the shell (type 'q').
  • Mount the root file-system read-write.

            # rw 
  • 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 
  • Type `ls /mnt/debian' to make sure that the NFS mount worked.
  • Mount the proc file-system on /mnt/debian/proc

            # mount -t proc proc /mnt/debian/proc 
  • Type `ls /mnt/debian/proc' to make sure that the mount worked.
  • Since the base file-system we created above does NOT have Empeg specific devices in /dev, we do the following:

            # cd /dev 

            # tar -cpvf /mnt/debian/tmp/devices.tar . 

3. chroot


  • 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 chroot:

            # /mnt/debian/usr/sbin/chroot /mnt/debian /bin/sh -l 
  • Unpack /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 telnetd and ftpd, you would need to run /usr/sbin/inetd (unless you install versions of these daemons which are not "controlled" by inetd).

  • 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/debian do more stuff, like running `inetd' or `login', and so on. You can "arrange" for rc scripts to be run in the chroot'ed environment if needed.

- Amit