Mini MPD release

As described in https://pfichtner.wordpress.com/2009/10/13/mpd-mini-distro/ I searched a minimalistic distribution to run a MPD that fits on a 32 MB DOM (SSD) of a T-Online Vision S100. I decided to use SliTaz as distribution. It was harder to get it work than I thought at the beginning but I finally solved all problems. The size of the complete system (kernel and initrd) is 11.2 MB only.

I successfully booted my S100s using the following boot mechanisms:

  • PXE using the builtin ethernet adapter
  • PXE using the builtin WiFi adapter (using my kexec environment s100-wifi-boot)
  • directly from the builtin DOM (SSD) using syslinux

Local, ethernet and even WiFi (near to AP) boot times are all around 12 seconds (including mp3 share network mount).

While booting the mp3 media share (NFS) is mounted. The share has to be specified as kernel parameter (mediashare). SMB support is included in the system but this absolutely untested yet.

MPD stores  a bunch of files (actual state like played song, shuffle mode, playlists, etc.). To be able to persist these settings you can specify a kernel parameter named “mpdstate”. I tested it with a local partition (mpdstate=/dev/hda2) and also a NFS share (mpdstate=nfsserver:/path/to/state-dir).

Installation is more than simple, this is configuration file when using PXE boot:

DEFAULT mini-mpd
LABEL mini-mpd

KERNEL path/to/vmlinuz-2.6.30.6-slitaz

# use ethernet adapter
#APPEND initrd=path/to/initrd.img-2.6.30.6-slitaz mediashare=nfsserver:/path/to/mp3s mpdstate=nfsserver:/path/to/state-dir
# use WiFi adapter
APPEND initrd=IMAGES/slitaz/initrd.img-2.6.30.6-slitaz wdev=wlan0 wtype=WPA wessid=yourssid wkey=yourkey mediashare=nfsserver:/path/to/mp3s mpdstate=nfsserver:/path/to/state-dir

Installation to local DOM (SSD) is not more difficult:

  • create a primary partition to hold kernel and initrd (FAT32, type c), size should be 24 MB, so there’s enough space left for the second partition, mark this partiton as active (bootable)
  • create another primary partition to hold the MPD state files (Linux, type 83), the rest of the DOM (8 MB)
  • write the MBR to the DOM (part of the syslinux project)
  • mount first partition, copy kernel and initrd to it and create a syslinux.cfg (see below)
  • umount partition and call syslinux

DEFAULT mini-mpd
PROMPT 0
TIMEOUT 5
LABEL mini-mpd
KERNEL vmlinuz-2.6.30.6-slitaz
# ethernet, remote state
#APPEND initrd=initrd.img-2.6.30.6-slitaz mediashare=nfsserver:/path/to/mp3s mpdstate=nfsserver:/path/to/state-dir
# ethernet, local state
#APPEND initrd=initrd.img-2.6.30.6-slitaz mediashare=nfsserver:/path/to/mp3s mpdstate=/dev/hda2
# WiFi, remote state
APPEND initrd=initrd.img-2.6.30.6-slitaz wdev=wlan0 wtype=WPA wessid=yourssid wkey=yourkey mediashare=nfsserver:/path/to/mp3s mpdstate=nfsserver:/path/to/state-dir
# WiFi, local state,
#APPEND initrd=initrd.img-2.6.30.6-slitaz wdev=wlan0 wtype=WPA wessid=yourssid wkey=yourkey mediashare=nfsserver:/path/to/mp3s mpdstate=/dev/hda2

Both config files (PXE and syslinux) are included in the downloadable archives.

The archives can be downloaded from mini-mpd.dyndns.org as generic x86 version (17 MB) and the special stripped version for the S100 (12 MB).

To keep maintenance as simple as possible you can ssh into your box via user “tux” and password “tux”. Type “su” to get root privileges (guess the password! ;-)).

Have a lot of fun

[Update 2009-02-01]

The S100 image now supports the standard S100 IR remote (which came bundled with the S100)! This is done by invoking ncmpc on VT2 getting it’s input from an alternate lirc daemon named “inputlirc”. Image size sligtly increased but still is about 12 MB.

Advertisements
This entry was posted in Linux, MPD. Bookmark the permalink.

20 Responses to Mini MPD release

  1. Chris says:

    Hi Peter,
    first of all — “gerat work” an “RESPECT”.

    I try to install your mini – mpd on an thin client with Realtec RTL 8139 Net-Card and an VT 8235 South Bridge.
    First result : no lan and no soundcard

    ist there any way to get the alsa driver snd-via82xx running?
    Do you have an idear why the net cart didn’t work.

    Chris

    • pfichtner says:

      Hi Chris,
      curious, the S100 is equipped with hardware that exactly needs the same modules. Take a look at the output of “dmesg”, is there anything to see? Is the module loaded (“lsmod”)? Beware: The module for the RTL8139 is compiled into the kernel, so it’s not loaded as module (but noticeable in the kernel log).
      dmesg | grep 8139
      8139too Fast Ethernet driver 0.9.28
      8139too 0000:01:06.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
      eth0: RealTek RTL8139 at 0xc873ec00, 00:xx:xx:xx:xx:xx, IRQ 11
      eth0: Identified 8139 chip type 'RTL-8100B/8139D'

      What happens when calling “alsamixer” (module snd_intel8x0 has to be loaded for that)

      Keeping my fingers crossed, Cheers Peter

      • Chris says:

        Hi Peter,
        thanks for your “open ear”. I checked the nic driver via dmesg. It said that 8139too is not responsible for the chip and I should use 8139cp instead (it seems to be an 8139C Nic Chip). So no driver is loaded.
        I checked was happend when I use “slitaz-2.0-justX.iso” and there the Nic works and dmesg shows:
        8139too unknown chip version, assuming RTL-8139
        eth0: RealTek RTL at … IRQ 10
        eth0: Identified 8139 chip type ‘RTL-8138’

        any idear how I can get the driver 8139cp in th Mini MPD ???

        Chris

  2. pfichtner says:

    Hi Chris,
    I am using the uptodate kernel version from the SLiTaz repository, I did not patch anything.
    You could to the following:

    1. Extract my initrd (gunzip it than extract it using cpio -i initrd.img)
    2. Copy your modules over the existing ones
    3. Rebuild initrd
    4. Boot your(!) kernel and the newly created initrd

    Good look
    Peter

    • Chris says:

      So finaly Ive got it with a self made Distro.
      Last Problem I have to solve ist that the cifs share is not recocnized. That mean I can see my music files in /media/music with the “ls” command an I can “mv” the file frm the share to the flash disk but when I startet mpd to built up the databes it recocnize there no mp3 file an the database is empy (message: current locale is “C” setting filesystem charset to ISO-8859-1) That’s all ????

      Any idear??? Ive no nfs server !

      Chris

      • pfichtner says:

        Hi Chris,
        I think this is not an error but a warning message.
        MPD takes some time to fill its database, so have some patience!
        Regards, Peter

  3. Chris says:

    Hi Peter,
    I’ver got it. It was my fault. I allways controled the mpd-pc via telnet an so I’ did’t see the error message.
    I used the mount.cifs command witout “-o nounix” command and so the share isn’t properply mouted.
    Now I can start with my musik!!!

    Thanks a lot for your asisance!!!

    regards, Chris

    • pfichtner says:

      Congratulations Chris,
      perhaps you can explain what you did to get it work so others can rebuild that system?
      What files did you modify etc.?

      Regards
      Peter

  4. Pingback: MPD mini distro « Peter Fichtner's Blog

    • Chris says:

      sorry for late answer, but I had a few days off.
      Ok let’s start. To get the system runnig I used the “old” kernel because it fixed my Problem with LAN (WLAN is not necesarry for me).
      I used the flavor “slitaz-2.0-base.iso” (6,4M) an installed it on an USB Stick. Have a look at the tool “UNetbootin” ist makes nearl evrery .iso bootable on an USB Stick whithin a sing click.
      So Lan works pefect and with a few modification in the /etc/daemons.conf (delete options in dropbear) I could access my mpd min from my comuter via ssh.
      Next step is to get the soundchip driver “snd_via82xx” working. For that I hat to install “alsa-utils”, “alsa-libs and “linux-sound”. With this packages and the command “soundconf” it was done in a minute. To save all changes I “mount /dev/sda1 /home” and used “tazusb writefs gzip”.
      Next step was to enable to mount my NAS shares with mount.cifs (you to install it by hand because tere is no package) an it works pefect (remeber to mount with mount-cifs //192.168.?.?/share/music /media/music -o user=tux,pass=tux,rw,nounix)
      Last but not least I installed the mpd with its depended packetges, created the neccesary Direcories.
      All start up and mounting is done in the /etc/init.d “rc.local” .
      So Ithink thats all. Result is a 10,1 MB mini mpd that’s boots in about 20s and is uses my realy large music collection on an NAS.
      By the way remotely controlled via a smartphone (wlan) ant it works perfect.
      What I miss is a way to wake up the mini-mpd and to send it via an remote order to sleep.
      Any Idears are welcome 😉

  5. Ferdinand says:

    Hi
    I really like your distro! I was just wondering if you could help me with two “problems”:
    How would I define a samba share as source (syntax)?
    Would it be possible to attach a second HD (USB disk) to the s100 and have the mp3 on there? How would I define that (/dev/sda1 did not work).
    Thanks a lot and great job!
    Ferdinand

  6. Peter Fichtner says:

    I fear that SMB mounts are technical possible but not yet supported by the boot script (see Chris’ posts above). The same should apply for the USB disc.
    You could ssh to the running box and try to do the manually. If it will work manually we could alter the bootscripts of the distro.

  7. Paxton says:

    Hi,
    very interesting Distro with mpd for the S100. Unfortunately there is no way to download, the Links are broken.
    Could you please Upload it again.

    Thanks, Paxton

  8. Benedikt Müssig says:

    Hello, can you please, please, please reupload the files 🙂 i really need them!

  9. Drummer44 says:

    Hi Peter,
    The links do not seem to work.

    Any news on these ?
    Kr

  10. Hey, the download links are broken again 😦 Can you please fix them?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s