How upgrade firmware of IB-NAS-4220 to use self-created applications and linux packages.

!!! WARNING !!!
Do this procedure only if you have the version V1.2 of IB-NAS 4220

Change firmware of IBNAS-4220 from default to open firmware
- Download new firmware from my web site ibnas-4220-self-created-applications-2.6.3.2-20090424.zip
- Uncompress zip file.
- Logon to IBNAS web console with Admin account.
- Go to Control Panel => Maintenance => Firmware Upgrade.
- Select file "upgradeimg_ibnas4220b_2.6.3-20090525.tar.gz".
- Click "Upgrade" button.
- Wait reboot of NAS.

Install new packages like "ssh-server, optware, userscripts, zlibs"
- Download packages from my web site ibnas-4220-optware-zlibs.zip (10 mb)
- Uncompress files.
- Copy "*.tgz, *.tar" files to "\\[IB-NAS]\public\applications\new_software".
- Reboot your IBNAS.
- If all packages are successfully installed, the directory "\\[IB-NAS]\public\applications\new_software" should be empty after reboot.
- Logon to web console as "Admin".
- Go to "Control Panel" => "Network Service" => "SSH Server".
- Enable the SSH Server options.

- Reboot IB-NAS.
Install packages "rsync, mc (Midnight Commander), cron / dcron (Scheduler), joe (Editor)"
To update or install packages be sure the IBNAS have access to internet.
- Open new session to IBNAS with SSH client like "Putty" or "Extra Putty".
- Logon as "root".
- In prompt use this commands to install or update applications.
# Update ipkg tool
ipkg update
# Install Rsync
ipkg install rsync
# Install Midnight Commander "mc"
ipkg install mc
# Install CRON Scheduler
ipkg install cron
# Install JOE Editor
ipkg install joe
# Update transmission
ipkg update transmission
Start "cron Scheduler" during boot of IBNAS and load crontab list
- Create a new text file with name "loadcron" in \\[IB-NAS]\public\applications\scripts.
- Add the content of scripts bellow.
- Convert file from DOS format to Unix format with command :
dos2unix /mnt/[drive]/public/applications/loadcron
- Set permission to file with command :
chmod 777 /mnt/[drive]/public/applications/loadcron
# Initialise crontab pour les sauvegardes et la copie sur IDE2
# vide la liste
killall cron
/usr/bin/crontab -d root
# efface l'ancien crontab
rm /etc/crontab
# copy le nouveau crontab
cp /mnt/ide1/public/applications/scripts/init/crontab /etc/crontab
# change les permissions
chmod 777 /etc/crontab
# charge la liste
/usr/bin/crontab /etc/crontab -u root
# charge le scheduler cron
/mnt/ide1/optware/sbin/cron
/mnt/ide1/optware/sbin/cron
- Create a new text file "crontab" stored in directory /mnt/[drive]/public/applications/.
- Add content you want.
- Convert file from DOS format to Unix format with command :
dos2unix /mnt/[drive]/public/applications/crontab
- Set permission to file with command :
chmod 777 /mnt/[drive]/public/applications/crontab
- Reboot nas.
- After reboot see content of scheduler with command :
/usr/bin/crontab -l
Sample of crontab file
# v1.1
# minute (0-59),
# hour (0-23),
# day of the month (1-31),
# month of the year (1-12),
# day of the week (0-6 with 0=Sunday)
# minute hour mday month wday command
12 5 * * 0 /bin/rm -f /var/log/*.html
00 22 * * 0 sh /mnt/ide1/public/applications/userscript/scripts/cloneIDE1toIDE2.sh
00 22 * * 1 sh /mnt/ide1/public/applications/userscript/scripts/backupDISKtoUSB.sh
Sample script to mirror IDE1 to IDE2 with crontab
Rsync command web site
Wikipedia rsync command
#!/bin/sh:/sbin:/bin:/opt/bin/sh
SRC=/mnt/ide1/partage/
DST=/mnt/ide2/partage/
WRK_DIR=/mnt/ide1/public/applications/scripts
LOG_FILE=/mnt/ide1/public/logs/cloneIDE1toIDE2.log
LOG_RSYNC=/mnt/ide1/public/logs/cloneIDE1toIDE2.rsync.log
RSYNC_APP=/opt/bin/rsync
PARAMS="--archive --recursive --update --log-file=$LOG_RSYNC --safe-links --chmod=u=rwx,g=rwx,o=rwx --times --exclude=.DS_Store"
echo $(date '+%y.%m.%d %H:%M:%S') "Start backup $SRC $DST : " >$LOG_FILE
$RSYNC_APP $PARAMS $SRC $DST
echo $(date '+%y.%m.%d %H:%M:%S') "chmod -R -v 777 $DST " >>$LOG_FILE
/bin/chmod --changes --verbose 777 $DST >>$LOG_FILE
echo $(date '+%y.%m.%d %H:%M:%S') "End backup : " >>$LOG_FILE
Documentation and reference guides
Raid Sonic ICY BOX IBNAS-4220B Web Site
NAS 4220.org
NAS-Portal.org
IBNAS 4220 datasheet.pdf
IBNAS 4220 manual eng.pdf
IBNAS-4220-how to build an application.pdf