I have run unraid for a couple of years now on a regular computer. I also have a Thecus N5200 NAS (600Mhz Pentium M with 512 RAM). Specs for the Thecus are very similar to the Norco DS-520G that somebody on the forum has said runs Unraid ok. In fact, I think that the hardware is virtually identical except that the Norco processor runs at 1GHZ and the Thecus does not have a VGA port (although there is a header on the motherboard for VGA).
I want to try unraid on the thecus, but have no way to change the bios to boot from usb instead of the internal CF (attached to a 44 pin IDE controller). I have discovered that there is a boot loader shell script from Thecus that is normally used to load firmware directly on boot if the web interface gets messed up. What you do is put a file (example in code box below) on the usb flash drive along with the firmware and it sets up the Thecus. The shell script is named factory_test.sh - - the Thecus looks for a file named that and executes the file if it is attached to the USB at boot time.
I was wondering if it would be possible somehow to hijack the boot process of the Thecus using a file named "factory_test.sh" to get the box to boot off the Unraid on the USB flash drive.
I admit it is a long shot, but seems more do-able than soldering on a VGA connector in order to change the boot order in the bios.
#!/bin/sh
fwfile="N5200upgrade.1.00.07.bin"
raid_test=0
nonettest=0
function copy_otherfile() {
mountpath="/mnt"
normal=`cat /proc/scsi/scsi|awk '/Thecus:/{FS=" ";printf("%s:%s\n",$2,$3)}'|awk -F: '{if ($2> {printf("%s\n",$4)}}'`
for i in $normal ;do
strExec="cat /proc/partitions|awk '/${i}/{FS=\" \";print \$4}'"
mount_usbs=`eval ${strExec}`
for mount_usb in $mount_usbs ;do
#create folder
strexec="mount|awk '/\/dev\/${mount_usb}/&&/\/mnt/'"
chkmount=`eval ${strexec}`
if [ "${chkmount}" == "" ];then
/bin/mount -o iocharset=utf8,umask=0,fmask=001,uid=99,gid=99 "/dev/${mount_usb}" "${mountpath}"
if [ $? = 0 ];then
if [ -f ${mountpath}/led_test.sh ];then
cp ${mountpath}/led_test.sh /app
chmod +x /app/led_test.sh
fi
if [ -f ${mountpath}/ether-wake ];then
cp ${mountpath}/ether-wake /app
chmod +x /app/ether-wake
fi
sync
umount ${mountpath}
fi
else
if [ -f ${mountpath}/led_test.sh ];then
cp ${mountpath}/led_test.sh /app
chmod +x /app/led_test.sh
fi
if [ -f ${mountpath}/ether-wake ];then
cp ${mountpath}/ether-wake /app
chmod +x /app/ether-wake
fi
sync
umount ${mountpath}
fi
done
done
}
function copy_fw() {
mountpath="/mnt"
normal=`cat /proc/scsi/scsi|awk '/Thecus:/{FS=" ";printf("%s:%s\n",$2,$3)}'|awk -F: '{if ($2> {printf("%s\n",$4)}}'`
for i in $normal ;do
strExec="cat /proc/partitions|awk '/${i}/{FS=\" \";print \$4}'"
mount_usbs=`eval ${strExec}`
for mount_usb in $mount_usbs ;do
#create folder
strexec="mount|awk '/\/dev\/${mount_usb}/&&/\/mnt/'"
chkmount=`eval ${strexec}`
if [ "${chkmount}" == "" ];then
/bin/mount -o iocharset=utf8,umask=0,fmask=001,uid=99,gid=99 "/dev/${mount_usb}" "${mountpath}"
if [ $? = 0 ];then
if [ -f ${mountpath}/${fwfile} ];then
cp ${mountpath}/${fwfile} /tmp
fi
sync
umount ${mountpath}
fi
else
if [ -f ${mountpath}/${fwfile} ];then
cp ${mountpath}/${fwfile} /tmp
fi
sync
umount ${mountpath}
fi
done
done
}
##for fwupgrade
#echo "agent2 0 BTMSG Start FW upgrade" > /tmp/avrpipe
if [ ! -f /tmp/${fwfile} ];then
#echo "agent2 0 BTMSG Copy N5200 FW" > /tmp/avrpipe
copy_fw
fi
sync
ifconfig eth0 172.16.77.100 netmask 255.255.255.0 broadcast 172.16.77.255
ifconfig eth1 192.168.2.254 netmask 255.255.255.0 broadcast 192.168.2.255
sleep 3
echo "agent2 0 BTMSG Start Upgrade ..." > /tmp/avrpipe
if [ -f /tmp/${fwfile} ];then
cd /tmp
/usr/bin/des -k 2006N5200 -D /tmp/${fwfile} /tmp/${fwfile}.tar.gz
tar zxfp /tmp/${fwfile}.tar.gz
/tmp/upgrade
sh -x /tmp/upgrade/postup.sh
fi
rm -rf /app/factory_test.sh /app/ether-wake /app/led_test.sh
###Reset to factory default######
sh /img/bin/resetDefault.sh
exit
Any ideas would be appreciated!
thanks
Bill