Category:YourCategoryHere
From SqueezeboxWiki
Work in progress --please don't use this !!!
SqueezePlug -- The perfect SqueezeBox-Server
SqueezePlug means "SqueezeBox-Server on a SheevaPlug"
SheevaPlug is a very small server, perfect for hosting your SqueezeBox-Server
I did a lot of research to find this system and I'm sure that systme is the best for SqueezeBox-Server by far.
The advantages are:
- enough performace for your SqueezeBox-Server and all plugins
- very less power consumption, need only 3-5 Watt so you can leave it "allways on"
- Plug and forget system
- very easy to install if you use one of my images and follow this wiki
- very flexilbe to connect your music library (USB-Drives, NAS, Network-Shares ...)
- very easy to use, mentain und upadte
- and a lot more
SqueezePlug --Simple Systems Need Simple Solutions
This project was formerly called SqueezeBox-Server for dummies.
Please visit my blog: SqueezePlug Blog and you will find everything you need!
Contents |
Preface
You don't have ro be a Linux expert, this guide will lead you to your own SqueezeBox-Server (SBS) with no Linux know how nessesary.
It's very important that you type all commands exactly as described in the guide. Please remember that all commands in Linux are case-sensitive.
If you find some faults or improvements, please let me know so that I can change this guide.
Prerequisites
- SheevaPlug (I’ve ordered mine at http://www.newit.co.uk, great company)
- U-boot Version 3.4.19 or newer (Version-check described later in this guide)
- Minimum 2GB SD-Card (the size depends on the installation methode you choose, SDHC, as quick as possible, class 6 would be fine) I've used a SANDISK Extreme III 30MB Edition
- USB drive, NAS or other file-share for storing the music
- Working Internet connection for the SquezeePlug
- optional: DHCP server from which the SqueezePlug gets its IP-address after starting for the first time
Installation Methodes
There are three installation methodes you have to choose one from:
1. SquuezePlug_Main - Preinstalled SqueezePlug with all you need including skript for customization
2. SqueezePlug_Mod – Same as SquuezePlug_Main but modified image from NewIT, so that you don’t have to change anything with the NewIT plugs.
3. SqueezePlug_Base – Just Debian Squeeze in an actual version to build your own solution on it using my wiki
The SqueezePlug_Base image comes as an 2GB image, so that you can use it on nearly every card and its variable to enlarge if you like. The other two images come as 4GB images, because most of you uses such cards and its enough space for ev everything you need.
This Wiki is construted modular. All steps you have to go depends on the installation methode and your personal environment. So be careful to follow exact the links matches to your environment.
Which methode you should choose?
I recommend to use the SquuezePlug_Main methode if you want to get the best of all and are not scared to change some setting on your SheevaPlug. It's easy to change it back, but some people don't want to change anything on their plug.
For those people I provide the SqueezePlug_Mod methode. This methode depends on the very famous version from NewIT, the multi-boot option. If you own such a plug or want to order one, it's fine. All three methodes works for that plug and you can choose the one fitting for you.
The last methode is the SqueezePlug_Base methode. It's just a Debian Squeeze installation where you can install all things on top by your self. This one comes on a 2GB image and is flexible to enlarge it with a partitioner like gparted or something else.
You can download all images at my blog: SqueezePlug Blog
Start here
The quickest way to setup your SqueezePlug is to use one of my images. It’s built for people who have no, or just a little, knowledge in linux and don’t want to spend a lot of time doing all the steps on their own.
Images are made with the USB Image Tool for windows systems. You can download it here: http://www.alexpage.de/.
- Install this tool on your windows-system.
- After downloading an image, unpack it to your PC by clicking on the self extracting archive. (Do a virus-scan before you execute this file)
- Start the USB Image Tool (as administrator) and burn the .img file to your sd-card by using this tool.
- Be sure to set the tool in the “device mode” not in the “volume mode”
- You can also use larger cards and expand the system partition later using gparted or another tool for expanding partitions.
I’ve used the latest patched version of SBS for my images (7.4.2~xxxxx). This version works fine for me. If you like, you can easily update to an other version by simply installing the new package over the old one. Settings and the database will be migrated. Just keep in mind that you have to tune your SBS Server, if you wish, every time you’ve installed a new version as described at the end of this guide see #Tuning the Squeezeboxserver.
Quick Steps
If you don’t like to read the whole document, just use the Stage2 or Stage3 image and customize the SBS Server by the following easy steps:
Prepare the system
- Make a serial (USB) Connection to your SheevaPlug.
- Interrupt the booting-process by hitting <<return>> several times and insert your sd-card. If you are not quick enough with the interrupt, boot the linux-system from NAND and shut it down afterwards by typing:
login as: root pw: nosoup4u shutdown –r now
- Interrupt the booting-process again by hitting <<return>> several times.
- Check your version of the u-boot environment:
Marvell>> version
If you're running a version of u-boot older than 3.4.19 you have to update u-boot before proceeding with the next steps! Please read here: http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html
Best you do it with the "TFTP-methode" use Tftpd32 which you can find here: http://tftpd32.jounin.net/. Be sure to set "TFTP Security" to "none".
Important: Following this wiki you have to change some environment variables of your SheevaPlugs u-boot configuration. Changing of u-boot may prevent booting of your SheevaPlug. If this happens, you have to repair it with the SheevaPlug-Installer see: http://www.openplug.org/plugwiki/index.php/SheevaPlug_Installer. That's a little tricky. So be careful in changing such things. It’s recommended to test everything first without the command “saveenv”. So be very careful if you do a “saveenv”. In your own interest: Save all u-boot settings by typing “printenv”. Copy the whole output to the clipboard and save it to a normal text-file. So you know the default settings and you be able to go back there every time.
Before you change a variable be sure that you’ve saved the original value.
- You can do it with the command:
Marvell>> printenv
Without arguments, you get all values.
- If you want to see only one value type f. e.:
Marvell>> printenv arcNumber
- Change some u-boot environment settings:
Marvell>> setenv mainlineLinux yes Marvell>> setenv arcNumber 2097 Marvell>> setenv bootargs_console console=ttyS0,115200 Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage' Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000' Marvell>> run bootcmd
Some people reported that their mmc-card is not always detected by the SheevaPlug. There is a workaround to solve this problem: Do the “mmcinit” command twice and it will work. It looks like this:
Marvell>> setenv bootcmd_mmc 'mmcinit;mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
- Test everything and only if everything is working as it should save the environment by typing:
Marvell>> saveenv
If you are still unsure, wait till the end of this part, there is an other hint to do it!
Network setup
- Login to the system and configure your network settings:
sheeva01 login: root Password: nosoup4u sheeva01:~# nano /etc/network/interfaces
- Change the file like this (depends on your network setup).
You can replace the whole text or just delete the “#” and the "<>" and change the settings as you need it:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # # The loopback network interface auto lo iface lo inet loopback # # The primary network interface allow-hotplug eth0 # # for DHCP use: # iface eth0 inet dhcp # # for static IP use something like this (depends on your network setup): # iface eth0 inet static # address <192.168.2.102> # netmask <255.255.255.0> # network <192.168.2.0> # Broadcast <192.168.2.255> # gateway <192.168.2.1>
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Shutdown and restart the network with the new settings:
sheeva01:~# ifdown eth0 sheeva01:~# ifup eth0
You now can choose between connecting via USB-Serial connection or network connection. I suggest to check the interface settings first and then connect via network connection:
sheeva01:~# ifconfig
- Proof the settings and if they are correct, make a new network connection (SSH) via putty.
Build file-sharing connections
Your way to connect a music library depends on your personal environment. Options discussed in this wiki are:
- USB Fat/Fat32 drive
- USB NTFS drive
- NFS Connection (normaly a NAS-Connection)
- Samba Connection
There may be other options. Please tell me or complete this wiki.
USB Fat/Fat32 drive
- Plug the USB-drive in to your SheevaPlug.
- Find out the name of your USB-drive by typing:
sheeva01:~# fdisk -l | grep FAT32
You now see the name of the USB-drive.
- Remember the name and edit the fstab-file:
sheeva01:~# nano /etc/fstab # </dev/sda1> /mnt/usb/music vfat rw,user,auto 0 0
- Delete the "#" and the "<>" and replace /dev/sda1 with your drive name.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Mount all drives:
sheeva01:~# mount -a
If you like to update files on the USB drive from a Workstation on your network, you have to install and configure a Samba Server look at #Install Samba Server.
USB NTFS drive
- Plug the USB-drive in to your SheevaPlug.
- Find out the name of your USB-drive by typing:
sheeva01:~# fdisk -l | grep NTFS
You now see the name of the USB-drive.
- Remember the name and edit the fstab-file:
sheeva01:~# nano /etc/fstab # </dev/sda1> /mnt/usb/music ntfs-3g defaults,locale=en_US.utf8 0 0
- Delete the "#" and the "<>" and replace /dev/sda1 with your drive name.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Mount all drives:
sheeva01:~# mount -a
If you like to update files on the USB drive from a Workstation on your network, you have to install and configure a Samba Server look at #Install Samba Server.
NFS Connection
- Configure your NAS to accept connections from the SheevaPlug. Consult your NAS documentation.
sheeva01:~# nano /etc/fstab # <192.168.2.100:/raid/data/iTunes_music> /mnt/nfs/music nfs defaults 0 0
- Delete the "#" and the "<>" and replace <192.168.2.100:/raid/data/iTunes_music> with your connection data.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Mount all drives:
sheeva01:~# mount -a
Samba Client Connection
With these settings you get a connection from your SheevaPlug to a samba share. Use this if your music-library is stored on a samba server on your network.
- First make sure that your Samba-Share is working properly. It is in my opinion best to test with a client-system other than the SheevaPlug initially, just to make sure that the share is working. Set the user and the rights for your Samba-Connection and remember the values
- Install Samba on Your SheevaPlug:
sheeva01:/# apt-get --yes update sheeva01:/# apt-get --yes upgrade sheeva01:/# apt-get --yes install smbfs
- Edit /etc/fstab:
#//<192.168.2.10/samba> /mnt/samba/music smbfs username=<username>,password=<password>
- Delete the "#" and the "<>" and replace <192.168.2.10/samba> with your connection data.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Mount all drives:
sheeva01:~# mount -a
Making changes permanent
- If you have not changed the environment variables, do it now:
sheeva01:~# shutdown -r now
- Interrupt the booting-process by hitting <<return>> several times and then type:
Marvell>> setenv mainlineLinux yes Marvell>> setenv arcNumber 2097 Marvell>> setenv bootargs_console console=ttyS0,115200 Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage' Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000' Marvell>> saveenv
Customize your Squeezeboxserver
- Connect to your SBS by typing http://<192.168.2.102>:9000 in your web browser.
- Put in your data for mysqueezebox.com.
- Configure the path to your music library and playlists.
- Stop scanning the database.
To show the correct artwork (especially for the Controller), the next step is very important.
- Store your artwork in the same folder as the songs. Store it as “folder.jpg” in every album folder.
Example:
- Williams, Robbie
- Reality Killed The Radio Star
- folder.jpg
- Reality Killed The Radio Star
- Type your path to your music library in “Advanced” “Artwork Folder”.
- Type %folder.jpg in “Advanced” “Artwork”.
- Make a complete scan of your database.
- Customize SBS as you like.
Congratulations you have finished!!!
Installing the base system
If you don’t like to use one of my images you can go the way by yourself.
Prepare the system
- Format your sd-card with fat32 from your windows system.
- Copy the files uImage and uIntrd to your sd-card.
- Download the files here:
uImage: http://people.debian.org/~joeyh/d-i/armel/images/daily/kirkwood/netboot/marvell/sheevaplug/uImage
UInitrd: http://people.debian.org/~joeyh/d-i/armel/images/daily/kirkwood/netboot/marvell/sheevaplug/uInitrd
Attention: If you download the files with IE, the files get an .txt: Delete this before copy the files to the sd-card.
- Boot your SheevaPlug and interrupt the boot-process by hitting <<return>> several times. If you are not quick enough with the interrupt, boot the linux-system from NAND and shut it down afterwards by typing:
login as: root pw: nosoup4u shutdown –r now
- Interrupt the booting-process again by hitting <<return>> several times.
- Before you begin, check your version of the u-boot environment:
Marvell>> version
If you're running a version of u-boot older than 3.4.19 you have to update u-boot before proceeding with the next steps! Please read here: http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html
Before you change a variable be sure that you’ve saved the original value.
- You can do it with the command:
Marvell>> printenv
Without arguments, you get all values.
- If you want to see only one value type f. e.:
Marvell>> printenv arcNumber
- Change some setting of your SheevaPlug:
Marvell>> setenv mainlineLinux yes Marvell>> setenv arcNumber 2097 Marvell>> saveenv Marvell>> reset
- Plug in your sd-card and type:
Marvell>> mmcinit Marvell>> fatload mmc 0:1 0x0800000 /uInitrd Marvell>> fatload mmc 0:1 0x400000 /uImage Marvell>> setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most Marvell>> bootm 0x400000 0x0800000
Install Debian
- The bootstrap system starts and you can begin the installation of Debian.
The installation itself should be pretty standard. The installer knows about the SheevaPlug and will create a bootable kernel and ramdisk at the end of the installation.
Because of an unfixed error in the installation I recommand to partition the sd-card manual and not automaticly.
Erase the existing partitions and data and build new ones.
All partitions are primary partitions.
The essential parameters for the installation are:
Partitions
- Partition: /boot; Size: 128 MB; file-system: ext2; Flag: boot
- Partition: Swap; Size: 256 MB; file-system: swap
- Partition: /; Size: Rest of space; file-system: ext3
Software Selection
- SSH server
- Standard system utilities
- After installing the Debian system do the following steps and boot your system:
Marvell>> setenv bootargs_console console=ttyS0,115200 Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage' Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000' Marvell>> saveenv Marvell>> run bootcmd
Some people reported that their mmc-card is not always detected by the SheevaPlug. There is a workaround to solve this problem: Do the “mmcinit” command twice and it will work. It looks like this:
Marvell>> setenv bootcmd_mmc 'mmcinit;mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
Please note that you may have to replace /uInitrd and /uImage with /boot/uInitrd and /boot/uImage depending on the way you installed Debian. By default, Debian will create a separate boot partition, so the full path to the kernel is /uImage. However, if you choose to put everything on the same partition, you have to use /boot/uImage.
The steps above are from the the documentation here http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html. If you like, you also can read it from here.
Special hint: By pressing <ctrl> <c> you copy the commands from the wiki to the clipboard. Then click the right mouse button to paste the commands to the putty terminal.
First start of the base system
login as: root pw: nosoup4u
Network setup
- Login to the system and configure your network settings:
sheeva01 login: root Password: nosoup4u sheeva01:~# nano /etc/network/interfaces
- Change the file like this (depends on your network setup).
You can replace the whole text or just delete the “#” and the "<>" and change the settings as you need it:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # # The loopback network interface auto lo iface lo inet loopback # # The primary network interface allow-hotplug eth0 # # for DHCP use: # iface eth0 inet dhcp # # for static IP use something like this (depends on your network setup): # iface eth0 inet static # address <192.168.2.102> # netmask <255.255.255.0> # network <192.168.2.0> # Broadcast <192.168.2.255> # gateway <192.168.2.1>
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Shutdown and restart the network with the new settings:
sheeva01:~# ifdown eth0 sheeva01:~# ifup eth0
You now can choose between connecting via USB-Serial connection or network connection. I suggest to check the interface settings first and then connect via network connection:
sheeva01:~# ifconfig
- Proof the settings and if they are correct, make a new network connection (SSH) via putty.
Update the system
- Open a new putty IP connection with the new IP-settings:
login as: root root@192.168.2.102's password: nosoup4u sheeva01:~# apt-get --yes update sheeva01:~# apt-get --yes upgrade
- at warnings press <<q>>
Build file-sharing connections
Your way to connect a music library depends on your personal enviroment. Options disscused in this wiki are:
- USB Fat/Fat32 drive
- USB NTFS drive
- NFS Connection (normaly a NAS-Connection)
- Samba Connection
There maybe other options. Please tell me or complete this wiki.
- For all types you need a mount point. For simplicity we create mount points for every type of connection:
sheeva01:~# mkdir -p /mnt/nfs/music /mnt/samba/music /mnt/usb/music
USB Fat/Fat32 drive
- Plug the USB-drive to your SheevaPlug.
- Find out the name of your USB-drive by typing:
sheeva01:~# fdisk -l | grep FAT32
You now see the name of the USB-drive.
- Remember the name and edit the fstab-file:
sheeva01:~# nano /etc/fstab # </dev/sda1> /mnt/usb/music vfat rw,user,auto 0 0
- Delete the "#" and the "<>" and replace /dev/sda1 with your drive name.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Edit the rc.local file for forcing the system to mount the usb-drive on every start:
sheeva01:~# nano /etc/rc.local
It should look like this:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. mount -a exit 0
- Mount all drives:
sheeva01:~# mount -a
If you like to update files on the USB drive from a Workstation on your network, you have to install and configure a Samba Server look at #Install Samba Server.
USB NTFS drive
Install the NTFS-driver:
sheeva01:~# apt-get --yes install ntfs-3g
- Plug the USB-drive to your SheevaPlug.
- Find out the name of your USB-drive by typing:
sheeva01:~# fdisk -l | grep NTFS
You now see the name of the USB-drive.
- Remember the name and edit the fstab-file:
sheeva01:~# nano /etc/fstab # </dev/sda1> /mnt/usb/music ntfs-3g defaults,locale=en_US.utf8 0 0
- Delete the "#" and the "<>" and replace /dev/sda1 with your drive name.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Edit the rc.local file for forcing the system to mount the usb-drive on every start:
sheeva01:~# nano /etc/rc.local
It should look like this:
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. mount -a exit 0
- Mount all drives:
sheeva01:~# mount -a
If you like to update files on the USB drive from a Workstation on your network, you have to install and configure a Samba Server look at #Install Samba Server.
NFS Connection
- Configure your NAS to accept connections from the SheevaPlug. Consult your NAS documentation.
sheeva01:~# nano /etc/fstab # <192.168.2.100:/raid/data/iTunes_music> /mnt/nfs/music nfs defaults 0 0
- Delete the "#" and the "<>" and replace <192.168.2.100:/raid/data/iTunes_music> with your connection data.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Mount all drives:
sheeva01:~# mount -a
If you get an error message after that, maybe the NFS-Client is not installed for some reasons. In this case install the NFS-Client (again)
sheeva01:~# apt-get --yes install nfs-common portmap
Samba Client Connection
With these settings you get a connection from your SheevaPlug to a samba share. Use this, if your music-library is stored on a samba server on your network.
- First make sure that your Samba-Share is working properly. It is best to test with a client-system other than the SheevaPlug initially, just to make sure that the share is working. Set the user and the rights for your Samba-Connection and remember the values.
- Install Samba on Your SheevaPlug:
sheeva01:/# apt-get --yes update sheeva01:/# apt-get --yes upgrade sheeva01:/# apt-get --yes install smbfs
- Edit /etc/fstab:
#//<192.168.2.10/samba> /mnt/samba/music smbfs username=<username>,password=<password>
- Delete the "#" and the "<>" and replace <192.168.2.10/samba> with your connection data.
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
- Mount all drives:
sheeva01:~# mount -a
Install some more packages
Install webmin
- Edit sources list for installing webmin:
sheeva01:~# nano /etc/apt/sources.list
- Add the lines:
# webmin repository deb http://download.webmin.com/download/repository sarge contrib
- Write the file with <<ctrl>> + <<o>>, confirm the filename with <<return>> and quit nano with <<ctrl>> + <<x>>
sheeva01:~# cd /root sheeva01:~# wget http://www.webmin.com/jcameron-key.asc sheeva01:~# apt-key add jcameron-key.asc
- You will now be able to install webmin:
sheeva01:~# apt-get --yes update sheeva01:~# apt-get --yes install webmin
(this will take a while …)
Make a connection to webmin from a web browser:
- https:/<192.168.2.102>:10000
- Login with user: root pw: nosoup4u (Ignore the missing certificate hint).
Install samba If you like, you can install and configure samba from webmin.
- In "Un-used Modules" choose "Samba Windows File Sharing" and configure it to your needs.
Change timezone and time
- From the console install ntpdate:
sheeva01:~# apt-get --yes install ntpdate
Do it from webmin:
- Hardware
- System Time
- set timezone
- set timeserver (for example: ptbtime1.ptb.de)
- System Time
Install Squeezeboxserver
- Download your version of Squeezeboxserver from here: http://downloads.slimdevices.com/nightly/
- Store it to a directory on your music library.
If you like, you can also download the installation-package to your SheevaPlug and install SBS directly from the plug.
- Then do the following:
- Create a directory for installation and download the version you like to install later (look up the website with your browser to know the name of the version):
sheeva01:~# cd / sheeva01:~# mkdir install sheeva01:~# cd install sheeva01:~# wget http://downloads.slimdevices.com/nightly/7.4/sc/29813/squeezeboxserver_7.4.2~29813_all.deb
- Change to the directory where downloaded.
sheeva01:~# dpkg -i squeezeboxserver_7.4.2~29813_all.deb
- Change the SBS package to the name of your downloaded version.
- Ignore any errors like this: “Errors were encountered while processing: squeezeboxserver”
sheeva01:~# apt-get --yes install -f press <return> press <return>
- If you want to free a little space on the sheevaplug do this:
sheeva01:~# apt-get --yes clean
Tuning the Squeezeboxserver
Tuning the SBS-Server is very important! Without tuning, full scans of the music-library may cause the server to fail!
- Stop SBS:
sheeva01:~# /etc/init.d/squeezeboxserver stop
- Rename my.cnf in your cache folder:
sheeva01:~# mv /var/lib/squeezeboxserver/cache/my.cnf my.old
It’s o.k. if this file does not exist! Goto the next step.
- Rename the my.tt file in /usr/share/squeezeboxserver/MySQL :
sheeva01:~# mv /usr/share/squeezeboxserver/MySQL/my.tt my.old
- Copy the my.tt.txt file from the post: http://forums.slimdevices.com/showpost.php?p=401530&postcount=18 to the /usr/share/squeezeboxserver/MySQL folder and rename to my.tt :
sheeva01:~# cd /mnt/nfs/music/zzz/sw sheeva01:~# cp my.tt.txt /usr/share/squeezeboxserver/MySQL/my.tt
- Start squeezeboxserver:
sheeva01:~# /etc/init.d/squeezeboxserver start
Customize your Squeezeboxserver
- Connect to your SBS by typing http://<192.168.2.102>:9000 in your web browser.
- Put in your data for mysqueezebox.com.
- Configure the path to your music library and playlists.
- Stop scanning the database.
To show the correct artwork (especially for the Controller), the next step is very important.
- Store your artwork in the same folder as the songs. Store it as “folder.jpg” in every album folder.
Example:
- Williams, Robbie
- Reality Killed The Radio Star
- folder.jpg
- Reality Killed The Radio Star
- Type your path to your music library in “Advanced” “Artwork Folder”.
- Type %folder.jpg in “Advanced” “Artwork”.
- Make a complete scan of your database.
- Customize SBS as you like.
Install Samba Server
If you want to get a connection to the USB drive directly connected to your SheevaPlug you best install a Samba Server on the SheevaPlug. You than will be able to connect to the USB drive by a file connection from your Windows Workstation. This is very useful to update files on the music library.
Setting up a Samba Server normally is a bit tricky. If you do this by webmin, it's pretty easy. This part of the wiki assumes that you have installed webmin before. The Samba Server is already installed in the Stage 3 image, you only have to configure it.
- Be sure that you have plugged your usb drive and configured it, so that it is well mounted.
- Start a webmin session from your browser.
https://<your ip address of sheeva>:10000
- Ignore the certificate warning
- Choose "Un-used Modules" from the left navigation
- Choose "Samba Windows File Sharing"
- Install the Samba Server
- After the Samba Server is installed, choose "Servers"
- Choose "Samba Windows File Sharing"
- Choose "Create a new file share"
- Give a name for the share: In "Share name" type maybe <music>
- Choose a directory to share: /mnt/usb/music and click "o.k."
- Click "create"
Now you should see the share in the list.
- Click on it
- Click on "Security and Access Control"
- Select "Guest Access?" "yes"
- Click on "Save"
- Click on "File Permissions"
- At "Force Unix user" select "root"
- Click on "Save"
The setting for the workgroup comes from the domain-name of the SheevaPlug. This name depends on your setup. If you use one of my images the name is set to "workgroup". Be sure to setup the workgroup name to the name of your local windows workgroup. If your windows workgroup has a different name than "workgroup" change the name by using webmin:
- Choose "Windows Networking" from "Global Configuration"
- At "Workgroup" type in the name of your workgroup
- At "Security" choose "Share level"
Now you are able to make a connection from your Windows Workstations to the USB drive connected to your SheevaPlug.
Appendix
What else may you need?
- USB Image Tool: http://www.alexpage.de/ -- tool for making the sd-cards from the images
- SDFormatter: http://www.sdcard.org/consumers/formatter/ -- tool to format sd-cards
- TFTP-Server: http://tftpd32.jounin.net/ -- TFTP-Server to update the u-boot environmemt
- MP3 Tagging: http://www.mp3tag.de/ -- very good tagging tool
- FLAC Frontend: http://flac.sourceforge.net/download.html -- tool to make flac files
- Foobar: http://www.foobar2000.org/ -- tool I used to convert files mp4 -> flac
Useful links
- http://www.marvell.com/ -- manufacturer of the ARM Prozessors
- http://www.globalscaletechnologies.com/ -- manufacturer of the SheevaPlug
- http://www.newit.co.uk -- distributor of the SheevaPlug in Europe
- http://www.cyrius.com/debian/kirkwood/sheevaplug/ -- Website describing how-to install Debian on SheevaPlug
- http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html -- Website describing updating U-boot
- http://www.plugcomputer.org/ -- Community site for plugcomputing
- http://plugcomputer.org/plugwiki/index.php/Serial_terminal_program#Drivers_.232_and_.233:_mini-USB_to_Serial_Support -- how-to make a serial connection to your SheevaPlug
- http://www.openplug.org/plugwiki/index.php/SheevaPlug_Installer -- The SheevaPlug Installer to repair the SheevaPlug if something goes completly wrong
- http://www.nano-editor.org/docs.php -- Documentation of nano, texteditor for Linux I prefer to use.
Resources
Images:
MD5 Hash a46db1763a254990e2f31a7f395e3675
MD5 Hash eb359401232a7a6f18017290b53e06d4
MD5 Hash 97b2e581f248721ac228cfe8897b04d0
Hashes are made from the extracted files, first extract than check!
Boostrap Files for Debian installation:
- uImage: http://people.debian.org/~joeyh/d-i/armel/images/daily/kirkwood/netboot/marvell/sheevaplug/uImage
- uInitrd: http://people.debian.org/~joeyh/d-i/armel/images/daily/kirkwood/netboot/marvell/sheevaplug/uInitrd
Squeezeboxserver:
Tuning file for SBS database:
U-boot Version3.4.23:
md5sum is 02ddee1875376ed2b28ffc0111472c9b
Version 3.4.23 is not the newest one but works fine. Some people reported problems with newer versions. NewIT uses this version.
Known Bugs
- Bug in partitioning the sd-card if you install Debian "the long way". Workaround: Do the partitioning manually as described.
- Someone reported that the SBS Server starts in German. All the local settings are in English, I believe. I'm still searching for the bug! Workaround: change the language by going to Squeezeboxserver Settings, Basic Settings page, and selecting the language of your choice.
Setenv commands for resetting Sheevaplug
Here are the setenv commands for resetting Sheevaplug. Please note, that you maybe have other default settings. It depends on the version of the SeevaPlug. If you own one of the multi-boot Plugs from NewIT the variables are slightly different. You can look them up at http://www.newit.co.uk/forum/index.php/topic,194.0.html
setenv autoload no setenv baudrate 115200 setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none' setenv bootargs_end :::DB88FXX81:eth0:none setenv bootargs_root 'root=/dev/mtdblock2 ro' setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm 0x800000' setenv bootdelay 3 setenv CASset min setenv cesvcid ULULULULULULPPULULULULULDA setenv console 'console=ttyS0,115200' setenv disaMvPnp no setenv disL2Cache no setenv disL2Prefetch yes setenv enaAutoRecovery yes setenv enaCpuStream no setenv enaDCPref yes setenv enaICPref yes setenv enaMonExt no setenv enaWrAllo no setenv ethact egiga0 setenv ethaddr 00:50:43:xx:xx:xx setenv ethmtu 1500 setenv ethprime egiga0 setenv image_name uImage setenv ipaddr 192.168.1.51 setenv loadaddr 0x02000000 setenv loads_echo 0 setenv mainlineLinux no setenv MALLOC_len 1 setenv mvNetConfig 'mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500' setenv mvPhoneConfig 'mv_phone_config=dev0:fxs,dev1:fxs' setenv nandEcc 1bit setenv netbsd_en no setenv netmask 255.255.0.0 setenv netretry no setenv pexMode RC setenv rcvrip 169.254.100.100 setenv rootpath /mnt/ARM_FS/ setenv run_diag no setenv sata_dma_mode yes setenv serverip 192.168.1.209 setenv setL2CacheWT yes setenv 'standalone fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;' setenv stderr serial setenv stdin serial setenv stdout serial setenv usb0Mode host setenv vxworks_en no setenv yuk_ethaddr 00:00:00:EE:51:81
- Please note that you have to setup the ethaddr to your MAC-Address (look it up from the backside of the Plug).
Things to do
- Setting up a tiny Linux live system to configure the SheevaPlug and to run the SheevaPlug-Installer
- Explain howto change the SSL keys:
ssh-keygen -q -f /etc/ssh/ssh_host_key -N -t rsa1 ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N -t rsa ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N -t dsa
- Tuning Debian by reducing flash writing:
from http://www.plugcomputer.org/plugwiki/index.php/Reduce_Flash_Writes
# echo 0 >/proc/sys/vm/swappiness
- To make the change permanent add the following line to /etc/sysctl.conf
vm.swappiness=0
# echo 5 > /proc/sys/vm/laptop_mode
- To make the change permanent add the following line to /etc/sysctl.conf
vm.laptop_mode=5
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs echo 1500 > /proc/sys/vm/dirty_expire_centisecs
- To make the change permanent add the following line to /etc/sysctl.conf
vm.dirty_writeback_centisecs=1500 vm.dirty_expire_centisecs=1500
- Change /etc/fstab to
rootfs / rootfs relatime,rw 0 0
- Change Hostname:
from http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html
#hostname NEW_NAME
- Edit the file /etc/hostname and change the name of the system and then run
/etc/init.d/hostname.sh start
Building Images
This is just for me, to remember what to do if making images. You will not need it at all:
- Set the interface to DHCP
sheeva01:~# nano /etc/network/interfaces
- Delete the whole text
sheeva01:~# nano /etc/udev/rules.d/70-persistent-net.rules
- Comment the last 4 lines
sheeva01:~# nano /etc/fstab
- add "mount -a" before exit 0
- apt-get remove exim4 exim4-base exim4-config exim4-daemon-light
nano /etc/rc.local
- Update the system
sheeva01:~# apt-get --yes update sheeva01:~# apt-get --yes upgrade sheeva01:~# apt-get clean sheeva01:~# history -c
Beta Versions
Some of you asked me to make the wiki a little more for dummies, so that setting up the SheevaPlug becomes as easy as possible. For that reason I have made a script that configures the network-settings and the settings for the music library. This script, in addition to a new image, makes setting up the SheevaPlag very simple. One thing is left which is a little bit tricky: that is the preparing of the system. I think there is no other way to do it, but if you follow the wiki exactly step by step you will certainly manage it.
Please notice that you can use this script only with the new image you can download here:
http://uploadhyper.com/file/24463/Stage320100206.exe.html
- Hash of the self extracting archiv: 74f7b59d29d3c1937b2c338df76dab82
- Hash of the image file itself: 0b72ecb93a73aa5898a79a0522ef4aae
My plan is to stop updating the Stage 1 and the Stage 2 image, because it's easier to maintain only one image. There was not a big response to the Stage 1 image at all. The difference between Stage 2 and 3 is Webmin. If you don't like to use Webmin you can easily delete it, so that's no reason for having an extra image.
The next step is the same steps as in the "old" Quick Steps Guide". After that step comes the new one which replaces the former steps "Network Setup" and "Building file-sharing connections"
Prepare the system
- Make a serial (USB) Connection to your SheevaPlug.
- Interrupt the booting-process by hitting <<return>> several times and insert your sd-card. If you are not quick enough with the interrupt, boot the linux-system from NAND and shut it down afterwards by typing:
login as: root pw: nosoup4u shutdown –r now
- Interrupt the booting-process again by hitting <<return>> several times.
- Check your version of the u-boot environment:
Marvell>> version
If you're running a version of u-boot older than 3.4.19 you have to update u-boot before proceeding with the next steps! Please read here: http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html
Best you do it with the "TFTP-methode": use Tftpd32 which you can find here: http://tftpd32.jounin.net/. Be sure to set "TFTP Security" to "none".
Before you change a variable be sure that you’ve saved the original value.
- You can do it with the command:
Marvell>> printenv
Without arguments, you get all values.
- If you want to see only one value type f. e.:
Marvell>> printenv arcNumber
- Change some u-boot environment settings:
Marvell>> setenv mainlineLinux yes Marvell>> setenv arcNumber 2097 Marvell>> setenv bootargs_console console=ttyS0,115200 Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage' Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000' Marvell>> run bootcmd
Some people reported that their mmc-card is not always detected by the SheevaPlug. There is a workaround to solve this problem: Do the “mmcinit” command twice and it will work. It looks like this:
Marvell>> setenv bootcmd_mmc 'mmcinit;mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
- Test everything and only if everything is working as it should save the environment by typing:
Marvell>> saveenv
If you are still unsure, wait till the end of this part, there is an other hint to do it!
Starting the SBS-Configurator
- On Your running system start the SBS-Configurator by typing:
sheeva01:~# cd /scripts sheeva01:~# ./sbs_config.sh
The rest is very easy, just follow the steps as described.
The script is not fault tolerant at times (I'm no expert in this) so please be sure you type in the informations exactly as asked!
Making changes permanent
- If you have not changed the environment variables, do it now:
sheeva01:~# shutdown -r now
- Interrupt the booting-process by hitting <<return>> several times and then type:
Marvell>> setenv mainlineLinux yes Marvell>> setenv arcNumber 2097 Marvell>> setenv bootargs_console console=ttyS0,115200 Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage' Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000' Marvell>> saveenv
Customize your Squeezeboxserver
- Connect to your SBS by typing http://<192.168.2.102>:9000 in your web browser.
- Put in your data for mysqueezebox.com.
- Configure the path to your music library and playlists.
- Stop scanning the database.
To show the correct artwork (especially for the Controller), the next step is very important.
- Store your artwork in the same folder as the songs. Store it as “folder.jpg” in every album folder.
Example:
- Williams, Robbie
- Reality Killed The Radio Star
- folder.jpg
- Reality Killed The Radio Star
- Type your path to your music library in “Advanced” “Artwork Folder”.
- Type %folder.jpg in “Advanced” “Artwork”.
- Make a complete scan of your database.
- Customize SBS as you like.
Congratulations you have finished!!!
Last edited:
--Truehl 00:20, 7 February 2010 (PST)
This category currently contains no articles or media.

