NOTE: This howto is for people who have already enabled telnet on their Corza device ( see http://www.patriotmem.com/forums/showthread.php?t=1977 )
The Corza includes basic linux tools but almost none of the most useful (and standard) utilities that are needed for day-to-day usage via the shell. I've prepared a package of binaries that includes some of the most commonly used and useful utilities that can be installed without modification to any of the existing Corza system files.
To install the linux pack first download: http://www.cubicvr.org/corza/corza_linux_ext.tgz (13.5M)
Then upload this file to your Corza NAS unit under the public/ folder via FTP / Samba / etc.
Once uploaded telnet to your Corza as usual, i.e:
macbook:~ ccliffe$ telnet corza-nas.local
Connected to corza-nas.local.
Escape character is '^]'.
CORZA-NAS.gateway.2wire.net login: root
Password: <your admin password>
BusyBox v1.00-rc3 (2009.05.07-19:45+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
Next change to your HD storage mount point:
Then unpack the corza linux pack from there:
CORZA-NAS> cd /mnt/md1/
It will create a subfolder called linux/ on your hard-drive that will contain necessary binaries and libraries compiled for ARMV4L (Corza's processor).
CORZA-NAS> tar -xvzf public/corza_linux_ext.tgz
Once unpacked you can now initialize your linux environment -- please note that you should not run env_setup from the current directory (i.e. do NOT run ./env_setup.sh), please supply the full path in order for the script to properly initialize your environment.
If env_setup.sh worked correctly upon your next login bash will be launched automatically, however you should note that if you reboot your Corza device you will need to re-run the env_setup.sh. Most telnet clients provide the option to create a macro that can be run if you frequently need to reboot your corza device (if so read the next section and I may have a fix for you via telnet)
At this point you will now be running bash and have many new commands available (hit tab and confirm if you want to see them all), most notable tools that are provided in this pack are:
bash - Bourne again shell, most common linux shell most users will be comfortable with, has the added advantage of fixing the default terminal size restriction
nano - vi and vim were too large to include, pico has licensing issues so nano is a great alternative
wget - if it's on the web and you need to get it this is the tool to have ('curl' is also available for hardcore users)
iptraf - real-time network traffic monitor
ncftp - handy for downloading directly from ftp
rsync - High performance industry standard tool for mirroring files
svn - Subversion revision management tool (I'm working on getting it running as an SVN server as well)
git - GIT revision management tool
ssh - OpenSSH for making remote SSH connections
scp - OpenSSH file copy tool
lame - Included just for performance test fun, it's the standard open-source MP3 encoder for raw audio files.
find - useful on it's own or in combination with grep for doing quick file queries in the shell, using 'ls -R' was getting to be a pain
tailf - useful for watching log files, also available is the standard 'tail' command
sqlite - sqlite database tools
unzip - unarchiver for .ZIP files
unarj - unarchiver for .ARJ files (sorry tried to find unpacker for .RAR but no luck, working on it!)
diff - file comparison utility
Fixing the torrentflux looping login screen / Accessing MySQL:
Frequently on my Corza unit TorrentFlux will fail to login and just return me to the login screen. Nothing short of a reboot would solve this problem until I discovered in the log that it had simply run out of space for storing temporary session files.
This won't always resolve the issue, sometimes I still need a reboot -- either way if you're just interested in accessing the system's MySQL installation you will find it helpful as well:
Fix #1) MySQL BinLogs - TorrentFlux uses MySQL and apparently MySQL is using binlogs to record history, I found upwards of 30mb of historical MySQL data since the initial configuration of my Corza unit, the best way to clear this information is to use MySQL's standard commands.
First open a new MySQL session: (yes the MySQL root password really is 123456)
CORZA-NAS> mysql -u root -p
Enter password: 123456
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 846 to server version: 4.1.22-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> PURGE MASTER LOGS BEFORE CURRENT_DATE;
Query OK, 0 rows affected (0.10 sec)
Fix #2) syslogd - The syslog daemon appears to lock some file handles and take up more space than it should (log files being deleted instead of properly rotated and managed?)
To restart syslogd run the following command:
One of those two if not both should allow you to proceed to login to TorrentFlux, I am experimenting with adding them to a cron task and including it in the env_setup.sh script but am not confident to send out that particular piece at the moment.
CORZA-NAS> /etc/rc.d/S12syslog.sh restart
Please enjoy the pack and let me know if you have questions or suggestions.
Charles J. Cliffe, CubicVR 3D Engine: http://www.cubicvr.org/