DES-3226L D-Link Switch - erased "permanent memory"

Adam D
Adam D used Ask the Experts™
on
Good Morning,

I have a D-Link DES-3226L switch in which I used the utility menu and #7 to erase the permanent memory thinking it would reset the device, when in fact it fully erased nearly everything leaving me with a very basic shell command (this device is running linux) and maybe no way to restore the device and/or re-load the image I need to run the switch.

A copy of the readout is below, but my main question is how can I find the image I need to reload, reload the image, or in the alternative load a different image that will allow this switch to work.

Thank you for your time.

Output from switch:
==============================
U-Boot 0.3.0 (Dec 13 2005 - 16:14:21)                                    

Board: DLink GSW7224TG                      
DRAM:  Less than 128MB hence resetting to try 64MB                                                  


U-Boot 0.3.0 (Dec 13 2005 - 16:14:21)                                    

Board: DLink GSW7224TG                      
DRAM:  64 MB            
Flash:  8 MB            
In:    serial            
Out:   serial            
Err:   serial            
Hit any key to stop autoboot:  0                                
## Booting image at a0400000 ...                                
   Image Name:   Linux 2.4.20                            
   Image Type:   MIPS Linux Multi-File Image (gzip compressed)                  
   Data Size:    1877783 Bytes =  1.8 MB
   Load Address: 80001000
   Entry Point:  80196048
   Contents:
   Verifying Checksum ... OK
   Uncompressing Multi-File Image ... OK

Starting kernel ...

IP-Config: Incomplete network configuration information.

D-Link DES-3226L Startup Rev: 1.3

Select startup mode. If no selection is made within 3 seconds,
the D-Link DES-3226L Application will start automatically...
1 - Start D-Link DES-3226L Application
2 - Display Utility Menu
Select (1, 2):

Starting D-Link DES-3226L application...
==============================

At this point it says it cannot find:

tar: /mnt/fastpath/fastpath.tgz
file not found

md5sum: fastpath.md5sum   file not found

I presume the fastpath.tgz is the file it is using for the DES "application"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Well, you are going to need to figure out the hardware revision of your switch by following the instructions,
and get a copy of the right firmware image:
http://www.dlink.com/products/default.aspx?pid=DES-3226L&tab=3

When you get the firmware compressed archive it should be named something like
des3226L  firmware  1420.rar

De-compress that RAR file,
and inside it there should be a .tgz  file

This ".tgz"  is a compressed archive with the firmware upgrade - fastpath.tgz is one of the files inside it, by the way.


The normal firmware upgrade procedure is to:

(1)  Load this .tgz file on a TFTP server
You need a TFTP server, if you don't have one, there is free TFTP server software you can use (such as Solarwinds TFTP server).    Place the .tgz file in the TFTP server's directory

(2)   Use the web interface to tell the switch to download the correct file from the TFTP server's  IP address.
Then the switch  will  extract it,  run the script, and perform the firmware upgrade.


Since you are unable to fully boot the switch, you may need to use the utility menu again,  to perform a TFTP boot  with the firmware upgrade image.


If you are at a shell prompt on the switch, you can try using the 'copy'  command to grab the file,  if  you are at the   proper switch CLI  prompt.




Or try  the 'tftp'   command if you are at a  Unix shell prompt.
You will want to  place files in the temporary download directory.

extract the .tgz
run the "UPDATE" script.


The update script will verify the archives, and  update /mnt/fastpath


If you have any doubts about how to do this exactly, or which image to use exactly, you should call D-Link support and ask for assistance.    They may tell you to RMA the switch, however.


It is also possible they could walk you through an undocumented procedure to boot the device in an upgrade mode,  where the firmware will be grabbed from TFTP.


Adam DIT Solutions Developer

Author

Commented:
Good Morning,

  Thank you for your reply.

  I found the files i need, but now I need to figure out how to get them from my computer to the switch.

  It does not appear that I have any TFTP ability, although I do have xmodem/ymodem/zmodem options.

  Here is a list of command options:

Utility Menu:

D-Link DES-3226L Startup -- Utility Menu

1 - Start D-Link DES-3226L Application
2 - Load Code Update Package using XMODEM/YMODEM/ZMODEM
3 - Display Vital Product Data
4 - Select Serial Speed
5 - Retrieve Error Log using XMODEM/YMODEM/ZMODEM
6 - Erase Current Configuration
7 - Erase Permanent Storage

Q - Quit from D-Link DES-3226L Startup

Select option (1-8 or Q):
=======================
shell commands:

autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
bootm   - boot application image from memory
bootd   - boot default, i.e., run 'bootcmd'
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
echo    - echo args to console
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
iminfo  - print header information for application image
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sleep   - delay execution for some time
version - print monitor version
?       - alias for 'help'
=> ? | more
syntax error
=> ?
autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
bootm   - boot application image from memory
bootd   - boot default, i.e., run 'bootcmd'
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
echo    - echo args to console
erase   - erase FLASH memory
flinfo  - print FLASH memory information

===========================

Thoughts?

Thanks.
Top Expert 2010

Commented:
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Adam DIT Solutions Developer

Author

Commented:
Good Evening digitap,

  Unfortunately not as I do not have access to a TFTP option on the switch in its current condition.

  But, I believe I can get the XModem to work through hypertrm, I just have not had a chance to try it yet.

  Thanks though.
Top Expert 2010

Commented:
i know that the information you provided above doesn't show any tftp options, but you've tried to upload anyway?  do you get any errors when you try?
Adam DIT Solutions Developer

Author

Commented:
Unfortunately I have not had the chance since Saturday to attempt the upload with XModem, but based on some research I think I can use the Utility menu and #2 to load the "update" package into the proper directory using X/Y/ZModem.

In theory...at least. :)
Commented:
That list of commands is obviously  U-Boot  from  ucLinux.
http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:features#example_commands

However, the command you need  "tftpboot"  is not in your list.
And you cannot use the D-Link  "download firmware  <IP>  <imagename>"
command without successfully booting the application image first.


So  I would suggest using ZMODEM  to upload the  code package as a last ditch effort.
However, keep in mind the  upload of a 5 Megabyte file over a serial port can take a long time.

And may  be difficult to perform successully   (without bit errors occuring during the transfer,   causing interruption and need to start over again),   if for example there's too much noise, serial cable is too long, etc.

_Hopefully_  if you select ZMODEM they will be so kind as to give you a selection of baud rates to use for the transfer.




Adam DIT Solutions Developer

Author

Commented:
Thanks Mysidia, very interesting observation.

So, what is the difference between X, Y & ZModem?

Commented:
X/Y/Z MODEM were 3 successive protocols, were in very common use with modems in the days before widespread internet access was available.. they were used to upload files to and download files from BBS services  over  POTS telephone lines, dialup modems, which is  presented to the computer as a serial connection.

Your terminal emulator application ought to support at least one of them...  if not,  there is always Windows Hyperterminal,  or you could get a trial version of SecureCRT or similar.


XMODEM is the oldest of the 3 protocols,  and provides a (fairly inefficient) file transfer algorithm with an option for basic  CRC error detection.

YMODEM was a minor modification to XMODEM that added the ability to transmit a file's name, size, and timestamp  in Block 0.     It had some extral features....    in practice most YMODEM implementations just turn out to be  XMODEM with 1K blocks and CRC.  

YMODEM came to have a problem with many incompatible implementations calling themselves the same name -- quite a mess really.

ZMODEM provided a significant performance improvement, a stronger error detection code,
transfer restarts,


ZMODEM basically obsoleted the other two protocols, for BBS applications.

Of course   thanks to the internet,  PPP, TCP/IP,  HTTP,   The world wide web took over,
making  ZMODEM the last of its legacy, so to speak.

Serial file transfer protocols that came after, such as ZMODEM-90,  Cmodem, and Smodem,
were not widely implemented, even though they provide better performance, and are basically superior.

They are not recognized  by common terminal emulator programs, hence their unavailability for system rescue type operations.




Adam DIT Solutions Developer

Author

Commented:
I have not had the opportunity to try this option, but based on the information I feel it will work and therefore I chose this solution.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial