Talk:The LinkStation firmware flasher

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 20:24, 30 July 2006 by Hanfbauer (Talk | contribs)

Jump to: navigation, search

Testing freelink images on LS2, i found out a lot of details on the flashing process. I don't know if this applies to LS1, HG, Kuro, TS as well, so I decided to put my knowledge in this discussion area. Please correct me if I'm wrong, make additions and integrate this stuff in the main article if is of general use for other platforms.

We have two ways of flashing: EM mode and normal mode. This is true only for normal mode on my LS2:

Flashing the image.dat to hda1 from Windows needs at least the follwing requirements:

1. idtinfo loaded to create /proc/linkstation

root@FL060727:~# lsmod
Module                  Size  Used by    Tainted: P
idtinfo                12428   0  (unused)

if idtinfo is not loaded do (ignore warnings, this a license problem):

root@FL060727:~# insmod idtinfo
Using /lib/modules/2.4.20_mipsel_linkstation/idtinfo.o
Warning: loading /lib/modules/2.4.20_mipsel_linkstation/idtinfo.o will taint the       kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module idtinfo loaded, with warnings

2. apservd must be executeable. If he is not, do a changemod and start it:

root@FL060727:~# chmod +x /etc/init.d/apservd
root@FL060727:~# ls -la /etc/init.d/apservd
-rwxr-xr-x  1 root root 1286 Jul 29 23:20 /etc/init.d/apservd
root@FL060727:~# /etc/init.d/apservd start
Start services: ls_servd on eth0

ls_servd is triggerd by starting apservd. ls_servd is opening a port on your LS2:

root@FL060727:~# netstat -a
Active Internet connections (servers and established)
...
udp        0      0 *:22936                 *:*
...

If you can't see this open port, the flasher won't be able to find your box. All 3 Windows applications which came with your Linkstatation (HD-HLAN FWUpdate.exe, IPSetup.exe and LsBackup.exe) are using this open UDP port to communicate with your Linkstation.

3. Some scripts must be in the right place on your box. As I did not sort out those scripts, which are really essential to the flashing process, I was copying all scripts to hda1:

root@FL060727:~# ls -la /www/script/*
-r-xr-xr-x  1 root root    4 Dec 21  2004 /www/script/Yes
-rwxr-xr-x  1 root root   32 Dec 21  2004 /www/script/dobackup.sh
-r-xr-xr-x  1 root root  206 Dec 21  2004 /www/script/index.htm
-rwxr-xr-x  1 root root  528 Dec 21  2004 /www/script/melsub_check_ip.sh
-rwxr-xr-x  1 root root  759 Dec 21  2004 /www/script/melsub_disk_rebuild.sh
-rwxr-xr-x  1 root root 1764 Dec 21  2004 /www/script/melsub_disk_repair.sh
-rwxr-xr-x  1 root root 2056 Dec 21  2004 /www/script/melsub_filepath.sh
-rwxr-xr-x  1 root root 2285 Dec 21  2004 /www/script/melsub_flash.sh
-rwxr-xr-x  1 root root  876 Dec 21  2004 /www/script/melsub_init.sh
-rwxr-xr-x  1 root root 7801 Dec 21  2004 /www/script/melsub_mkprintfilter.sh
-rwxr-xr-x  1 root root  828 Dec 21  2004 /www/script/melsub_shutdown.sh
-rwxr-xr-x  1 root root  572 Dec 21  2004 /www/script/melsub_shutdown2.sh
-rwxr-xr-x  1 root root   99 Dec 21  2004 /www/script/melsub_tmpclean.sh
-rwxr-xr-x  1 root root 2824 Dec 21  2004 /www/script/ref_lpr_filter_info.sh
-rwxr-xr-x  1 root root  932 Dec 21  2004 /www/script/set_delshare_base.sh
-rwxr-xr-x  1 root root  766 Dec 21  2004 /www/script/set_hdd_check_detail.sh
-rwxr-xr-x  1 root root  763 Dec 21  2004 /www/script/set_hdd_check_normal.sh
-rwxr-xr-x  1 root root 1880 Dec 21  2004 /www/script/set_hdd_format.sh
-rwxr-xr-x  1 root root  705 Dec 21  2004 /www/script/set_hdd_format_usb.sh
-rwxr-xr-x  1 root root 2542 Dec 21  2004 /www/script/set_ip.sh
-rwxr-xr-x  1 root root   46 Dec 21  2004 /www/script/set_printer_queue.sh

At least melsub_flash.sh, melsub_shutdown2.sh and melsub_filepath.sh are needed by the flasher

If these requirements are met, I was able to use the flasher and put new images to my box. There's still much to be done, as at the moment the flashing procedure always ends up with an error message: "Attempt to renew firmware has failed". Nevertheless my box was always working. --Hanfbauer 15:39, 30 July 2006 (EDT)