The NAS unbricking guide

From NAS-Central MRT Wiki
(Redirected from NAS unbricking guide)
Jump to: navigation, search

What does "bricked" mean?

Bricked means an apparently dead or not responding device. You may put your NAS in this state in many ways. Speaking in general: the simpler way is putting a wrong software on it that prevents the OS (operating system) loading correctly. That happens if original flash partitions are overwritten with corrupted or simply not-working images. It's important to understand that an official firmware upgrade is packed as a tar.gz file, but it contains the raw partitions will be written on the flash: zImage, rd.gz and hddapp.tgz. The webgui update page will uncompress these and write into the flash. If you replace or change these files, your NAS OS wont probably start any more.

Another way to brick your NAS is using the bootloader console menu to update some partition. I have heard of people who wrote the bootloader partition with the tar.gz file itself.

To avoid these problems when upgrading your NAS firmware, remember to always read all instructions before doing anything required to do so, and not to start these dangerous (for your NAS) procedures if you don't understand what you are doing.

Make sure your NAS is really bricked

Checking if OS is being loaded correctly

  • Turn on your NAS and wait about 5 minutes
  • Run SetupUtil.exe from the installation CD to detect the NAS ip
  • If the previous test didn't work, try pressing the power button
  • If the NAS shuts-down immediately, the OS has not being loaded correctly

Checking if the Bootloader is reachable with telnet

If you have a GigaNAS, you can skip this step: its bootloader seems not to have any embedded telnet server. So, if you do a wrong firmware update, you have no change to unbrick your NAS but opening the case and using an hardware method.

The Bootloader is started when you press the power button the first time after the NAS has been connected to power. It waits for 3 seconds for a CTRL+C on its console, then the OS is loaded. In these 3 seconds a telnet server will be active on the NAS default address 192.168.2.71, and same console is shown there.

So, to connect to that server you have to:

  • connect with your PC to the NAS network using an hub/switch (avoid direct cross-over connection)
  • configure your PC NIC (network interface) to a NAS bootloader compatible IP, like 192.168.2.1
    Attention: PC and NAS must be in the same Subnet 192.168.2.x!
  • enter the command "telnet 192.168.2.71 9000" at your windows command prompt and wait before pressing enter
  • turn-on the NAS
  • press enter on the windows command prompt and wait for the connection
  • if nothing happens, retry again about 10 times. Else continue to the "serial console method" paragraph
  • if a message appears on screen, press CTRL+C
  • continue to the "telnet method" paragraph

You could also download IcyBox_FlashStart, a small AutoIt script that starts telnet and presses ^C for you automatically at the right time.

Unbrick the NAS

The telnet method

As told before, when you are connected to your NAS console using the telnet protocol, you have to use the bootloader menu to restore your NAS partitions. You have to upgrade these threes: Kernel image, Ramdisk image and Application image.

To do so, do these steps (after connected to the NAS with telnet using instructions above):

With Dual HDD NAS

  • Install a tftp server (I use tftpd32 on windows)
  • Download the firmware image you want to restore on your NAS (here)
  • Extract files from that firmware image and put into the directory where tftpd32.exe resides (files should be zImage, rd.gz and hddapp.tgz).
    Enter them without directory names and /.

  • Attention: after the corresponding file has been loaded, the flash process will start. This may take several minutes. Don't enter anything in the telnet window during that time - be patient - after the flash process is finished you will get the response on screen, otherwise the telnet window may print some communication error message and exit.

  • Press 4 on the bootloader menu, then insert these values (followed by enter): Kern, 0x70020000, 0x01600000, 0x01600000
    Press Y (if required), 2 (=download by TFTP), then enter your tftp server IP, press enter, enter 'zImage' and press enter

  • Press 4 on the bootloader menu, then insert these values (followed by enter): Ramdisk, 0x701A0000, 0x00800000, 0x00800000
    Press Y (if required), 2 (=download by TFTP), then enter your tftp server IP, press enter, enter 'rd.gz' and press enter

  • Press 4 on the bootloader menu, then insert these values (followed by enter): Application, 0x703A0000, 0x00000000, 0x00000000
    Press Y (if required), 2 (=download by TFTP), then enter your tftp server IP, press enter, enter 'hddapp.tgz' and press enter

  • Press 1 on the bootloader menu or manually shutdown/restart the NAS
  • Now you should have your NAS booting

With Giga NAS

  • Install a tftp server (i use tftpd32 on windows)
  • Download the firmware image you want to restore on your NAS (here)
  • Extract files from that firmware image and put into the directory where tftpd32.exe resides (files should be zImage, rd.gz and hddapp.tgz).
    Enter them without directory names and /.
  • Press Y on the bootloader menu, then press 2, enter your tftp server IP, press enter, enter 'zImage' and press enter
  • Press R on the bootloader menu, then press 2, enter your tftp server IP, press enter, enter 'rd.gz' and press enter
  • Press A on the bootloader menu, then press 2, enter your tftp server IP, press enter, enter 'hddapp.tgz' and press enter
  • Press 1 on the bootloader menu or manually shutdown/restart the NAS
  • Now you should have your NAS booting

The serial console method

You need to have bootloader serial console access to use this method. This is the only way to unbrick your NAS with the GigaNAS model that don't have the telnet server on the bootloader. All StorLink NASes seems to have an on-board serial connector with TTL 3.3V levels.

Dual HDD Nas on-board TTL serial connector (JP2) :
Dualhddnas-jp1.jpg

GigaNAS on-board TTL serial connector (JP1) :
Giganas-jp2a.jpg

JP1/JP2 pinout :

1 Vcc (+3.3Vcc)
2 Tx
3 Rx
4 N.C.
5 GND

You either have to build by yourself a TTL 3.3V to standard RS232 levels converter or buy a already built one somewhere (look for it on ebay) or you buy a cheap usb2serial-phonesync cable which can be modified to work (look at the Section "USB-Connection" at [1] and here).
Attention: Always connect adapter and NAS before connecting to the PC. Always be sure to have a good GND connection. There is no overvoltage protection on the NAS and the pins are directly connected with Flash and CPU and may be damaged easily! (Happened already!)
Connect the cable on JP1 (or JP2) and to your PC serial, and open a serial terminal like Hyperterminal (on Windows) or minicom (Linux). My preferred one is Putty available on both.

Configure that software to use the right serial port you connected the NAS, and select 19200 as baudrate, 8 bit of data length, no parity, 1 stop bit.

To avoid strange NAS hangups, you have to connect the serial adapter on the NAS pinstrip only after the NAS has the power. Then you can turn it on (prey for seeing some message on your screen). If you see a prompt message waiting for CTRL+C, give it: now you would be able to follows the instructions above to use the bootloader menu to unbrick your NAS.

The JTAG method

Yes, it's possible: many thanx to nas-2000 guys HWguru and Rambo (for coding the Flashtool and their precious support), to Sj29fr (Dual HDD NAS) and Lord Scaffard (GigaNAS)!

Follow related threads here:

Hardware requisites:

  • LPT Wiggler JTAG [2] or USB FTDI FT232R Adapter
  • 20 pins connector for JTAG (to be soldered at location J2)
  • 100 ohm resistor (not needed for GigaNAS)

Software requisites:

Procedure :

  • Build a Wiggler JTAG adapter or buy it on Ebay
  • Install Port95nt for LPT (reboot is required) or USB driver, then start NAS_FlashTool
  • To enable CPU DEBUG mode, you need to short pin 1 (or 2) to 17 on JTAG connector
  • On DUAL HDD NAS you have to enable the JTAG interface by soldering a 100 ohm resistor between R36 and 3.3V.

You can find 3.3V on R35.
R36 jtag.jpg

  • Connect JTAG to the NAS
  • Connect your JTAG probe to LPT port or USB Adapter to a USB port
  • Power up the NAS
  • Start NAS_FlashTool and press "Jtag Test"
  • Press "Write Boot" and select redboot.bin
  • Continue restoring with telnet method (Dual HDD Nas) or with console method (both NAS support this)

Recommended JTAG cables :

this cable has he advantage that it has loose pins, which means non standard jtag pinouts are no problem. these cables can be used on a good range of embedded devices.

A note to italian users

Due to many help requests, we can recover your your NAS and you're not able to unbrick by yourself (serial or JTAG method) for you for a little donation (just an offer for the time of service). Else i have some cheap serial to USB converters i can send you in only 1 day.

If you have a bricked NAS that you don't want to restore... send us: it will be considered as a project donation...

Anyway, contact us into the forum for any other information.