Difference between revisions of "User talk:Ramuk"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
Line 1: Line 1:
<table align=right><tr><td>http://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/CTA_map.png/300px-CTA_map.png</td></tr></table>
=My Install=
==Get the archive==
[[image:Linkstation-debdux.gif|70px]]<big>'''[http://downloads.linkstationwiki.net/freelink/freelink_powerpc-hdhglan-1.11.zip freelink_powerpc-hdhglan-1.11.zip]'''</big>
==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 and router to a different IP address (out of the box the LS should start out on 192.168.1.XXX but in [[EM Mode]] it will have a static IP address of
*Run the firmware updater executable <tt>HD-HGLAN FWUpdate-english.exe</tt>
*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 [[w:Telnet|Telnet]] to it with [[w:PuTTY|PuTTYtel]] You will be at the root shell.
{| width=90% cellspacing="1" cellpadding="2" style="font-size:100%;background-color:#00F0F0; border-width: 1px; border-style: solid"
|cellpadding="2" colspan="2" style="font-size:100%; background-color:#000000; border-width:1px ; border-style: solid" |<span style="font-size:100%; font-variant: monospace; color: white"><tt>Debian GNU/Linux 3.1 %h<br>
==[[Freelink - Convert the LinkStation into a Full-fledged Debian Linux Server]]==
Change the root password
passwd root
Get Samba and webmin and update with apt-get
apt-get update
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
Install [[w:SSH|SSH]] and remove the [[w:telnetd|Telnet Daemon]] from startup
apt-get install ssh
chmod 0644 /etc/init.d/S05utelnetd
rm /etc/rc.d/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
==[[Get access to packages from the Debian unstable branch]]==
1. Edit or create the file <tt>'''/etc/apt/apt.conf'''</tt> and add:
2. Edit <tt>'''/etc/apt/sources.list'''</tt> and add the following lines:
deb http://http.us.debian.org/debian unstable main contrib non-free
deb-src http://http.us.debian.org/debian unstable main contrib non-free
3. Then update:
apt-get update
=Add Stuff=
==[[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)]]==
wget http://hvkls.dyndns.org/downloads/latest-webinstaller.tar.gz
tar -C / -xvzf latest-webinstaller.tar.gz
*'''''<font color=red>REBOOT</font>'''''
==Install an [[Encrypted Filespace with EncFS]]==
wget  http://hvkls.dyndns.org/downloads/fuse_2.5.3-binaries-ppc.tar.gz
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: <tt>/mnt/share</tt> and change the access permissions to make it readable and writable to everybody.
mkdir /mnt/share
chmod 777 /mnt/share
2. Add the <tt>[share]</tt> section to <tt>'''/etc/samba/smb.conf'''</tt>
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]]==
wget http://hvkls.dyndns.org/downloads/libid3tag_0.15.1b-binaries-ppc.tar.gz
wget http://hvkls.dyndns.org/downloads/mtdaapd_0.2.4-binaries-ppc.tar.gz
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
wget http://downloads.linkstationwiki.net/development_tools/ppc-tools-2_1.tgz
mkdir devtools
cd devtools
tar xzvf ../ppc-tools-2_1.tgz
wget http://downloads.linkstationwiki.net/kernel_headers/kernel-headers-2.4.20_hglan_htgl-2.0.tar.bz2
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
wget http://lcdproc.omnipotent.net/download/lcdproc-0.4.5.tar.gz
tar -xvzf lcdproc-0.4.5.tar.gz
cd lcdproc-0.4.5
make install
==Install [[Ipkg on the Linkstation (for end-users)]]==
wget http://downloads.linkstationwiki.net/powerpc-hdhlan/powerpc-hdhlan-ipkg-0.99.153-1.tgz
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 http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/
src nslu2-cross-unstable http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/unstable/
src nslu2-native-stable http://ipkg.nslu2-linux.org/feeds/optware/ds101g/native/stable/
src nslu2-native-unstable http://ipkg.nslu2-linux.org/feeds/optware/ds101g/native/unstable/
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
<font color=red>/opt/sbin/ccxstream -r '''/mnt/share''' -u '''username''' -f -F /var/run/ccxstream.pid</font>
* Start the ccXStream daemon
==[[KAID - XLink Kai online gaming for Xbox, 360, PS2 and PSP]]==
wget http://www.teamxlink.co.uk/binary/kaid-ppc-static-libc-2.3.zip
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 = www.teamxlink.co.uk/connector/clientgetconfig.php
# 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...
Username =<font color = red>XXXXXXXXX</font>
Password =<font color = red>XXXXXXXXX</font>
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 <tt>'''/etc/default/smartmontools'''</tt>
*Edit the smartd config file <tt>'''/etc/smartd.conf'''</tt>
**comment out: DEVICESCAN
**add: <tt>/dev/hda -a -H -m root</tt>
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>"
==[[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: http://www.linux-usb.org/usbtree
And use this to convert it to HTML:
# usage csv2html.sh (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>"
==[[Album - Photo gallery generator which has theme support]]==
[http://marginalhacks.com/Hacks/album/ MarginalHacks/Album]: A HTML photo album generator that supports themes. It takes directories of images and creates all the thumbnails and HTML that you need.
apt-get install album
<table align=right cellpadding=0 cellspacing=0>
<td align=center>
<small>[http://davepics.com/Examples/Dominatrix6.html Dominatrix6]</small>
*Use wget to get and install this theme
*To use a theme, download the theme .tar or .zip and unpack it.
mkdir /home/httpd/Themes/
cd /home/httpd/Themes/
wget http://marginalhacks.com/Hacks/album/Themes/Dominatrix6.tar.gz
tar -xvzf Dominatrix6.tar.gz
rm Dominatrix6.tar.gz
*Full resolution images are usually too big for a web album, so we'll use medium images on the image pages:
*Then call album with the <tt>-theme</tt> option, with or without <tt>-theme_path</tt>:
album -medium 33% -theme Dominatrix6 /home/httpd/test/Photos
album -medium 33% -theme Dominatrix6 -theme_path /home/httpd/Themes/ /home/httpd/test/Photos
==Small and simple console-based bandwidth monitor==
'''[http://www.gropp.org/ Bandwidth Monitor NG (bwm-ng)]''' is a small and simple console-based live bandwidth monitor. Short list of features:
* Supports /proc/net/dev, netstat, getifaddr, sysctl, kstat and libstatgrab
* Unlimited number of interfaces supported
* Interfaces are added or removed dynamically from list
* White-/blacklist of interfaces
* Output of KB/s, Kb/s, packets, errors, average, max and total sum
* Output in curses, plain console, CSV or HTML
* Configfile
apt-get install bwm-ng
bwm-ng -T a -o html
=Kernel News=

Revision as of 16:44, 11 September 2006