Wednesday, July 22, 2009

Launch application at TS-101 startup : autostart.sh

On Turbo Station TS101, there is a hidden partition that one can mount to access a file (autorun.sh) that is launched and executed at each startup.

To mount this hidden partition :
1- Log to you TS station with administrator login
Note : To be able to do that you must have a updated firmware from QNAP.
The one you have when you receive the TS does not allow telnet services.
When the firmware is flashed, then telnet service is connected to port 13131.
When it is installed you access your QNAP with the following command (on windows console):
telnet ip_of_your_qnap 13131

2- execute the following to mount the hidden partition
mount -t ext2 /dev/mtdblock4 /tmp/config

3- Then edit the autorun.sh file :
vi /tmp/config/autorun.sh

4- If you are as paranoid as me, then sync and unmount your file system after modification:
sync
umount /dev/mtdblock4

Be careful, this file system is in the flash, so :
- do not put big files in it
- do not erase files in it
- use as much care as possible to not destroying it

Information on other TS can be found here