cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15673
Views
5
Helpful
11
Replies

Can't copy IOS to a TFTP server

dshinnick
Level 1
Level 1

Hey gang-

Trying to copy the IOS from a 2950 switch to a TFTP server before upgrading the IOS. The switch can ping the TFTP server, I'm in privileged mode, I've done this many times on routers with no problems. I know that I'm typing the file name correctly, case-sensitive and all. It keeps complaining that it can't find a file by that name. I've tried it about 10 times with different variations; same results. Any thoughts?

Thanks

dave

(scroll down)

(I've tried it with and without the "/" after "flash")

Switch#copy flash:/c2950-i6q412-mz.121-13.EA1.bin tftp

Address or name of remote host []? 192.168.50.50

Destination filename [c2950-i6q412-mz.121-13.EA1.bin]?

%Error opening flash:/c2950-i6q412-mz.121-13.EA1.bin (No such file or directory

From a "show version":

Switch uptime is 7 minutes

System returned to ROM by power-on

System image file is "flash:/c2950-i6q4l2-mz.121-13.EA1.bin"

1 Accepted Solution

Accepted Solutions

Hello,

Looks like it's an actual bin file but just for kicks can you try the following:

copy flash:c2950-i6q4l2-mz.121-13.EA1.bin tftp

if it continues to fail try the following, but I am confident the aboe will work, show us the actual command by capturing what you did:

dir flash:c2950-i6q4l2-mz.121-13.EA1.bin

Does it take you or give you an output? I am thinking it's a directory and the actual IOS is in that directory.

View solution in original post

11 Replies 11

Roberto Salazar
Level 8
Level 8

Hello,

Make sure that the file c2950-i6q412-mz.121-13.EA1.bin is not within the c2950-i6q412-mz.121-13.EA1 directory. Maybe you can post output of the dir flash:?

Please rate helpful posts.

manoj.kv
Level 1
Level 1

Hi,

Remove the .bin from the file name. That will work.

Hope this helps.

Regards

Manoj

Still mystified!

I tried to copy the IOS without the ".bin" extension; same result (file not found). I WAS able to copy the startup-config file with no problems. Here's the output:

Switch#copy start tftp:

Address or name of remote host []? 192.168.50.50

Destination filename [switch-confg]?

!!

1926 bytes copied in 0.044 secs (43773 bytes/sec)

Switch#dir flash:

Directory of flash:/

2 -rwx 2888547 Mar 01 1993 00:03:21 c2950-i6q4l2-mz.121-13.EA1.bin

3 -rwx 269 Jan 01 1970 00:01:29 env_vars

4 -rwx 1650 Mar 01 1993 01:22:08 starup-config

5 -rwx 736 Mar 01 1993 00:02:29 vlan.dat

7 drwx 832 Mar 01 1993 00:04:18 html

21 -rwx 109 Mar 01 1993 00:04:20 info

22 -rwx 109 Mar 01 1993 00:04:20 info.ver

23 -rwx 1926 Mar 01 1993 00:03:33 config.text

24 -rwx 5 Mar 01 1993 00:03:33 private-config.text

7741440 bytes total (2865664 bytes free)

Hello,

Looks like it's an actual bin file but just for kicks can you try the following:

copy flash:c2950-i6q4l2-mz.121-13.EA1.bin tftp

if it continues to fail try the following, but I am confident the aboe will work, show us the actual command by capturing what you did:

dir flash:c2950-i6q4l2-mz.121-13.EA1.bin

Does it take you or give you an output? I am thinking it's a directory and the actual IOS is in that directory.

Man, you got it! It was a lower-case "L" in the file name, instead of a "1". That is SUCH an obvious mistake, but I must have checked the name 15 times and never caught it. Check it out! The character after the "4" is what I missed. Thanks much....

copy flash:c2950-i6q412-mz.121-13.EA1.bin tftp:

copy flash:c2950-i6q4l2-mz.121-13.EA1.bin tftp:

Dave

Thats why you do a dir flash: and then copy and paste the name out of there . :-)

Fernando_Meza
Level 7
Level 7

Can you copy any of the other ones i.e

copy flash:config.txt tftp

if you can .. then it is definetely a mistake when you type in the filename.

sean
Level 3
Level 3

Try the longer step by step way of

copy flash: tftp:

then give it the ip of the server and the full image name. Hope this helps.

wang19841229
Level 1
Level 1

copy tftp: flash:

import tftp ip address and file names

NOTE file name must is *.bin

I am chinese so my English is not good!

rusty
Level 1
Level 1

I have not seen it mentioned, but one of the possible causes for the error is that the file does not exist on the destination tftp server. One of the strange security measures taken by tftp, since there is no login required, is that a file to be updated has to already exist, even if it doesn't contain any actual data.

How you go about doing this will depend upon the OS your tftp server is on, but under most unix implementations, bring up a shell, change directory to the appropriate tftp folder, (sometimes /boot, sometimes /lib/tftpdir) and 'touch' the file you are attempting to upload. In this case 'touch c2950-i6q412-mz.121-13.EA1.bin'. You will then have to change ownership to match that needed by the tftpd server (should look like the ownership for other files in the directory)

Under windows, check the instructions for your tftp server software, but you can probably open a command shell change to the appropriate dirctory, then 'echo > c2950-i6q412-mz.121-13.EA1.bin' and you should be ready to go.

One other thing to try is using two '/' characters in the command, so 'copy flash://c2950-i6q412-mz.121-13.EA1.bin tftp' would be the command to use.

Hope this helps,

-Rusty

Rusty,

I've seen this too, but it's usually on Linux/Unix/BSD machines running a TFTP daemon, where the default permissions are read only.

The Solar Winds TFTP server does NOT have to have a pre-existing file to write to - I've used it many many times, and it works very nicely. And the price is right, too!

http://www.solarwinds.net/Download-Tools.htm

John

Review Cisco Networking for a $25 gift card