User talk:Ramuk

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 03:13, 7 September 2006 by Ramuk (Talk | contribs)

Jump to: navigation, search


My Install

Get the archive

Flash The The LinkStation firmware flasher

  • Disable any firewall(s), including any built-in Windows firewall
  • Make sure the LinkStation and your PC are on the same sub-network. This likely requires that you change the IP address (and probably the subnet-mask) of your PC to a different (and static) IP address: 192.186.11.XXX
  • Run the firmware updater executable HD-HGLAN FWUpdate-english.exe


  • After finding your LinkStation, press the "Renew Firmware" button, and wait. Have patience, and keep your calm. If you think the Firmware updater is acting strange, do not try to disconnect the LinkStation or abort the update in another way.
  • After flashing connect your LinkStation up to the network with subnet 192.168.1.XXX
  • Find your LinkStation on the network and Telnet to it with PuTTYtel You will be at the root shell.

Freelink - Convert the LinkStation into a Full-fledged Debian Linux Server

Debian GNU/Linux 3.1 %h

Change the root password

passwd root

Get and update with apt-get

apt-get update
apt-get install ssh
apt-get upgrade
apt-get install samba smbfs
apt-get install webmin webmin-core webmin-cpan webmin-inetd webmin-logrotate webmin-firewall
apt-get install webmin-samba
rm /etc/rc2.d/S05utelnetd

Freeing up space on hda1

cp -Rdp /home /mnt
rm -R   /home
ln -s /mnt/home /home
cp -Rdp /usr /mnt
rm -R   /usr
ln -s /mnt/usr /usr
cp -Rdp /var /mnt
rm -R   /var
ln -s /mnt/var /var

Correct the system time and setup Network Time Protocol (NTP)

apt-get install ntp ntp-simple ntp-server ntpdate

Upgrade to the 2.6-kernel (ppc only)

tar -C / -xvzf latest-webinstaller.tar.gz

Install an Encrypted Filespace with EncFS

tar -C / -xvzf fuse_2.5.3-binaries-ppc.tar.gz
apt-get install encfs

Troubleshooting Windows shares (samba) - guest access

1. Pick a directory you wish to share ie: /mnt/share and change the access permissions to make it readable and writable to everybody.

mkdir /mnt/share
chmod 777 /mnt/share

2. Add the [share] section to /etc/samba/smb.conf

 security = share
 workgroup = MSHOME
 create mode = 777
 directory mode = 777

 comment = LinkStation Share
 path = /mnt/share
 read only = no 
 public = yes

3. Restart Samba on the Linkstation with this command:

/etc/rc.d/init.d/smb restart

Macintosh related configuration, netatalk, mt-daapd

tar -C / -xvzf libid3tag_0.15.1b-binaries-ppc.tar.gz
tar -C / -xvzf mtdaapd_0.2.4-binaries-ppc.tar.gz
mv /etc/mt-daapd.SAMPLE /etc/mt-daapd
  • Then edit /etc/mt-daapd/*. When done,
/etc/init.d/mt-daapd start

Precompiled C development environment, running on the LS

mkdir tmp
cd tmp
mkdir devtools
cd devtools
tar xzvf ../ppc-tools-2_1.tgz
tar -C / -xvjf kernel-headers-2.4.20_hglan_htgl-2.0.tar.bz2

USB Palm OS Device as an LCD Display

apt-get install lcdproc
apt-get remove lcdproc
tar -xvzf lcdproc-0.4.5.tar.gz
cd lcdproc-0.4.5
make install

Install Ipkg on the Linkstation (for end-users)

tar -C / -xvzf powerpc-hdhlan-ipkg-0.99.153-1.tgz
  • Add the following lines to the file /etc/ipkg.conf:
src nslu2-cross-stable
src nslu2-cross-unstable
src nslu2-native-stable
src nslu2-native-unstable
  • then
ipkg update

XBMC - Using Xbox Media Center with the LinkStation

ipkg install ccxstream
  • Edit the ccxstream start file and change the username and shared directory for your system



if [ -n "`pidof ccxstream`" ] ; then
   killall ccxstream 2>/dev/null

# see /opt/doc/ccxstream/README for the full summary on
# command-line options, but the terse summary is that
# -r is the directory to "share" using ccxstream, and is
# probably the option you most want to adjust.

sleep 2
/opt/sbin/ccxstream -r /mnt/share -u username -f -F /var/run/
  • Start the ccXStream daemon

KAID - XLink Kai online gaming for Xbox, 360, PS2 and PSP

unzip kaid-*
mv kaid-static* kaid
mv kaid /usr/local/sbin
chmod 755 /usr/local/sbin/kaid
  • create /etc/init.d/kaid
#! /bin/sh
export USER="root"
mkdir /var/misc
touch /var/misc/kaiSystemConfig.txt
touch /var/misc/kaiEnginePersist.txt
chmod ugo+w /var/misc/kaiSystemConfig.txt
chmod ugo+w /var/misc/kaiEnginePersist.txt
su - $USER -c"kaid"
su - $USER -c"killall kaid"
case "$1" in
echo -n "Starting Kaid: "
echo -n "Stopping Kaid "
echo -n "Restarting Kaid "
echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
exit 1
exit 0
  • Create a symbolic link to start kaid at every reboot and kill it at every shutdown automaticly:
chmod 755 /etc/init.d/kaid  
ln -s /etc/init.d/kaid /etc/rc.d/rc0.d/K99kaid
ln -s /etc/init.d/kaid /etc/rc.d/rc2.d/S99kaid
ln -s /etc/init.d/kaid /etc/rc.d/rc6.d/K99kaid
  • Create /etc/kaid.conf and put in your username/password
# Kai Engine Configuration File (
# This file contains the configuration options for Kai Engine.
# There are some fields which can be modified, the descriptions of these fields
# and their default values are listed below
# Verbosity : Debug output verbosity. Options are as follows:
# 0 - Silent apart from starting / stopping messages, and init failures.
# 1 - As 1, but shows import events such as UI attach/detach, console detection,
# orb connection / loss.
# 2 - As 2, but more detailed, showing thread start/stop events, DHCP
# events, and other important information.
# 3 - Debug - same as 2, but with lots of extra information - useful
# for diagnosing segfaults etc.
Verbosity = 1
# User : Specifies which system user to switch to after having
# allocated necessary privileged resources. (FreeBSD Only!)
User = daemon
# UIBind : Specifies which ip/port kaid will use to listen for controller
# UIs. You don't want to change this.
UIBind = :34522
# OrbPort : Specifies which port kaid will use to probe(UDP) and talk to
# Orbitals (TCP) . You don't want to change this.
OrbPort = 34525
# OrbDeepPort : Specified which port kaid will use to probe and talk to
# deep resolution servers. You don't want to change this.
OrbDeepPort = 34523
# EngineBind : Specifies the IP:port to listen for the engine (UDP socket);
# (port should be forwarded in your router if using NAT)
# Ex.:,, :37500
EngineBind = :0
# EngineDeepBind : Specifies the IP:port to listen for the engine (deep resolution)
# Do not enable this unless directed to.
# EngineDeepBind must be a different port than EngineBind if
# they use the same IP address
# Ex.:,, :37501
EngineDeepBind = :0
# Engine PAT : Tells the orbital server to use your perceived UDP port, as opposed to the
# one specified in EngineBind. Ignored if EngineBind is 0. Please don't turn this
# setting to 1, unless directed to do so in a troubleshooting session.
EnginePAT = 0
# SniffDevice : NIC to sniff for console traffic (eth0, ethX, ...). Will be used
# for packet injection too.
# Ex.: eth0 (default), en0 (Mac OSX), br0 (WRT54G)
SniffDevice = eth0
# LocalDevices : How many consoles to detect before the engine locks the pcap filter. Setting this to 0,
# means the engine will never lock - which means you can use any number of consoles, but
# you will notice a performance hit, if your network is busy with other traffic. The best
# thing to do here is to set the number to the number of consoles you own - that's why it
# defaults to 1 - because most people have just 1 console.
LocalDevices = 1
# ConfigURL : URL where orb list is published (and extra stuff) - best not to mess with this.
ConfigURL =
# ConfigCache : Location of cached orb list - this file is used if the ConfigURL is inaccessible
# Make sure this file is writable. WRT54G users might want to change it to a non-volatile
# location if that feature is available in their firmware
# (i.e. /jffs/tmp/ for DD-WRT, /usr/local/ for Sveasoft)
ConfigCache = /var/misc/kaiSystemConfig.txt
# CacheFile : Location of Kai engine cache information
# Make sure this file is writable. WRT54G users might want to change it to a non-volatile
# location if that feature is available in their firmware
# (i.e. /jffs/tmp/ for DD-WRT, /usr/local/ for Sveasoft)
CacheFile = /var/misc/kaiEnginePersist.txt
#Authentication : Set username and password and AutoLogin=1 for an easy life...
AutoLogin = 1
# Xbox DHCP setting : Please leave alone, unless playing with emulators or DoomX etc. You DO NOT need this set to 1
# to use XBMC as a dashboard - setting it to 1 will *break* your dashboards internet connectivity.
XBoxHomebrew = 0

S.M.A.R.T. hard drive monitoring

apt-get install smartmontools
  • Edit /etc/default/smartmontools
  • Edit the smartd config file /etc/smartd.conf
    • comment out: DEVICESCAN
    • add: /dev/hda -a -H -m root

This little script generates a small bit of html showing a number of system stats

 tc=$(smartctl -a /dev/hda | grep 194 | colrm 1 87)
 tf=$(echo "scale=2;((9/5) * $tc) + 32" |bc)
 echo " Used   %  Share"
 echo "------ --- -----"
 df -h | grep /dev/hda | colrm 1 27 | colrm 6 11
 df -h| colrm  45 55 | grep /dev/s | grep -v tmpfs | colrm 1 27 | colrm 6 11
 echo "<table>"
 echo "<tr><td>Users:</td><td>"
 echo "</td></tr>"
 echo "<tr><td>Uptime:</td><td> "
 uptime \
  | awk '{
   # chops off "up" and everything before it:
   sub(/.*up[ ]+/,"",$0)
   # chops off ", # users" and everything after it:
   sub(/,[ ]+[0-9]+ user.*/,"",$0)
   # cleans up extra spaces, i think:
   # obvious enough, prints the results
 echo "</td></tr>"
 echo "<tr><td>Load:</td><td>"
 uptime | sed 's/^.*average: / /'
 echo "</td></tr><tr><td>Temp:</td><td>"
 echo $tf " F"
 echo "</td></tr> </table>"
 echo "<hr>"
 date | colrm 20 30"
 echo "<hr>"
 echo "</div>"
 echo "</span>"
 echo "</td></tr></table>"

USB devices including CUPS printing, scanners, and webcams

apt-get install hotplug usbview usbutils

Use this perl script to give you a tree of USB devices:

And use this to convert it to HTML:

# usage (field delimiter) (data file)

echo '<Table border="1">'
while read line
echo "<tr>"
for word in $line
echo "<td>$word</td>"
echo "</tr>"
done <$2
echo "</table>"


Use this to get you a command line upload / download speed meter, it will even spit out HTML!

apt-get instell bwm-ng
bwm-ng -T a -o html 

Kernel News