sbp
2011-09-25, 10:55
Hi, I have been trying to do a very small linux install for a thin client as I want it only to be used as a Squeezebox server running 24/7.
As the Thin client only have a CF-card for thr operating system (OS) (500 MB), I needed a very small OS. I have tried several like Puppy linux, Slitaz, but have been unable to unstall SqueezeboxServer on these distros.
However, Voyage Linux, is a small debian distro (60 MB), which is specially made for CF-cards, as it is run as "read-only". Therefore, the normal tear of the CF-cards is reduced. And finally I have figured out how to install and run SqueezeboxServer and also LogitechMediaServer on the Voyage linux.
Get the Voyage distro from here; http://linux.voyage.hk/ I used the 0.7 version, but probably the newer ones will also be fine:
Install it on the CF-card:
================================================== ============================
Installing Voyage Linux to a hard disk from Live CD
================================================== ============================
Afte booting the Live CD, login as root (password: voyage)
YOU CAN USE THESE COMMANDS DIRECTLY OR THROUGH SSH(Putty):
1. Create distribution directory for installation
# mkdir /tmp/root
# mount -o loop /live/image/live/filesystem.squashfs /tmp/root
# cd /tmp/root
2. Make a mount point for installation disk
# mkdir /tmp/cf
3. Format target disk device
# /usr/local/sbin/format-cf.sh /dev/hda
This will create /dev/hda1 ext2 partition on /dev/hda disk device.
** Note that this operation is very dangerous since it will erase your disk!
Make sure what you are doing and must do it right!
4. Start voyage.update installation script
# /usr/local/sbin/voyage.update
Following the instruction to select /tmp/root as distribution directory, and
/tmp/cf as mount point. After the installation complete, simple reboot the
board and Voyage will be started!
There are some additional packages installed for PXE and NFS server. After
starting Voyage, you can safely remove them by:
# remountrw
# apt-get remove syslinux atftpd nfs-kernel-server \bzip2 sg3-utils minicom
After all, remove the last line in /etc/dnsmasq.more.conf:
conf-file=/etc/dnsmasq.pxe.conf
Now you have used 118 MB on your CF-card.
__________________________________________________ _________
Next install Squeezeboxserver og LogitechMediaserver:
First we need to make Voyage writable, so after a reboot, we log in like this;
user: root
Password: voyage
then you write: remountrw
To solve the PERL problems for Squeezeboxserver:
editing the /etc/apt/sources.list
and adding the line
deb http://http.us.debian.org/debian squeeze main contrib
Then we start installing Squeezeboxserver/LogitechMediaServer
I did it this way; Locate the version of Squeezebox-Server you would like to use. ie like: http://downloads.slimdevices.com/nightly/7.6/sc/33496/squeezeboxserver_7.6.2~33496_all.deb
Which is the one I used below:
Download the installation-package directly to your Voyage CF-card and install directly, so do the following:
Create a directory for installation and download SBS
# cd /
# mkdir install
# cd install
# wget http://downloads.slimdevices.com/nightly/7.6/sc/33496/squeezeboxserver_7.6.2~33496_all.deb
# apt-get --yes update
# dpkg -i squeezeboxserver_7.6.2~33496_all.deb
Ignore any errors like this: “Errors were encountered while processing: squeezeboxserver” Use this:
# apt-get install -f
__________________________________________________ __________
NEXT we need to tell Voyage that´Squeezebox needs to be able to write to the CF. As I understand, Voyage will then mount these directories in RAM, and only at power-down it will be written to the CF-card.
To do so you need to edit the file: etc/default/vopyage-util, because it needs to have this line:
VOYAGE_SYNC_DIRS="/var/lib/squeezeboxserver"
Then reboot - and you are done.
================================================== ===
HOW TO INSTALL minidlna.
As I also use it for serving videos to my Samsung Blueray player I use minidlna (I have tried LMS 7.7 - but it wont serve videos)
Remember to log into voyage: user: root and password: voyage , then:
#remountrw ............ so you are able to write to the HDD (or CF-card)
install minidlna:
There is a debian package (for SID) in order to get it for voyage 0.7 you need to add to your etc/apt/sources.list so it contains:
# /etc/apt/sources.list
deb http://ftp.tw.debian.org/debian/ squeeze main contrib
deb http://security.debian.org/ squeeze/updates main contrib
deb http://http.us.debian.org/debian squeeze main contrib
deb http://ftp.de.debian.org/debian/ sid main
deb-src http://ftp.de.debian.org/debian/ sid main
deb http://ftp.de.debian.org/debian/ experimental main
deb-src http://ftp.de.debian.org/debian/ experimental main
Then use:
# apt-get udpate
Next get the minidlna package:
# wget http://ftp.dk.debian.org/debian/pool/main/m/minidlna/minidlna_1.0.21+dfsg-1+b1_i386.deb
Next:
# dpkg install minidlna_1.0.21+dfsg-1+b1_i386.deb
The errors is fixed by:
# Apt-get install -f
Then you need to adjust the minidlna config file:
/etc/minidlna.conf ........... here I needed to change the lines so
network_interface=eth0
media_dir=/mnt/media ...... pointing to the directory where your files are
friendly_name=[SOMETHING YOU LIKE]
Place to store the database file:
db_dir=/var/cache
All the rest was left to default
Next add these directories to the file etc/default/vopyage-util so it now contains the line:
VOYAGE_SYNC_DIRS="/var/lib/squeezeboxserve /var/cache"
After a reboot you have minidlna running.
############EDIT: There are some problems running in read-only mode - still working on that issue - sorry######
UPDATE: You can work around this issue. Go to read and write by:
#remountrw
Then restart minidlna by
#minidlna -R
let it finish the scanning and making the database files, then go read only again by:
#remountro
Then as long as you don't change you shared files everything is OK, but if you need to rescan after having changed your media files you do as above.
================================================== ========
Finally, I wanted Samba as an easy way to add and remove media files on the attached USB-HDD
Remember to log into voyage: user: root and password: voyage , then:
#remountrw ............ so you are able to write to the HDD (or CF-card)
In order to install samba I had to add this line to etc/apt/sources.list
deb http://security.debian.org/debian-security squeeze/updates main
Next:
#apt-get install samba
Then I made the directory that should be shared via Samba (I don't know if it is important as I already had it):
#chmod a+w /mnt/media (= the USB-HDD which is mounted in /etc/fstab)
Then move the default samba config (so you have an untouched copy if needed):
#mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
Then make a new empty samba config file:
#touch /etc/samba/smb.conf
Edit this new /etc/samba/smb.conf file so it contains:
[global]
workgroup = workgroup
netbios name = Voyage SERVER
server string = Voyage server %v
map to guest = Bad User
#log file = /var/log/samba/log.%m
#max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User
# Sharing for downloaded files
[download]
path = /mnt/media
valid user = root
read only = No
create mask = 0777
directory mask = 0777
Restart samba:
#/etc/init.d/samba restart
Add a samba user (this gave me much trouble, I could not make new users, therefore I used the already present linux user: "root"
To make a samba user "root" write:
#pdbedit -a root
... then write a password - I used voyage - same as in log into voyage
To define the correct homedirektory for root:
# pdbedit -u=root -h=/mnt/media
Then restart samba
/etc/init.d/samba restart
Samba needs to be able to write to the following directories: /var/lib/samba and /var/cache/samba /etc/samba
So add these directories to the file etc/default/vopyage-util so it now contains the line:
VOYAGE_SYNC_DIRS="/var/lib/squeezeboxserver /var/cache /var/lib/samba /var/cache/samba /etc/samba"
EDIT: I added /etc/samba to the line above, otherwise SAMBA would die after 15-20 min.
================================================== =========
Finally in order to mount my USB-HDD at startup I needed to edit my /etc/fstab, first you need to find you USB-HDD name by:
#fdisk -l
in my case it was /dev/sda1 therefore I added the following line to my /etc/fstab file:
/dev/sda1 /mnt/media auto rw,user,auto 0 0
================================================== =========
So a small debian distro (voyage 0.7), squeezeboxserver 7.6.2, minidlna and samba is about 319 MB so it fits well on my 500 MB CF-card
root@voyage:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 490020 319158 145560 69% /
I hope this will be helpfull for newbees like myself.
Remember to turn off loging in samba, squeezeboxserver and mindlna.
Edited with the information on PERL problems from nworbnhoj .... Thanks
Edited because added information on samba and minidnla
Update on the Samba and minidlna issues
As the Thin client only have a CF-card for thr operating system (OS) (500 MB), I needed a very small OS. I have tried several like Puppy linux, Slitaz, but have been unable to unstall SqueezeboxServer on these distros.
However, Voyage Linux, is a small debian distro (60 MB), which is specially made for CF-cards, as it is run as "read-only". Therefore, the normal tear of the CF-cards is reduced. And finally I have figured out how to install and run SqueezeboxServer and also LogitechMediaServer on the Voyage linux.
Get the Voyage distro from here; http://linux.voyage.hk/ I used the 0.7 version, but probably the newer ones will also be fine:
Install it on the CF-card:
================================================== ============================
Installing Voyage Linux to a hard disk from Live CD
================================================== ============================
Afte booting the Live CD, login as root (password: voyage)
YOU CAN USE THESE COMMANDS DIRECTLY OR THROUGH SSH(Putty):
1. Create distribution directory for installation
# mkdir /tmp/root
# mount -o loop /live/image/live/filesystem.squashfs /tmp/root
# cd /tmp/root
2. Make a mount point for installation disk
# mkdir /tmp/cf
3. Format target disk device
# /usr/local/sbin/format-cf.sh /dev/hda
This will create /dev/hda1 ext2 partition on /dev/hda disk device.
** Note that this operation is very dangerous since it will erase your disk!
Make sure what you are doing and must do it right!
4. Start voyage.update installation script
# /usr/local/sbin/voyage.update
Following the instruction to select /tmp/root as distribution directory, and
/tmp/cf as mount point. After the installation complete, simple reboot the
board and Voyage will be started!
There are some additional packages installed for PXE and NFS server. After
starting Voyage, you can safely remove them by:
# remountrw
# apt-get remove syslinux atftpd nfs-kernel-server \bzip2 sg3-utils minicom
After all, remove the last line in /etc/dnsmasq.more.conf:
conf-file=/etc/dnsmasq.pxe.conf
Now you have used 118 MB on your CF-card.
__________________________________________________ _________
Next install Squeezeboxserver og LogitechMediaserver:
First we need to make Voyage writable, so after a reboot, we log in like this;
user: root
Password: voyage
then you write: remountrw
To solve the PERL problems for Squeezeboxserver:
editing the /etc/apt/sources.list
and adding the line
deb http://http.us.debian.org/debian squeeze main contrib
Then we start installing Squeezeboxserver/LogitechMediaServer
I did it this way; Locate the version of Squeezebox-Server you would like to use. ie like: http://downloads.slimdevices.com/nightly/7.6/sc/33496/squeezeboxserver_7.6.2~33496_all.deb
Which is the one I used below:
Download the installation-package directly to your Voyage CF-card and install directly, so do the following:
Create a directory for installation and download SBS
# cd /
# mkdir install
# cd install
# wget http://downloads.slimdevices.com/nightly/7.6/sc/33496/squeezeboxserver_7.6.2~33496_all.deb
# apt-get --yes update
# dpkg -i squeezeboxserver_7.6.2~33496_all.deb
Ignore any errors like this: “Errors were encountered while processing: squeezeboxserver” Use this:
# apt-get install -f
__________________________________________________ __________
NEXT we need to tell Voyage that´Squeezebox needs to be able to write to the CF. As I understand, Voyage will then mount these directories in RAM, and only at power-down it will be written to the CF-card.
To do so you need to edit the file: etc/default/vopyage-util, because it needs to have this line:
VOYAGE_SYNC_DIRS="/var/lib/squeezeboxserver"
Then reboot - and you are done.
================================================== ===
HOW TO INSTALL minidlna.
As I also use it for serving videos to my Samsung Blueray player I use minidlna (I have tried LMS 7.7 - but it wont serve videos)
Remember to log into voyage: user: root and password: voyage , then:
#remountrw ............ so you are able to write to the HDD (or CF-card)
install minidlna:
There is a debian package (for SID) in order to get it for voyage 0.7 you need to add to your etc/apt/sources.list so it contains:
# /etc/apt/sources.list
deb http://ftp.tw.debian.org/debian/ squeeze main contrib
deb http://security.debian.org/ squeeze/updates main contrib
deb http://http.us.debian.org/debian squeeze main contrib
deb http://ftp.de.debian.org/debian/ sid main
deb-src http://ftp.de.debian.org/debian/ sid main
deb http://ftp.de.debian.org/debian/ experimental main
deb-src http://ftp.de.debian.org/debian/ experimental main
Then use:
# apt-get udpate
Next get the minidlna package:
# wget http://ftp.dk.debian.org/debian/pool/main/m/minidlna/minidlna_1.0.21+dfsg-1+b1_i386.deb
Next:
# dpkg install minidlna_1.0.21+dfsg-1+b1_i386.deb
The errors is fixed by:
# Apt-get install -f
Then you need to adjust the minidlna config file:
/etc/minidlna.conf ........... here I needed to change the lines so
network_interface=eth0
media_dir=/mnt/media ...... pointing to the directory where your files are
friendly_name=[SOMETHING YOU LIKE]
Place to store the database file:
db_dir=/var/cache
All the rest was left to default
Next add these directories to the file etc/default/vopyage-util so it now contains the line:
VOYAGE_SYNC_DIRS="/var/lib/squeezeboxserve /var/cache"
After a reboot you have minidlna running.
############EDIT: There are some problems running in read-only mode - still working on that issue - sorry######
UPDATE: You can work around this issue. Go to read and write by:
#remountrw
Then restart minidlna by
#minidlna -R
let it finish the scanning and making the database files, then go read only again by:
#remountro
Then as long as you don't change you shared files everything is OK, but if you need to rescan after having changed your media files you do as above.
================================================== ========
Finally, I wanted Samba as an easy way to add and remove media files on the attached USB-HDD
Remember to log into voyage: user: root and password: voyage , then:
#remountrw ............ so you are able to write to the HDD (or CF-card)
In order to install samba I had to add this line to etc/apt/sources.list
deb http://security.debian.org/debian-security squeeze/updates main
Next:
#apt-get install samba
Then I made the directory that should be shared via Samba (I don't know if it is important as I already had it):
#chmod a+w /mnt/media (= the USB-HDD which is mounted in /etc/fstab)
Then move the default samba config (so you have an untouched copy if needed):
#mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
Then make a new empty samba config file:
#touch /etc/samba/smb.conf
Edit this new /etc/samba/smb.conf file so it contains:
[global]
workgroup = workgroup
netbios name = Voyage SERVER
server string = Voyage server %v
map to guest = Bad User
#log file = /var/log/samba/log.%m
#max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = No
local master = No
dns proxy = No
security = User
# Sharing for downloaded files
[download]
path = /mnt/media
valid user = root
read only = No
create mask = 0777
directory mask = 0777
Restart samba:
#/etc/init.d/samba restart
Add a samba user (this gave me much trouble, I could not make new users, therefore I used the already present linux user: "root"
To make a samba user "root" write:
#pdbedit -a root
... then write a password - I used voyage - same as in log into voyage
To define the correct homedirektory for root:
# pdbedit -u=root -h=/mnt/media
Then restart samba
/etc/init.d/samba restart
Samba needs to be able to write to the following directories: /var/lib/samba and /var/cache/samba /etc/samba
So add these directories to the file etc/default/vopyage-util so it now contains the line:
VOYAGE_SYNC_DIRS="/var/lib/squeezeboxserver /var/cache /var/lib/samba /var/cache/samba /etc/samba"
EDIT: I added /etc/samba to the line above, otherwise SAMBA would die after 15-20 min.
================================================== =========
Finally in order to mount my USB-HDD at startup I needed to edit my /etc/fstab, first you need to find you USB-HDD name by:
#fdisk -l
in my case it was /dev/sda1 therefore I added the following line to my /etc/fstab file:
/dev/sda1 /mnt/media auto rw,user,auto 0 0
================================================== =========
So a small debian distro (voyage 0.7), squeezeboxserver 7.6.2, minidlna and samba is about 319 MB so it fits well on my 500 MB CF-card
root@voyage:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 490020 319158 145560 69% /
I hope this will be helpfull for newbees like myself.
Remember to turn off loging in samba, squeezeboxserver and mindlna.
Edited with the information on PERL problems from nworbnhoj .... Thanks
Edited because added information on samba and minidnla
Update on the Samba and minidlna issues