Optware/Ipkg on QNAP TS-x09 (PRO)
Open Turbostation on TS-109/209/PRO
*** Warning: you are doing this at your own risk! ***
I. Automatic Installation
QNAPAndy (admin on http://forum.qnap.com) has provided an automated script for installation.
Download and untar the script in /share/Public
# cd /share/Public
# wget ftp://csdread:csdread@ftp.qnap.com/NAS/Optware-Ipkg/optware-tsx09.tar.gz
# tar zxvf optware-tsx09.tar.gz
Installation :
# ./optware-bootstrap-qnap-tsx09.sh optware_chroot.tar.gz
Uninstallation :
# ./optware-bootstrap-qnap-tsx09.sh uninstall
II. Manual Installation
1. Check the size of the root partition !
If its more then 83% it can make problems
Firstly check what is your HD partition
# df
You will see on TS-109 something like this :
/dev/ram0 8.7M 8.7M 0 100% /
/dev/sda4 58.1M 46.7M 11.4M 80% /mnt/ext
/dev/sda1 509.5M 69.3M 440.2M 14% /mnt/HDA_ROOT
/dev/sda3 457.4G 167.6M 457.2G 0% /share/HDA_DATA
On TS-209 something like this :
/dev/ram0 8.7M 6.9M 1.8M 79% /
/dev/sda4 58.1M 42.3M 15.8M 73% /mnt/ext
/dev/md9 509.5M 68.3M 441.1M 13% /mnt/HDA_ROOT
/dev/md0 457.4G 152.0G 305.3G 33% /share/MD0_DATA
So if your HD partition is HDA_DATA you use it everywhere bellow insted MD0_DATA
2. Prepare the directories to receive the ipkg install
# mkdir -p /share/MD0_DATA/optware/opt
# mkdir /share/MD0_DATA/optware/ipkglib
# cd /; ln -sf /share/MD0_DATA/optware/ipkglib /usr/lib/ipkg
# rm -rf /opt
# cd /; ln -sf /share/MD0_DATA/optware/opt /opt
Check if /opt is symlinked to /share/MD0_DATA/optware/opt :
# cd /
# ls -la
You should see :
opt -> /share/MD0_DATA/optware/opt/
3. Download and “install” ipkg
First, go to optware to avoid messing up free space on root partition then download and “install”
# cd /share/MD0_DATA/optware
# wget http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/unstable/ipkg-opt_0.99.163-9_arm.ipk
# tar -xOvzf ipkg-opt_*_arm.ipk ./data.tar.gz | tar -C / -xzvf -
Edit /opt/etc/ipkg.conf
# vi /opt/etc/ipkg.conf
Add the line
src mssii http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable
Update the package list :
# /opt/bin/ipkg update
You should see :
[/] # /opt/bin/ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/mssii
Successfully terminated.
If there are errors or you do not see Downloading info that means that either you did not edit ipkg.conf mentioned before or hmm.
4. Install applications (mc in this example)
Change to optware directory cause this ipkg left some strange files which makes / partition to small, i dont know if its an error or something
(Installing mc i had some problems with slang so i needed to do it separatly)
# cd /share/MD0_DATA/optware
# /opt/bin/ipkg update
# /opt/bin/ipkg install slang
# /opt/bin/ipkg install mc --tmp-dir=/share/MD0_DATA/
And then to run mc
/opt/bin/mc
5. Mount /opt on every reboot ( thanks to QNAPAndy )
# mount /dev/mtdblock5 -t ext2 /tmp/config
# cd /tmp/config
# vi autorun.sh
Add to the following lines to the file then save and close
rm -rf /opt
ln -sf /share/MD0_DATA/optware/opt /opt
Make autorun.sh executable and do not forget to unmount !
# chmod 755 autorun.sh
# cd /
# umount /dev/mtdblock5
After reboot you should have everything mounted on /opt so you can use /opt/bin/
6. Add /opt/bin to PATH on reboot
# mount -t ext2 /dev/mtdblock5 /mnt/config
# cd /mnt/config
# vi autorun.sh
Add the following line at the bottom then save and exit vi:
echo “export PATH=/opt/bin:$PATH” >> /etc/profile
Do not forget to unmount !
# cd /
# umount /mnt/config
7. Uninstall procedure:
# rm -rf /usr/lib/ipkg
# rm -rf /share/MD0_DATA/optware
# rm -rf /opt
Laurent’s Blog » Blog Archive » Some news on the QNAP-TS209 NAS:
[...] Optware/Ipkg on QNAP TS-x09 (PRO) [...]
10 January 2008, 1:18 pm