Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#58084 - 12/01/2002 03:03 Full-blown Debian on Empeg: The Easy Way
amit
new poster

Registered: 11/01/2002
Posts: 21
Loc: Bay Area
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

Top
#58085 - 12/01/2002 09:29 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
That's a hell of a first post. Welcome to the BBS! Thanks for a thorough and detailed guide. Until now most people have pretty much rolled their own Debian setups, but this seems like a very simple way to get things started.

So, do we have your permision to re-post this in the Developer Info section at www.riocar.org? You will, of course, be fully credited with the information.
_________________________
- Tony C
my empeg stuff

Top
#58086 - 12/01/2002 13:02 Re: Full-blown Debian on Empeg: The Easy Way [Re: tonyc]
amit
new poster

Registered: 11/01/2002
Posts: 21
Loc: Bay Area
Thanks Tony. Please feel free to re-post.

Regards
Amit

Top
#58087 - 12/01/2002 15:51 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
keil
new poster

Registered: 28/12/2001
Posts: 23
Loc: Los Angeles,CA
Amit,

Great howto! This sounds cool. For a http server, thttpd at:
http://lrp.steinkuehler.net/Packages/thttpd.htm
http://www.acme.com/software/thttpd/
may be ticket. The LRP version is compiled for debian. It's about 50k.

Keil

Top
#58088 - 12/01/2002 17:57 Re: Full-blown Debian on Empeg: The Easy Way [Re: keil]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
For an http server, just install the Hijack kernel. It's built-in, as is an ftp server.

Cheers

Top
#58089 - 20/01/2002 09:16 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
crocklobster
member

Registered: 19/12/2001
Posts: 108
Amit,

Great instructions here. Might be what I need to have a full time linux box up on my network. What I'm really looking for is to be able to run Samba on the empeg so I can use MP3TagStudio directly on the files on the empeg. Unfortunately, there is no MP3TagStudio for Linux (that I know of). So now I'm grappling with finally fixing up my ID3v2 tags on my network server and re-upping them to the new(est) empeg that I have.

So, would you (or anyone else) be able to provide a couple of more tips on getting Samba up using this method? Also, it would be great if someone could write a similar HOWTO on getting the same kind of functionality, but not using NFS. That is, bringing everything onto the empeg to get telnetd, nfs, and samba working. Luckily, ftp and http are provided by Hijack.

Chris

Top
#58090 - 20/01/2002 13:10 Re: Full-blown Debian on Empeg: The Easy Way [Re: crocklobster]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
You do realize that once the mp3s are on the empeg, it no longer references the ID3 tags, don't you?
_________________________
Bitt Faulk

Top
#58091 - 20/01/2002 19:31 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
bhima
new poster

Registered: 20/01/2002
Posts: 1
Excellent! Very helpful! Now...my next question is, what's the best way to load a full, 100% debian install directly onto the hard drive? That is, I want to turn an empeg into a Debian box...

Top
#58092 - 20/01/2002 21:36 Re: Full-blown Debian on Empeg: The Easy Way [Re: wfaulk]
crocklobster
member

Registered: 19/12/2001
Posts: 108
Yup, I realize (a.k.a. realise) that. What I want to do eventually is be able to delete my "source" mp3s from my server. They take up quite a bit of room. Since I plan on getting an HSX109 at some point, it should suffice to have a copy on the empeg(s) and a copy on the ADAC.

I do still want to be able to use these files at some later time. Say, I did want to move them to some new, as yet undeveloped, medium (or even back to a server), it would be very very good to have accurate ID3 tags... Well, the easiest way for me to do that would be to be able to run MP3TagStudio directly against the files on the empeg.

It wasn't really a concern about how they appeared on the player, I'm more insterested in making the actual mp3 file have correct tags for the future.

-c

Top
#58093 - 20/01/2002 23:08 Re: Full-blown Debian on Empeg: The Easy Way [Re: crocklobster]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Let's hope Roger adds ID3 tagging to emplode. Then you should be able to handle at least the primary tag data. MP3TagStudio is pretty cool, but with the file layour on the empeg, its batch functionality will be extremely limited (ie. crap). Tag Studio is tied to directory structure and doesn't provide convenient ways to manipulate files in groups - and it provides no way to manipulate/select based on existing tag data (which emplode does).

Bruno
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#58094 - 21/01/2002 00:20 Re: Full-blown Debian on Empeg: The Easy Way [Re: bhima]
amit
new poster

Registered: 11/01/2002
Posts: 21
Loc: Bay Area
Having the Debian distribution on the Empeg itself (no NFS mounting) should be pretty much the same. The only difference will be that you need to decide upon a directory to act as Debian's root, most likely on the music partition(s) because of the relatively small size of other partitions.

Maybe it will be a much better idea to have a second hard disk and use that for the Debian stuff.

Regards
Amit

Top
#58095 - 21/01/2002 14:10 Re: Full-blown Debian on Empeg: The Easy Way [Re: crocklobster]
amit
new poster

Registered: 11/01/2002
Posts: 21
Loc: Bay Area
I'd say just install the "samba-common" and "samba" debian packages and try to run samba as you would on a "normal" Linux system. I don't think the samba server needs any special support from the kernel (as opposed to the client, which needs smbfs).

Then again, it might need something which is not in the Empeg kernel (maybe IPC), but I'm afraid I can't experiment with anything right now: I think my Empeg's hard disk cable died :-(

Regards
Amit

Top
#58096 - 21/01/2002 14:16 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
The Samba client doesn't need smbfs. Only if you want to mount SMB filesystems. smbclient, etc., work fine without it.
_________________________
Bitt Faulk

Top
#58097 - 21/01/2002 14:17 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I think my Empeg's hard disk cable died :-(

Died or just worked loose somehow? I had mine work loose a couple times before I taped it into place.
_________________________
- Tony C
my empeg stuff

Top
#58098 - 21/01/2002 14:22 Re: Full-blown Debian on Empeg: The Easy Way [Re: tonyc]
amit
new poster

Registered: 11/01/2002
Posts: 21
Loc: Bay Area
I am pretty sure it died :-) Of course I am not going to void warranty by opening the Empeg and checking out personally, but I do have an intuitive feeling that even if I tried to re-seat the cable, switch ends, etc., it would not work. I also have a feeling that if I bend the cable in a certain way, it will work for a bit and then stop working :-P

Regards
Amit

Top
#58099 - 27/04/2003 13:33 Re: Full-blown Debian on Empeg [Re: amit]
Myrddin
new poster

Registered: 01/03/2002
Posts: 3
Loc: Netherlands
This seems like a reasonable thread to post my question.

I seem to have a problem mouting the nfs share I have created for developing stuff for my empeg.
The error I get is:
empeg:/empeg/bin# mount -t nfs 192.168.0.106:/depot/nfs/debian-empeg /mnt/debian

mount: fs type nfs not supported by kernel


In case it helps solving the problem:
My empeg runs the v2.00-beta13 developer image and the Hijack 334 (with 333 version indicator) kernel.

I'm sure I'm overlooking something very obvious, but I seem to require a hint towards to right direction.
_________________________
on the other hand... there are fingers

Top
#58100 - 27/04/2003 14:32 Re: Full-blown Debian on Empeg [Re: Myrddin]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
mount: fs type nfs not supported by kernel


Looks like you need nfs support enabled in your kernel. You will need to compile your own kernel (or get somebody here to do it) with the CONFIG_NFS_FS=y

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#58101 - 28/04/2003 00:28 Re: Full-blown Debian on Empeg [Re: mcomb]
Myrddin
new poster

Registered: 01/03/2002
Posts: 3
Loc: Netherlands
Since tempering with the empeg kernel still scares me off a bit, I would like to ask whether anyone would be so kind to provide me with a NFS-enabled kernel, please let me know.

As a side note: I am almost certain that I was able to mount NFS shares earlier, was NFS support taken out of the kernel for some reason (that might affect my empeg's playback)?
_________________________
on the other hand... there are fingers

Top
#58102 - 28/04/2003 12:35 Re: Full-blown Debian on Empeg [Re: Myrddin]
Chimaera
enthusiast

Registered: 10/09/2002
Posts: 285
Loc: DFW Area, Texas, US
Hi,

Let me have your email address and I will send it to you.
_________________________
Mark. [blue]MKI, MKII & MKIIa, all Blue, and all Mine![/blue]

Top
#58103 - 28/04/2003 12:49 Re: Full-blown Debian on Empeg: The Easy Way [Re: amit]
arvind_bk
stranger

Registered: 14/08/2001
Posts: 29
Yes, I did that with no problems. I tranferred all the debian stuff through Hijack's ftp server onto music partition and then chrooted to fully blown debian. Apache works great with PHP-3.

Top
#58104 - 29/04/2003 12:53 Re: Full-blown Debian on Empeg [Re: Chimaera]
Myrddin
new poster

Registered: 01/03/2002
Posts: 3
Loc: Netherlands
Mark,

Thanx very much! The kernel you sent works like a charm.
_________________________
on the other hand... there are fingers

Top
#58105 - 29/04/2003 15:07 Re: Full-blown Debian on Empeg [Re: Myrddin]
Chimaera
enthusiast

Registered: 10/09/2002
Posts: 285
Loc: DFW Area, Texas, US
No problem, I had the machine sitting here so it was just a matter of opening a new window and doing the compile.

Just glad it worked for you.
_________________________
Mark. [blue]MKI, MKII & MKIIa, all Blue, and all Mine![/blue]

Top