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

Posted by Cereal Friday, April 02, 2010 7:00:00 AM
Rate this Content 2 Votes

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

http://www.simple-tech.info - IB NAS 4220

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

http://www.simple-tech.info

Change firmware of IBNAS-4220 from default to open firmware

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

http://www.simple-tech.info

Install new packages like "ssh-server, optware, userscripts, zlibs"

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

    http://www.simple-tech.info
     
  9. 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.

  1. Open new session to IBNAS with SSH client like "Putty" or "Extra Putty".
  2. Logon as "root".
  3. 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

  1. Create a new text file with name "loadcron" in \\[IB-NAS]\public\applications\scripts.
  2. Add the content of scripts bellow.
  3. Convert file from DOS format to Unix format with command :
    dos2unix /mnt/[drive]/public/applications/loadcron
  4. 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

  1. Create a new text file "crontab" stored in directory /mnt/[drive]/public/applications/.
  2. Add content you want.
  3. Convert file from DOS format to Unix format with command :
    dos2unix /mnt/[drive]/public/applications/crontab
  4. Set permission to file with command :
    chmod 777 /mnt/[drive]/public/applications/crontab
  5. Reboot nas.
  6. 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
 

 

Simple-Tech.info
Site Map | Printable View | © 2008 - 2010 Simple-Tech.info | Powered by mojoPortal | HTML 5 | CSS | Design by mitchinson