Build your own NAS recovery
From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 14:30, 2 May 2011 by Lsuser1985 (Talk | contribs)
Contents |
Overview
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:
- Download and unpack the current firmware including LSupdater.
- This step should be easy and does not require explanation.
- Unpack the kernel and initrd from the firmware package
- See below for how to to this.
- Start an TFTP-server
- Below find some hints about where to get a TFTP server and how to start it.
- Make the Linkstation load the files and reboot, as described elsewhere (e.g. in Revive your arm9 box from scratch)
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
First of all you'll need the product id or you Linkstation.
short: look into linkstation_version.ini
Unpacking the file
For Linux/Unix simply use the script below.
- initrd.img and uImage.img are password protected zip file. You need to open it with an Unzip-Programm (Winzip, 7-zip, you name it). Passwords can be found on page Examine_ARM9_Firmware_without_Updating.
- From initrd.img extract the file initrd.buffalo
- From uImage.img extract uImage.map
- uImage.map contains the filenames for each product id.
- From uImage.img extract the file matching your product id.
- Rename this file into uImage.buffalo (or set a soft-link)
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 # http://buffalo.nas-central.org/wiki/Examine_ARM9_Firmware_without_Updating # for 1.40: passwd1="aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB" passwd2="aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB" # for 1.41: passwd1="IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty" passwd2="YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4" # unzip the required files unzip -P "$passwd1" initrd.img initrd.buffalo unzip -P "$passwd2" uImage.img uImage.map # which file will become uImage.buffalo FILE_BOOT_APPLY=$(grep $PRODID uImage.map | cut -f 2) unzip -P "$passwd2" uImage.img "$FILE_BOOT_APPLY" ln -s "$FILE_BOOT_APPLY" uImage.buffalo
Getting a TFTP-Server
Windows
Fetch one from you favorite software side.
Linux
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:
wget http://pypi.python.org/packages/source/t/tftpy/tftpy-0.5.1.tar.gz tar xzf tftpy-0.5.1.tar.gz cd tftpy-0.5.1 export PYTHONPATH=$PWD:$PYTHONPATH python bin/tftpy_server.py --root /path/to/firmware
- If you are an experience Python user, you may use easy_install or pip as usual.

