Build your own NAS recovery

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 14:17, 2 May 2011 by Lsuser1985 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



If there is no NAS-recovery package available for your Linkstation, you may build your own.

This has been tested with

  • LS-WVL/R1 with Firmware 1.40 and 1.41

Basic steps are:

  1. Download and unpack the current firmware including LSupdater.
    This step should be easy and does not require explanation.
  2. Unpack the kernel and initrd from the firmware package
    See below for how to to this.
  3. Start an TFTP-server
    Below find some hints about where to get a TFTP server and how to start it.

Unpack the kernel and initrd from the firmware package

LSUpdater send archive to the Linkstation, but NAS-recovery requires unpacked files to be served via TFTP.

The firmware-package contains (among others):

  • initrd.img - a ZIP-file containing initrds (initial ramdisks)
  • uImage.img - a ZIP-file containing the kernels

Getting th Product-ID

short: look into linkstation_version.ini

Helper script for Linux/Unix

You may copy & paste the following lines into a shell:

PRODID=0x00003008 # see text for how to the this value

# from 
# for 1.40:

# for 1.41:

# unzip the required files
unzip -P "$passwd1" initrd.img
unzip -P "$passwd2" uImage.img
# which file will become uImage.buffalo
FILE_BOOT_APPLY=$(grep $PRODID | cut -f 2)
unzip -P "$passwd2" uImage.img "$FILE_BOOT_APPLY"
ln -s "$FILE_BOOT_APPLY" uImage.buffalo

Getting a TFTP-Server


Fetch one from you favorite software side.


Several tftp servers should be available with your Linux distribution. The package names may vary. Simply choose one :-)

Please have in mind, that TFTP uses Port 69, thus the server has to be started as root.

  • tftp-server
    • is not working, since it requires file-requests to contain absolute pathes, but the Linkstation requests without path.
    • meant to be started via inetd, but can be run stand-alone
    • To start in stand-alone use in.tftpd --foreground --verbose /path/to/firmware
  • python-tftpy -- pure Python implemention
    Can be run without installation:
 tar xzf tftpy-0.5.1.tar.gz
 cd tftpy-0.5.1
 python bin/ --root /path/to/firmware
If you are an experience Python user, you may use easy_install or pip as usual.