Author Topic: Nimrod's "It might get you a Linkstation with extras if you're lucky" Guide  (Read 18448 times)

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
First up, a lot of this work is NOT mine. A lot of it has been pulled together from either The NAS Central Site or from Soopahflys experiences ;)
The rest of it is mine (there is a fair chunk) :p

These are the steps Ive followed (more than once) to get my Linkstation up and running with NZBGet and NZBGetWeb installed (and working).
Ive no idea if Twonky or the other services are still working as I dont use them. That said, I havent gone out of my way to break them so I would expect them to be there, untouched.

n.b.
These steps do not take into account the actual configuration of the Linkstation through the official WebGUI, these steps are merely what is needed to install "extras".

Code: [Select]
First up, open this so you know what the LEDs on the front mean !
http://www.buffalotech.com/knowledgebase/users/kb.php?id=10011&category_id=5&sid2=

Download and Flash the latest Stevie Wonder Firmware (follow the HowTo !)
Latest: http://www.mediafire.com/file/emw1tltdmnn/HS-DHGL_FW_229-shmod9.rar
Check Here ?: http://tech.groups.yahoo.com/group/LinkStation/?yguid=405443310

Once flashed download ACPCommander and the addons.tar pack
Here: http://buffalo.nas-central.org/download/TOOLS/ALL_LS_KB_ARM9/ACP_COMMANDER/acp_commander.jar
Addons: http://buffalo.nas-central.org/download/Uploads/LSPro/Binaries/addons.tar
Put the addons in the same directory as acp_commander.jar
Create a file in the ACPCommander directory called ACPWipe.bat
Paste this into the file: java.exe -jar acp_commander.jar -t ip.ip.ip.ip -o -addons
Replace IP with your Linkstation IP
Save File
Open a CMD window, goto ACPCommander directory and run ACPWipe.bat
Last line should read: "You can now telnet to your box as user root providing no / an empty password."
If it doesnt then switch off firewall / check IP of Linkstation

Telnet into the Linkstation and login as root (no password)
Set a root password: type "passwd" (w/o quotes) and specifcy password twice
Set an admin password: type "passwd admin" (w/o quotes) and specify password twice

--- Bootstraping ---
Telnet into Linkstation
Recommend using Putty for copy + paste of commands

The version changes so check here: http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/
Find the file named: lspro-bootstrap_*.xsh
If new than 1.2-7 then use that in the above commands

Fire the following commands into the telnet session:
mkdir /mnt/disk1/tmp
cd /mnt/disk1/tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/lspro-bootstrap_1.2-7_arm.xsh
sh lspro-bootstrap_1.2-7_arm.xsh

The Linkstation is now bootstrapped but its worth reconnecting on a fresh Telnet session
Once reconnected tap out the following to update the bootstrap repository information:
ipkg update
ipkg upgrade

The Linkstation is now ready to have anything from the ipkg repository installed.

--- Application Installs ---
ipkg install nano
ipkg install unrar
ipkg install unzip
ipkg install nzbget lighttpd php-fcgi

Get the web based interface for nzbget (Check for latest: http://sourceforge.net/projects/nzbget/files/)
mkdir /mnt/disk1/share/nzbgetweb
cd /mnt/disk1/share/nzbgetweb
wget http://downloads.sourceforge.net/project/nzbget/web-interface-stable/1.4/nzbgetweb-1.4.zip
unzip -o nzbgetweb-1.4.zip
mv nzbgetweb /opt/share/www/
rm nzbgetweb*

Make sure a standard config (and post processing script) for nzbget is in place
mkdir /opt/etc/nzbget/
cp /opt/share/doc/nzbget/nzbget.conf.example /opt/etc/nzbget/nzbget.conf
cp /opt/share/doc/nzbget/postprocess-example.conf /opt/etc/nzbget/postprocess.conf
cp /opt/share/doc/nzbget/postprocess-example.sh /opt/etc/nzbget/postprocess.sh
chmod a+x /opt/etc/nzbget/postprocess.sh
nano /opt/etc/nzbget/postprocess.sh
CTRL+W (search for) SCRIPT_CONFIG_FILE
SCRIPT_CONFIG_FILE="postprocess.conf"
CTRL+O
CTRL+X

Configure lighttpd to serve up nzbgetweb
/opt/etc/init.d/S80lighttpd stop
nano /opt/etc/lighttpd/lighttpd.conf
CTRL+W (search for) mod_fastcgi
unrem the line
CTRL+W (search for) server.event-handler
server.event-handler="poll"
CTRL+W (search for) url.access-deny
update the filter to ( "~", ".inc", ".sqlite" )
CTRL+O (save)
CTRL+E (exit)
/opt/etc/init.d/S80lighttpd start

Use NZBGetWeb to configure NZBGet
http://LINKSTATION_IP_ADDRESS:8081/nzbgetweb/
Under WEB-INTERFACE
[COMMUNICATION WITH NZBGET-SERVER]
ServerConfigFile = /opt/etc/nzbget/nzbget.conf
ServerConfigTemplate = /opt/share/doc/nzbget/nzbget.conf.example
ServerStartCommand = /opt/bin/nzbget -D -c /opt/etc/nzbget/nzbget.conf 2>&1
ServerStopCommand = /opt/bin/nzbget -Q -c /opt/etc/nzbget/nzbget.conf 2>&1
NzbDir = /mnt/disk1/share/Downloads/nzb
--- Save Changes ---
[CONFIGURATION OF POSTPROCESSING-SCRIPT]
PostProcessConfigFile = /opt/etc/nzbget/postprocess.conf
PostProcessConfigTemplate = /opt/share/doc/nzbget/postprocess-example.conf
--- Save Changes ---
[DISPLAY]
CheckSpaceDir = /mnt/disk1/share/Downloads/dst
--Save Changes ---

Under NZBGET-SERVER
[PATHS]
$MAINDIR = /mnt/disk1/share/Downloads
--- Save Changes ---
[NEWS-SERVERS]
* Enter your news server details !
--- Save Changes ---
[INCOMING NZBS]
AppendNZBDir = no
NzbDirInterval = 60
MergeNzb = yes
--- Save Changes ---
[DOWNLOAD QUEUE]
DeleteCleanupDisk = yes
--- Save Changes ---
[LOGGING]
ResetLog = yes
--- Save Changes ---
[PAR CHECK/REPAIR]
NzbCleanupDisk = yes
--- Save Changes ---
[POSTPROCESSING]
PostProcess = /opt/etc/nzbget/postprocess.sh
PostPauseQueue = yes
--- Save Changes ---

Under POSTPROCESSING-SCRIPT
[OPTIONS]
JoinTS = yes
--- Save Changes ---

Click "Back to Main Page"
Under Control Panel, click start
You should see the message: INFO: Server started successfully.
If any other message is displayed fix the problem !
Click Refresh and more information should be displayed.

Basic installation is now complete :D

--- Application Tweaks / Auto Loaders ---
Auto Launch NZBGet after a reboot
cd /opt/etc/init.d/
wget http://dl.dropbox.com/u/7691893/S81nzbget
mv S81nzbget S81nzbget.bak;tr -d \r <S81nzbget.bak >S81nzbget;rm S81nzbget.bak
chmod +rx /opt/etc/init.d/S81nzbget

Replace built in NTP with something more robust
* The NTPClient is configured for GMT/BST Daylight, edit S11ntpclient and replace the timezone with the appropriate string for your timezone. Examples can be found here: http://nuwiki.openwrt.org/oldwiki/openwrtdocs/whiterussian/configuration
        ipkg install ntpclient
cd /opt/etc/init.d/
wget http://dl.dropbox.com/u/7691893/S11ntpclient
mv S11ntpclient S11ntpclient.bak;tr -d \r <S11ntpclient.bak >S11ntpclient;rm S11ntpclient.bak
chmod +rx /opt/etc/init.d/S11ntpclient
* To update clock every hour:
cd /
env EDITOR=nano crontab -e
replace the line /etc/cron/cron.d/calib_time.sh with
00 * * * * /opt/etc/init.d/S11ntpclient restart


I will add more little tweaks n things as I encounter them on my Linkstation.

Last Edit: March 01, 2011, 01:38:56 AM by Clock'd 0Ne #187;

Dont forget to put in my little hack for lighttpd, so that it doesnt crash every 5 minutes.
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

I cant get the S81nzbget to run.  Can you post your whole file?
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
Will do when I get back to being able to connect again :)

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
See main post for dropbox links :)

Nah, still no dice, but its no biggie for me to click the "start" button in the NZBGet Gui
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
Does it work manually ?
i.e.
/opt/etc/init.d/S81nzbget stop
/opt/etc/init.d/S81nzbget start

You might need to give it permission to execute: chmod 0755 /opt/etc/init.d/S81nzbget


?

Tried that, just says command not found.
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
I can only guess that one of the following files isnt where I have assumed itd be:

1) /opt/bin/nzbget
2) /opt/etc/nzbget/nzbget.conf

The full start command that the script would run is:
/opt/bin/nzbget -D -c /opt/etc/nzbget/nzbget.conf

I cannot see another reason for it to not work :S

Quote from: Nimrod
I can only guess that one of the following files isnt where I have assumed itd be:

1) /opt/bin/nzbget
2) /opt/etc/nzbget/nzbget.conf

The full start command that the script would run is:
/opt/bin/nzbget -D -c /opt/etc/nzbget/nzbget.conf

I cannot see another reason for it to not work :S


My conf files are stored in opt/etc
the app is in /mnt/disk1/share
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
Quote from: soopahfly

My conf files are stored in opt/etc
the app is in /mnt/disk1/share


Ok, (working on a bit of a guess here), you need to edit S81nzbget:

prefix="/opt"
EXTDIR="/mnt/disk1/share"
PATH=${EXTDIR}:${prefix}/bin:${prefix}/sbin:/sbin:/bin:/us/sbin:/us/bin
NAME=nzbget
DAEMON=${EXTDIR}/${NAME}
DAEMON_OPTS="-c ${prefix}/etc/nzbget.conf"

Out of interest, how/why are you getting ipkg to install to /mnt/disk1/share ?

The default of /opt/ is actually a symlink to /mnt/disk1/.optware/ anyway.


edit:
Also update the guide with links to dropbox copies of my config files.
Ive also got my own hybrid version of the NTPClient solution you found up and running.

My previous statement might not be true.

My nzbget and nzbget.conf are both in /opt/etc

XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

  • Offline Mardoni

  • Posts: 2,636
  • Global Moderator
  • Hero Member
  • On the Sofa, probably ;)
Ok if I tell you what theyre for, you can figure out what they should be :p

prefix="/opt" <- Root of the directory where ipkg installs apps
PATH=${prefix}/bin:${prefix}/sbin:/sbin:/bin:/us/sbin:/us/bin <- the possible paths to the app/script in question
NAME=nzbget <- the name of the app/script we want to run
DAEMON=${prefix}/bin/${NAME} <- this should end up being the fullpath to the app/script (/opt/bin/nzbget)
DAEMON_OPTS="-c ${prefix}/etc/nzbget.conf" <- fullpath to the nzbget.conf file


I think Im going to look into how the post processing scripts can suspend downloading and try to write a download speed manager. Being on VM, I get capped hard if I download in "peak" hours. So having a way to control NZBGet would be great :)

That bits relatively straight forward.  Do you want a hard cap on downloads until off peak times, or throttling?
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

0 Members and 2 Guests are viewing this topic.