Obtain the zip password for the LinkStation firmware image.dat
Based on work by moomoo and frontalot.
Originally by frontalot.
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>
|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
3. Rename the existing unzip:
mv unzip real_unzip
4. Create a new unzip with the following contents
echo “$*” >> /cmdline
5. Make the new unzip executable:
chmod a+x unzip
6. Unmount the image and gzip it back up:
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:
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
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.