binaries for iomega home media network hard drive (hmnhd, 'oxnas', OXE810SE) (/sbin/busybox uname -a gives OS: Linux 2.6.24.4 armv5tejl, where the trailing l indicates little endian) apart from the programs listed below the cs05q3armel repository of nslu2-linux.org can be used (except linux kernel modules); see section: /opt/bin/ipkg; thanks Pedro for this hint! busybox (1.10.1) - copy to /sbin - run commands not built into iomega hmnhd as: /sbin/busybox mycommand mc.tar - midnight commander (4.55) - install with: tar -C / -xvf mc.tar dropbear.tar - dropbear (0.52): ssh server and client - install with: tar -C / -xvf dropbear.tar - tar archive includes init scripts in init.d, rc0.d, rc3.d, rc6.d to start dropbear ssh server (and to mount devpts on /dev/pts) - user for shared folders created by web interface of hmnhd are created in /etc/passwd and are recognized by dropbear (root password might be set by copying a password of a shared folder user to the entry for root in /etc/passwd) - first install: plug builtin harddisk directly into sata adapter of a linux pc and mount 1st partition as ext3 - recommended: create your own keys (on linux pc with dropbearkey.x86) - if mc does not work: cd /lib/terminfo/x; ln -s xterm xterm-color (after login environment variable TERM is xterm-color which was not included in /lib/terminfo/x/ of original mc.tar archive) /opt/bin/ipkg (http://www.nslu2-linux.org/wiki/MSSII/HomePage) - enable usage of packages at http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/ - e.g. mail backup with dovecot imap server and getmail (http://pyropus.ca/software/getmail/) concept (http://forum.mindfactory.de/modem-netzwerke-allgemein/28838-imap-server-nslu2-dovecot-getmail.html) - native toolchain with /opt/bin/ipkg install optware-devel - install ipkg with mkdir /nethdd/opt ln -s /nethdd/opt /opt cd /opt wget http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/unstable/ipkg-opt_0.99.163-10_arm.ipk tar -xOvzf ipkg-opt_*_arm.ipk ./data.tar.gz | tar -C / -xzvf - mkdir -p /opt/etc/ipkg echo "src armel http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable" > /opt/etc/ipkg/armel-feed.conf /opt/bin/ipkg update /opt/bin/ipkg list /opt/bin/ipkg install my_optware_package reiserfs.ko - support to manually mount partitions formatted with reiserfs - install with: /sbin/insmod your_path/reiserfs.ko telnetd - busybox telnetd (runs without inetd; needs: mkdir /dev/pts; mount -t devpts none /dev/pts) - install to /sbin (because builtin telnetd is at /bin/telnetd) (builtin telnetd might work with inetd with /usr/etc/inetd.conf) nfsd.tar, uImage.nfsd - kernel nfs server - started by: /etc/init.d/portmap start; /etc/init.d/nfsserver start - install modules and programs with: tar -C / -xvf nfsd.tar - BIG FAT WARNING: only replace kernel if you know what you are doing - sfdisk -d /dev/sda gives # partition table of /dev/sda unit: sectors /dev/sda1 : start= 48195, size= 8225280, Id=fd /dev/sda2 : start= 8273475, size=1945246590, Id=fd /dev/sda3 : start= 1, size= 48194, Id=da /dev/sda4 : start= 0, size= 0, Id= 0 - partition sda3 starts directly after mbr and contains U-Boot loader and kernel - use dd to copy content of sda3 to a file (dd if=/dev/sda3 of=/nethdd/backup/sda3.bin) - RECOMMENDED: store sda3.bin at a safe place outside iomega nas. Complete desaster recovery would need as well: - sfdisk -d /dev/sda >/nethdd/backup/sfdiskdump.txt - mount -o bind / /old-root tar -C /old-root -cf /nethdd/backup/rootfs.tar . umount /old-root - open this file with mc viewer in ascii mode and search for Linux-2.6.24.4 - check that there are only 2 places where this string is found - use and search again 1st place - switch to hex mode and go with arrow key 3 lines upwards - check if topmost line consists only of 0x54 0x54 ... and if line below starts with 0x 27 05 19 56 (U-Boot 1.1.2 image magic header) - if this confirmed the kernel image starts at the line below 0x54 0x54... - convert the line number from hex to decimal (e.g. search google for: 0x25600 in decimal. This gives 153088.) - copy uImage.nfsd with dd to this position in /dev/sda3 **** MAY BRICK YOUR DEVICE **** -- double check the seek=... number (e.g. dd if=uImage.nfsd of=/dev/sda3 bs=1 seek=153088) - when dd has completed - check current kernel with uname -a - reboot iomega nas by webinterface - check newly installed kernel with uname -a (2.6.24.4 #2 Fri Feb 27 22:39:44 CET 2009 armv5tejl unknown) - edit /etc/exports according to your network - /etc/init.d/portmap start - /etc/init.d/nfsserver start (cat /proc/filesystems gives now: nodev nfsd) - done! activate automatic hard disk spindown (->power saving, ->noise reduction, ->infrequently used nas) - required: 4GB usb flash device to run root filesystem from flash - edit /etc/nasmonitor.conf (wrong config might make iomega nas UNBOOTABLE) - create a backup of this file! - add the following line to section [DISK] HDSpindownTime=120 (causes to run hdparm -S 120, that is 10 minutes spindown time or use 242 which means 1 hour) - set a longer interval for disk fillup check (15000 instead of 15) in section [VOLUME] MonitorVolumesRate=15000 - do not change other settings in this file - edit /linuxrc to switch to /dev/sdb1 (=usb flash device) (only switches to sdb1 if usb device with rootfs is plugged in) - create a backup of this file! - copy (the unmodified file) /linuxrc to /linuxrc2 - then edit /linuxrc and add the lines of linuxrc.txt after line /bin/mount -t proc none /proc (or use the patch file linuxrc.diff) - prepare the 4gb usb flash device - either use a linux pc or copy busybox from spblinux.de/arm9 to /sbin on iomega nas - on iomega nas - plug flash device into iomega nas - check with busybox dmesg that flash device is recognized as /dev/sdb - one primary partion of type Linux raid autodetect (fd) has to be created on flash device /sbin/busybox fdisk /dev/sdb ('m' prints help) - format partition with ext3 journaling filesystem /sbin/mkfs.ext3 /dev/sdb1 - disable warnings /sbin/tune2fs -c -1 -i 0 /dev/sdb1 - mount usb flash partition and copy root filesystem mkdir /newroot mount /dev/sdb1 /newroot mount -o bind / /old-root tar -c -C /old-root . |tar -x -C /newroot umount /old-root umount /newroot - reboot iomega nas - double check that changes are ok and that backup files exist - run shutdown -r now (or use web interface) - watch if device boots and spins down (the fan will continue to rotate but the disk will stop when 10 minutes idle) iscsi-target (http://iscsitarget.sourceforge.net/): - e.g. as disk of a virtual machine running in virtualbox 2.2.4 (VBoxManage addiscsidisk --server 1.2.3.4 --target iqn...) (-> 500MB data on 100MB/s network 8MB/s (r), 4.6MB/s (w) -> 500MB data on 1GB/s network 21MB/s (r), 6.7MB/s (w)) - iscsi_trgt.ko (add to file modules.dep: /lib/modules/2.6.24.4/extra/iscsi_trgt.ko:) - ietadm (/sbin) - ietd (/sbin) - libcrypto.so.0.9.8 (/lib) - iscsi_trgt (/etc/init.d) - ietd.conf, initiators.allow, initiators.allow (/etc) ssmtp (http://packages.debian.org/source/lenny/ssmtp): - allows to send email to remote smtp server - configured in /opt/etc/ - ssmtp.conf: root=postmaster UseTLS=YES AuthUser=my_mail@gmx.net AuthPass=strictlySecret - revaliases: root:my_mail@gmx.net:mail.gmx.net:465 - binary ssmtp copied to /opt/sbin/ - mail sent, as user root on nas (sender name taken from /etc/passwd), using echo -e "Subject: Test1 from nas\n\nNas speaking here\nrobot" | /opt/sbin/ssmtp you@me.com