Obtain the zip password for the LinkStation firmware image.dat

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 20:42, 30 June 2006 by Ramuk (Talk | contribs)

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). Please be aware this method involves manually altering parts of the LinkStation’s flash memory. Proceed at your own risk!

Note: 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
   #!/bin/bash
   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

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.
{"cc_re__cc_re__cc_by_sa_3_0": ["?title=Obtain_the_zip_password_for_the_LinkStation_firmware_image.dat&amp;oldid=2966\" title=\"Permanent link to this revision of the page\">Permanent link</a></li>\n\t\t\t\t<li id=\"t-info\"><a href=\"/w/index.php?title=Obtain_the_zip_password_for_the_LinkStation_firmware_image.dat&amp;action=info\">Page information</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div><!-- end of the left (by default at least) column -->\n<div class=\"visualClear\"></div>\n<div id=\"footer\" role=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-S", "=\"contentinfo\">\n\t<div id=\"f-copyrightico\">\n\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<div id=\"f-poweredbyico\">\n\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t</div>\n\t<ul id=\"f-list\">\n\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-Share Alike 3.0 Unported</a> unless otherwise noted.</li>\n\t\t<li id=\"privacy\"><a href=\"/wiki/Http://www.nas-central.org/privacy-policy\" title=\"Http://www.nas-central.org/privacy-policy\">Privacy policy</a></li>\n\t\t<li id=\"about\"><a href=\"/wiki/NAS-Central_Buffalo_-_The_Linkstation_Wiki:About\" title=\"NAS-Central Buffalo - The Linkstation Wiki:About\">About NAS-Central Buffalo - The Linkstation Wiki</a></li>\n\t\t<li id=\"disclaimer\"><a href=\"http://www.nas-central.org/index.php/NAS-Central_Ma"], "copyright__copyright__copyright": ["", "telnet into the LinkStation and cat cmdline:\n\u00a0\u00a0\u00a0cat /cmdline\n\n11. You should see the password used to unzip image.dat. For the powerpc-hdhlan LinkStation:\n\u00a0\u00a0\u00a0-P NFM_TUPSBHFNFM_TUPSBHF /mnt2/image.zip -d /mnt2\n\nMost of this information courtesy of http://www.sowbug.org/mt/archives/000179.html.\n\nSec\u2019s Method\n\nThere 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.", "telnet into the LinkStation and cat cmdline:\n\u00a0\u00a0\u00a0cat /cmdline\n\n11. You should see the password used to unzip image.dat. For the powerpc-hdhlan LinkStation:\n\u00a0\u00a0\u00a0-P NFM_TUPSBHFNFM_TUPSBHF /mnt2/image.zip -d /mnt2\n\nMost of this information courtesy of http://www.sowbug.org/mt/archives/000179.html.\n\nSec\u2019s Method\n\nThere 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."]}