Deleting flash.dat from 4507 returns error

Answered Question
Aug 25th, 2009

Can someone clarify why the below does not work on my 4507? I want to get rid of the vlan config.

Switch#delete vlan.dat

Delete filename [vlan.dat]?

Delete bootflash:vlan.dat? [confirm]

%Error deleting bootflash:vlan.dat ()

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Peter Paluch Tue, 08/25/2009 - 09:39

Hello,

Can you confirm that the vlan.dat is really stored in the bootflash: filesystem? On lower series switches, it is in flash:. Does the "dir bootflash:" show that file? Also, if there are any other filesystems available (try "dir ?") that show that file as present there, try to delete it from there, for example,

delete flash:vlan.dat

Best regards,

Peter

news2010a Tue, 08/25/2009 - 10:50

Here is the output:

Switch#dir bootflash

%Error opening bootflash:/bootflash ()

Switch#dir

Directory of bootflash:/

2 -rw- 15342164 Nov 26 2007 22:43:42 +00:00 cat4500-entservicesk9-mz.122-40.SG.bin

61341696 bytes total (36696896 bytes free)

Switch#

glen.grant Tue, 08/25/2009 - 10:03

Believe the vlan.dat is located in "cat4000_flash: " . I will be intrested to see if it will let you delete it or not. For some reason it seems i tried deleting it on a 4500 and it won't let you do it , works on the smaller nonchassis based switches.

news2010a Tue, 08/25/2009 - 10:56

I followed this article Edison sent, but it is strange it complains about permission. I am on exec mode, switch config is brand new after 'write erase'. Any thoughts?

Switch#dir cat4000_flash:

Directory of cat4000_flash:/

1 -rw- 676 vlan.dat

524284 bytes total (523608 bytes free)

Switch#del cat4000_flash:vlan.dat

Delete filename [vlan.dat]?

Delete cat4000_flash:vlan.dat? [confirm]

%Error deleting cat4000_flash:vlan.dat (Permission denied)

Switch#

Edison Ortiz Tue, 08/25/2009 - 11:01

You are using the 'delete' command while the link tells you to use 'erase'. Hmm...

Try again :)

news2010a Tue, 08/25/2009 - 11:22

Actually I tried the 'erase', but it did not accept it, so I thought 'del' was the only option:

switch#erase cat4000_flash:vlan.dat

^

% Invalid input detected at '^' marker.

Edison Ortiz Tue, 08/25/2009 - 11:24

Try the command

erase cat4000_flash: without the vlan.dat in it.

__

Edison.

news2010a Tue, 08/25/2009 - 11:32

I did it. I think Cisco could updated that documentation, something is wrong:

I reloaded the switch, now it went directly onto rommon 1>. I if I do a

rommon 3>dir

I see images listed there as below. The one deleted apepars as 'delete' but I hope I should be able to boot using the other one...

ommon 5 >dir bootflash:

File size Checksum File name

--------------------------------------------------

9044204 bytes (0x8a00ec) 0x574bb11d cat4000-i9s-mz.121-19.EW1.bin(delete d)

15342164 bytes (0xea1a54) 0x732c64b3 cat4500-entservicesk9-mz.122-40.SG.b in

258048 bytes (0x3f000) 0xffffffff cat4500-entservicesk9-mz.122-40.SG.b in(invalid)

Total space = 61341696 bytes, Available = 36696896 bytes

Edison Ortiz Tue, 08/25/2009 - 11:35

Well, you must've typed another command since the command I illustrated does not delete the flash:

type

boot cat4500-entservicesk9-mz.122-40.SG.bin

Edison Ortiz Tue, 08/25/2009 - 11:38

Hmm...

Do you really have a space on the file name?

cat4500-entservicesk9-mz.122-40.SG.b<>in

try typing

boot cat4500-entservicesk9-mz.122-40.SG.b

if it works, make sure to rename that file to a valid name.

news2010a Tue, 08/25/2009 - 11:50

I copied the file exactly as shown on the ouput, but then I got the error message below.

I am positive I did the right command;I got the confirmation stating that "VLan database was deleted". It is very strange this happened.

rommon 7 >dir bootflash:

File size Checksum File name

--------------------------------------------------

9044204 bytes (0x8a00ec) 0x574bb11d cat4000-i9s-mz.121-19.EW1.bin(deleted)

15342164 bytes (0xea1a54) 0x732c64b3 cat4500-entservicesk9-mz.122-40.SG.bin

258048 bytes (0x3f000) 0xffffffff cat4500-entservicesk9-mz.122-40.SG.bin(invalid)

Total space = 61341696 bytes, Available = 36696896 bytes

rommon 8 >boot cat4500-entservicesk9-mz.122-40.SG.bin

Invalid filename cat4500-entservicesk9-mz.122-40.SG.bin. It must begin with device name.

Type 'boot -help' for details.

news2010a Wed, 08/26/2009 - 10:30

Thanks. From there I set the bootvar and it was OK.

Later I will try to to do the vlan.dat flash erase again and see if I can reproduce the behavior.

Actions

This Discussion