Obtain the zip password for the LinkStation firmware image.dat

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search

This article Based on work by moomoo and frontalot. Originally by frontalot. at Linkstationwiki.org

Mike Tsao’s Method

This method of obtaining the image.dat zip password works best if you already have root access to the LinkStation. You also need the ability to extract ramdisk.image.gz from firmimg.bin. For these reasons this method is most useful if a new zip password is used for image.dat (as was the case for stock 1.4x firmwares).<p>

Nuvola apps important.png 
Please be aware this method involves manually altering parts of the LinkStation’s flash memory. Proceed at your own risk!

With some tweaking this method should work even if you don’t already have root access to the LinkStation.

1. Obtain the desired firmware and extract ramdisk.image from firmimg.bin. See the appropriate flash ROM analysis for instructions on disassembling firmimg.bin.

2. Mount ramdisk.image:
   mount ramdisk.image /mnt/ramdisk -o loop
   cd /mnt/ramdisk

3. Rename the existing unzip:
   cd bin
   mv unzip real_unzip

4. Create a new unzip with the following contents
   echo “$*” >> /cmdline
   `real_unzip $*`

5. Make the new unzip executable:
   chmod a+x unzip

6. Unmount the image and gzip it back up:
   cd ..
   gzip −9 ramdisk.image

7. Use the appropriate toolchain to create a new firmimg.bin containing the original firminfo.txt and vmlinux.gz and new ramdisk.image.gz. For the powerpc-hdhlan LinkStation:
   setsum firminfo.txt vmlinux.gz -r ramdisk.image.gz -o firmimg.bin

8. Flash firmimg.bin to the appropriate flash bank. For the powerpc-hdhlan LinkStation:
   cat firmimg.bin > /dev/fl1

9. Replace the original firmimg.bin in the firmware update and run the firmware updater.

10. Once the firmware update process is complete, telnet into the LinkStation and cat cmdline:
   cat /cmdline

11. You should see the password used to unzip image.dat. For the powerpc-hdhlan LinkStation:
   -P NFM_TUPSBHFNFM_TUPSBHF /mnt2/image.zip -d /mnt2

<p>Most of this information courtesy of http://www.sowbug.org/mt/archives/000179.html.

Sec’s Method

There is an alternative method of obtaining the image.dat zip password outlined at the TeraStation Wiki. Although this has not been attempted, the method should also work for the LinkStation.