1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

NAS200 is it bricked ?

Discussion in 'Cisco/Linksys Network Storage Devices' started by matsimoto, Mar 14, 2008.

  1. matsimoto

    matsimoto LI Guru Member

    Hi,

    I have a strange behaviuor on one of my NAS200. I flashed a self compiled image with telnet enabled ala Jac on two of my NAS200. One NAS200 boots up without any problem.

    The other Box turns on all the Leds and thats it.

    Is it bricked ?

    Ciao
    matsimoto
     
  2. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Since you say you have two NAS200's, there's a possibility that we're running into a collision problem. My box' hardware (physical/MAC) address was changed from the number on the sticker to 00:C0:A0:D0:E0:00 at some point; I'm not 100% sure when or why that happened: could have been when I had to recover my box from bricked state, or because I'm running self-built firmware.

    Open a telnet (or ssh) connection to the working NAS200, and type "ifconfig". You should see the hardware address on the first line after "HWAddr" in the form of a group of hex numbers separated by colons ':'. Those numbers should correspond to the sticker on the bottom of your NAS box. If the address does NOT correspond to the sticker anymore and you didn't try to do any funky stuff like restore one box' configuration to the other one, it might mean that building your own firmware results in resetting your hardware address.

    The good news is that if the hardware address got changed, chances are that your broken box works fine but refuses to boot because it detects the one that's already on the network and has the same MAC address.

    Can you try bringing the "broken" box up while the "working" box is off or disconnected? Let us know if you can, and we'll take it from there.

    ===Jac
     
  3. matsimoto

    matsimoto LI Guru Member

    Hi,

    I disconnected the other NAS200, after this I removed the Disk and a Memorystick.
    Powered on the bircked NAS200 and all Leds are bright, the fan starts but nothing else happens.

    The MAC-Address of the working NAS200 is ok and the same MAC as on the sticker.

    Any hints ??

    Ciao
    matsimoto
     
  4. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Alright, actually that's good news too, it means we now know you don't lose your MAC simply by flashing it with your own firmware. Already this day is not wasted :)

    Now let's see how bad your flash went.

    We can try to connect to Redboot over the network by running a script, however you first have to change your network settings so your computer knows where to send the packets. You will have to set your network card to use 192.168.21.x where x is any number between 1 and 254 but not 249. The netmask should be 255.255.255.0. You can set your gateway to the internal address of your router so you can still use the Internet. Afterwards you can change the settings back to what they were.

    Once your computer is on the 192.168.21.x network, copy this text into a file named redboot.telnet.bat and run it while the (broken) NAS is off; switch the NAS on when the script tells you to.

    Code:
    echo off
    set addr=192.168.21.249
    echo Set objShell = WScript.CreateObject("WScript.Shell") > redbootSlug.vbs
    echo Set objExecObject = objShell.Exec("cmd /c ping -t -w 1 %addr%") >> redbootSlug.vbs
    echo Wscript.Echo "Start slug after first ping timeout..." >> redbootSlug.vbs
    echo Do While Not objExecObject.StdOut.AtEndOfStream >> redbootSlug.vbs
    echo     strText = objExecObject.StdOut.ReadLine() >> redbootSlug.vbs
    echo     Wscript.Echo strText >> redbootSlug.vbs
    echo     If Instr(strText, "Reply") > 0 Then >> redbootSlug.vbs
    echo         Exit Do >> redbootSlug.vbs
    echo     End If >> redbootSlug.vbs
    echo Loop >> redbootSlug.vbs
    echo objShell.Run("Telnet %addr% 9000") >> redbootSlug.vbs
    echo Do Until Success = True >> redbootSlug.vbs
    echo     Success = objShell.AppActivate("Telnet") >> redbootSlug.vbs
    echo Loop >> redbootSlug.vbs
    echo Wscript.Sleep 500 >> redbootSlug.vbs
    echo objShell.SendKeys "^C" >> redbootSlug.vbs
    echo Wscript.Echo "Done... You can close this command window." >> redbootSlug.vbs
    echo Wscript.Quit >> redbootSlug.vbs
    
    CALL CScript redbootSlug.vbs
    del redbootSlug.vbs
    The script was modified from one of the pages on NSLU2-linux.org, by the way.

    If the box still has a working boot loader, the script will open a Telnet window with a Redboot command prompt.

    WHATEVER YOU DO, DON'T TYPE THE FLASH COMMAND AT THE REDBOOT PROMPT! THIS WILL BRICK YOUR BOX IMMEDIATELY WITHOUT WARNING!!!

    If you get a Redboot prompt, great! It means your bootloader is intact and reviving your box is probably not that difficult; you can either set up a serial port (but you will need some hardware that you probably have to order online) or you can try doing some research on Redboot to download your Linux kernel through TFTP or HTTP; you will have to set up a TFTP or HTTP server on your PC. You should download a kernel plus ramdisk into memory, probably to address 0x400000 or higher, then use the Linux command in redboot to boot it. Unfortunately you won't be able to see the boot happening without serial port, but after a while you should at least see the lights go off :)

    By the way, normally when you're at a Redboot prompt, you can boot Linux from the ROM with the following command (without the need to download anything). You won't see it run unless you do it from the serial port, but it's good to know anyway.

    Code:
    linux -b 0xff800000 -l 0x200000 -s 0x600000 -c "console=ttyS0,38400 root=/dev/mtdblock1"
    If you can't connect to the Redboot bootloader (and your network is set up correctly), you should try making a serial port first (see also on this page; the pinout is the same on the NAS200 as on the NSLU2) to see if Redboot is alive.

    If the bootloader is broken and you see nothing not even on a serial port, you will have to make a JTAG cable. I believe leitec is working on this in this thread and there are some hints in my telnetd thread. There currently is no easy recipe to unbrick a NAS200 I'm afraid (it doesn't have any kind of fallback ROM) but I'll be willing to help if you're going to try. Don't throw the hardware away, eventually I will write a JTAG webpage somewhere when I get time.

    ===Jac
     
  5. matsimoto

    matsimoto LI Guru Member

    Hi Jac,

    GREAT, I can telnet into redboot. I have to use my Linux-Box, but your NSLU2Linux.org hint shows me the way to a shell-code-line that gives me access to RedBoot.

    I have an HTTP server running on my linux box, but I dont know how to:
    Is it neccessary to have a disk installed ?

    I removed th disk to be sure that not a died disc hangs it up.

    Could you give me a hint on how to download the kernel/ramdisk into memory and where I get a kernel/ramdisk ??

    Sorry for the newbie questions, but I am more a high-level lang programmer than a hardware guy.

    Ciao
    matsimoto
     
  6. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    Cool! :cool:

    Downloading should be a command similar to:

    Code:
    load -r -b 0x0400000 -h 192.168.21.2 -m http /NAS200_V34R62.bin
    If that works, you will have the Linux kernel in RAM at location 0x400000 followed by the initrd. Try something like:

    Code:
    linux -b 0x400000 -l 0x200000 -s 0x600000 -c "console=ttyS0,38400 root=/dev/ram"
    I think that will try to start the kernel with the root file system that you downloaded; if all goes well you should see the lights go off and hear two beeps after a while. You will then want to access the web GUI to flash the firmware. Then you should be able to reboot normally again.

    Note that I haven't tested this but none of the Redboot commands in this posting will brick your box. The worst that can happen is that the kernel panics without a way to find out why, if you don't have a serial port. If it takes longer than a minute or so before the lights turn off, simply unplug the box, plug it back in and start over.

    I'm not sure. The scripts depend on the fact that there is a configuration partition on disk 1. The software is able to deal with empty harddisks too and the web interface start either way whether the harddisk is formatted or not, I think. That way you can tell the unit to go format the first disk. However having NO disk is a different situation compared to having an EMPTY disk, so it may not be supported.

    Unless your harddisk has irreplaceable data on it (in which case you probably shouldn't be running homebrew firmware anyway), it's probably better to have at least the first harddisk installed.

    ===Jac
     
  7. matsimoto

    matsimoto LI Guru Member

    Hi,

    ok everything seems to work, after loading the image with:
    Code:
     load -r -b 0x0400000 -h 192.168.21.21 -m http /NAS200_V34R62.bin
    I get an akcnowledge:
    Code:
    Raw file loaded 0x00400000-0x00bfffff, assumed entry at 0x00400000
    When using the linux command:
    Code:
    linux -b 0x400000 -l 0x200000 -s 0x600000 -c "console=ttyS0,38400 root=/dev/ram"
    all lights went off except the Ethernet led. This is really cool, but now nothing happens.
    Strange is that the power led goes off too, but the ethernet led is glowing.

    Do you have an y further hint on how to boot ? Just trying again or varying the -b address ?

    Ciao
    matsimoto
     
  8. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    There's no point in varying the -b address (apparently the kernel starts running, after all it turns your lights off) but you can try changing the -s parameter to 0x800000 instead of 0x600000. You may also want to add a -r 0x600000 parameter (indicating the starting address of the ram disk) But I have to say I don't think it's going to make much of a difference.

    You can also try specifying /dev/mtdblock1 as root device instead of /dev/ram.

    Other than that, I'm running out of ideas here and I'm not near enough to my own NAS to try stuff out until next week. I definitely suggest building a serial port if you can (it's cool to have one anyway).

    ===Jac
     
  9. matsimoto

    matsimoto LI Guru Member

    Hi,

    as you mentioned. Nothing worked. Could it be, that I have a hardware failure ?
    And did you know if I voided the warranty by only flashing a new Image on the NAS200 ?

    I already had installed a serial port on a NAS200, but murphys law striked again, by letting the box die that does not have the serial port :(.

    What is your experience is warraty voided when a new image was flashed ?

    Ciao

    Matsimoto
     
  10. jac_goudsmit

    jac_goudsmit Super Moderator Staff Member Member

    I don't think your warranty is void just because you flashed an image. You should probably be able to get your device replaced if all warranty stickers are still there.

    Personally, I usually think warranties are a hassle and I don't really care about them unless I buy an article that's dead on arrival. Also, in your specific case, you know that Redboot still starts and listens to telnet and other commands, so it may be possible to revive it with just a serial port and some Linux knowledge.

    I don't know if you would feel confident enough to open the box and install a serial port; if not, your best option is probably to try and return the box. If you do feel confident, I'll keep trying to help you but of course it's still possible that we run into some sort of unsolvable problem and then you won't be able to return it anymore.

    ===Jac
     
  11. Toxic

    Toxic Administrator Staff Member

    Linksys usually insist that as long as you have a receipt of purchase and that the unit has not been pulled apart and the warranty stick broken, then you should be ok. however, telling them you have flashed the firmware with a 3rd party firmware will void the warranty since they only give support for their own firmware.

    But then again, how would they know you trashed the device with an unknown firmware? :hmm:
     
  12. matsimoto

    matsimoto LI Guru Member

    Hi,

    I already have installed a serial port on the other NAS200, and had built a small PCB with the maxim chip to make it work with a normal PC RS-232 that is not what I am afraid of.

    I think it would be unlucky if I solder the pins for the serial port on the board just to see that I have a hardware malfunction caused by a manufacturing error.

    But hey, no risk no fun ;). I will heat up the soldering iron and see what happens.

    Stay tuned.

    Ciao
    matsimoto
     

Share This Page