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:
# use ethernet adapter
#APPEND initrd=path/to/initrd.img-184.108.40.206-slitaz mediashare=nfsserver:/path/to/mp3s mpdstate=nfsserver:/path/to/state-dir
# use WiFi adapter
APPEND initrd=IMAGES/slitaz/initrd.img-220.127.116.11-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
# ethernet, remote state
#APPEND initrd=initrd.img-18.104.22.168-slitaz mediashare=nfsserver:/path/to/mp3s mpdstate=nfsserver:/path/to/state-dir
# ethernet, local state
#APPEND initrd=initrd.img-22.214.171.124-slitaz mediashare=nfsserver:/path/to/mp3s mpdstate=/dev/hda2
# WiFi, remote state
APPEND initrd=initrd.img-126.96.36.199-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-188.8.131.52-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.
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
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.