Delete Startup Config

Answered Question
Apr 30th, 2009

Hello,

Just need help erasing the entire startup config on a switch running s72033-ipservicesk9-mz.122-18.SXF5.bin

I used write erase, it didn't work.

Please help

Correct Answer by Edison Ortiz about 7 years 9 months ago

Are you replying 'Yes', when prompted to save the configuration before rebooting - after the 'write erase' command?

If so, you are copying the running-config (which has the current configuration) back to the startup-config. In other words, you are undoing the 'write erase' process.

__

Edison.

Correct Answer by John Blakley about 7 years 9 months ago

Ah. Don't write mem after "clear start". You're rewriting the startup file when you do that.

Do clear start, reboot. No write mem. =)

HTH,

John

Correct Answer by lamav about 7 years 9 months ago

Hi:

Switch#dir all-files

Directory of flash:/

2 -rwx 365 Mar 1 1993 00:24:39 +00:00 system_env_vars

3 -rwx 7465382 Mar 1 1993 00:23:53 +00:00 c3550-ipservicesk9-mz.122-35.SE5.bin

4 -rwx 24 Mar 1 1993 08:16:38 +00:00 private-config.text

5 -rwx 0 Mar 1 1993 00:24:39 +00:00 env_vars

6 -rwx 4300443 Mar 1 1993 00:43:16 +00:00 c3550-i5q3l2-mz.121-22.EA10b.bin

9 -rwx 5 Mar 1 1993 08:16:38 +00:00 config.text

15998976 bytes total (4230144 bytes free)

Directory of zflash:/

2 -rwx 365 Mar 1 1993 00:24:39 +00:00 system_env_vars

3 -rwx 7465382 Mar 1 1993 00:23:53 +00:00 c3550-ipservicesk9-mz.122-35.SE5.bin

4 -rwx 24 Mar 1 1993 08:16:38 +00:00 private-config.text

5 -rwx 0 Mar 1 1993 00:24:39 +00:00 env_vars

6 -rwx 4300443 Mar 1 1993 00:43:16 +00:00 c3550-i5q3l2-mz.121-22.EA10b.bin

9 -rwx 5 Mar 1 1993 08:16:38 +00:00 config.text

15998976 bytes total (4230144 bytes free)

Directory of system:/

3 dr-x 0 memory

1 -rw- 2120 running-config

2 dr-x 0 vfiles

No space information available

Directory of nvram:/

382 -rw- 5 startup-config

383 ---- 24 private-config

393216 bytes total (393135 bytes free)

Switch#

Switch#del nvram:startup-config

Delete filename [startup-config]?

Delete nvram:startup-config? [confirm]

Switch#

HTH

Victor

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
anjery1234 Thu, 04/30/2009 - 09:14

I did erase start.

The system took the command, i write mem, i reloaded; startup config still there.

Correct Answer
John Blakley Thu, 04/30/2009 - 09:16

Ah. Don't write mem after "clear start". You're rewriting the startup file when you do that.

Do clear start, reboot. No write mem. =)

HTH,

John

anjery1234 Thu, 04/30/2009 - 09:27

Thanks a lot John. You saved me. worked perfectly.

All config gone except vlan config.

200 RM_VIP_10.70.63.0/24 active

201 LDAP_VIP_10.66.132.0/24 active

John Blakley Thu, 04/30/2009 - 09:29

Great! If you want the vlans deleted, you'll need to delete the vlan.dat file in flash:

Switch# del flash:vlan.dat

Then reload the switch and your vlans will be gone also.

HTH,

John

John Blakley Thu, 04/30/2009 - 08:28

Write erase will clear out nvram. Since you said it's a switch, what are you trying to clear? If you do a "dir nvram:?" do you see a "nvram:startup-config" listed?

HTH,

John

Correct Answer
lamav Thu, 04/30/2009 - 08:59

Hi:

Switch#dir all-files

Directory of flash:/

2 -rwx 365 Mar 1 1993 00:24:39 +00:00 system_env_vars

3 -rwx 7465382 Mar 1 1993 00:23:53 +00:00 c3550-ipservicesk9-mz.122-35.SE5.bin

4 -rwx 24 Mar 1 1993 08:16:38 +00:00 private-config.text

5 -rwx 0 Mar 1 1993 00:24:39 +00:00 env_vars

6 -rwx 4300443 Mar 1 1993 00:43:16 +00:00 c3550-i5q3l2-mz.121-22.EA10b.bin

9 -rwx 5 Mar 1 1993 08:16:38 +00:00 config.text

15998976 bytes total (4230144 bytes free)

Directory of zflash:/

2 -rwx 365 Mar 1 1993 00:24:39 +00:00 system_env_vars

3 -rwx 7465382 Mar 1 1993 00:23:53 +00:00 c3550-ipservicesk9-mz.122-35.SE5.bin

4 -rwx 24 Mar 1 1993 08:16:38 +00:00 private-config.text

5 -rwx 0 Mar 1 1993 00:24:39 +00:00 env_vars

6 -rwx 4300443 Mar 1 1993 00:43:16 +00:00 c3550-i5q3l2-mz.121-22.EA10b.bin

9 -rwx 5 Mar 1 1993 08:16:38 +00:00 config.text

15998976 bytes total (4230144 bytes free)

Directory of system:/

3 dr-x 0 memory

1 -rw- 2120 running-config

2 dr-x 0 vfiles

No space information available

Directory of nvram:/

382 -rw- 5 startup-config

383 ---- 24 private-config

393216 bytes total (393135 bytes free)

Switch#

Switch#del nvram:startup-config

Delete filename [startup-config]?

Delete nvram:startup-config? [confirm]

Switch#

HTH

Victor

anjery1234 Thu, 04/30/2009 - 09:41

This worked fine.

My mistake was the fact that after del nvram:startup-config, i was doing wr mem again.

anjery1234 Thu, 04/30/2009 - 09:17

John,

This is what is listed

Directory of nvram:/

1918 -rw- 19750 startup-config

1919 ---- 24 private-config

1920 -rw- 19750 underlying-config

1 ---- 4 rf_cold_starts

2 ---- 36 persistent-data

3 -rw- 0 ifIndex-table

John Blakley Thu, 04/30/2009 - 09:19

Do this:

Switch#wr erase

Hit enter to confirm. Reboot. The switch should come up and ask if you want to enter the initial configuration mode. You're ALWAYS going to have a startup file, it's just cleared to defaults when you erase it.

HTH,

John

anjery1234 Thu, 04/30/2009 - 09:15

didn't work.

running sup720 with s72033-ipservicesk9-mz.122-18.SXF5.bin

Correct Answer
Edison Ortiz Thu, 04/30/2009 - 09:23

Are you replying 'Yes', when prompted to save the configuration before rebooting - after the 'write erase' command?

If so, you are copying the running-config (which has the current configuration) back to the startup-config. In other words, you are undoing the 'write erase' process.

__

Edison.

anjery1234 Thu, 04/30/2009 - 09:30

Edison,

You saved me.

i reloaded without the wr m.

worked 100%.

All config is gone except vlan info

lamav Thu, 04/30/2009 - 09:38

Hi:

Didnt the solution I gave you work?

Im curious...

Thanks

Actions

This Discussion