"env_vars" file on flash - How important?

Unanswered Question
Aug 19th, 2009
User Badges:

At some point on a 2950-48 switch I have the "env_vars" file was erased. I'm wondering how important to the system it is to have this file. I know the BAUD and BOOT commands are valid for certain tasks but what about MAC_ADDRESS and the SERIAL_NUMBER and all those? Are they just fluff? If I do need them on there is there a command to restore them from the switch ROM?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Peter Paluch Wed, 08/19/2009 - 10:04
User Badges:
  • Cisco Employee,

Hello,


My personal experience is that if this file is erased, the IOS will recreate it as needed and no damage is done to the switch. A guide for password recovery on Aironet devices even suggests deleting that file when performing the password recovery. So, I would not be concerned too much about it.


Still, it is good to know which settings are stored in that file and to reenter them in the configuration mode if some of them are necessary for your switch to boot up successfully. The list of individual environment variables for the 2950 switch can be found here:


http://www.cisco.com/en/US/partner/docs/switches/lan/catalyst2950/software/release/12.1_22_ea11x/configuration/guide/swipaddr.html#wp1183705


http://www.cisco.com/en/US/partner/docs/switches/lan/catalyst2950/software/release/12.1_22_ea11x/command/reference/bootldr.html#wp1004653


Best regards,

Peter


Lucien Avramov Wed, 08/19/2009 - 10:05
User Badges:
  • Red, 2250 points or more

The env_vars is the boot path.


You can just do the following to recover.


conf t

boot sys flash:

end

wr


This will restore it. Below is an example.



W2S-1.3-c2950#dir

Directory of flash:/


2 -rwx 109 Mar 13 1993 13:38:41 info

163 -rwx 994 Mar 01 1993 00:01:26 old

3 -rwx 2888826 Mar 06 1993 07:17:44 c2950-i6q4l2-mz.121-13.EA1b.bin

165 -rwx 916 Apr 10 1993 01:33:19 vlan.dat

6 -rwx 2774747 Mar 01 1993 00:57:12 c2950-i6q4l2-mz.121-12c.EA1

4 -rwx 39 Mar 01 1993 00:04:47 env_vars

169 -rwx 994 Mar 01 1993 00:00:36 old2

5 -rwx 5 Mar 01 1993 00:04:51 private-config.text

180 -rwx 109 Mar 13 1993 13:42:57 info.ver

8 -rwx 1905 Mar 01 1993 00:04:51 config.text


7741440 bytes total (2068480 bytes free)

W2S-1.3-c2950#del flash:env_vars

Delete filename [env_vars]?

Delete flash:env_vars? [confirm]

W2S-1.3-c2950#dir

Directory of flash:/


2 -rwx 109 Mar 13 1993 13:38:41 info

163 -rwx 994 Mar 01 1993 00:01:26 old

3 -rwx 2888826 Mar 06 1993 07:17:44 c2950-i6q4l2-mz.121-13.EA1b.bin

165 -rwx 916 Apr 10 1993 01:33:19 vlan.dat

6 -rwx 2774747 Mar 01 1993 00:57:12 c2950-i6q4l2-mz.121-12c.EA1

169 -rwx 994 Mar 01 1993 00:00:36 old2

5 -rwx 5 Mar 01 1993 00:04:51 private-config.text

180 -rwx 109 Mar 13 1993 13:42:57 info.ver

8 -rwx 1905 Mar 01 1993 00:04:51 config.text


7741440 bytes total (2068992 bytes free)

W2S-1.3-c2950#conf t

Enter configuration commands, one per line. End with CNTL/Z.

W2S-1.3-c2950(config)#boot sys flash:c2950-i6q4l2-mz.121-12c.EA1

W2S-1.3-c2950(config)#end

W2S-1.3-c2950#wr

Building configuration...

[OK]

W2S-1.3-c2950#

00:06:03: %SYS-5-CONFIG_I: Configured from console by console

W2S-1.3-c2950#

W2S-1.3-c2950#dir

Directory of flash:/


2 -rwx 109 Mar 13 1993 13:38:41 info

163 -rwx 994 Mar 01 1993 00:01:26 old

3 -rwx 2888826 Mar 06 1993 07:17:44 c2950-i6q4l2-mz.121-13.EA1b.bin

165 -rwx 916 Apr 10 1993 01:33:19 vlan.dat

6 -rwx 2774747 Mar 01 1993 00:57:12 c2950-i6q4l2-mz.121-12c.EA1

4 -rwx 39 Mar 01 1993 00:06:01 env_vars

169 -rwx 994 Mar 01 1993 00:00:36 old2

7 -rwx 1905 Mar 01 1993 00:06:05 config.text

180 -rwx 109 Mar 13 1993 13:42:57 info.ver

8 -rwx 5 Mar 01 1993 00:06:05 private-config.text


7741440 bytes total (2068480 bytes free)

W2S-1.3-c2950#


This should resolve your issue.

jbrenesj Wed, 08/19/2009 - 10:34
User Badges:
  • Silver, 250 points or more

It is not necessary to rebuild the env_vars file. It only has a copy of the system specific information that is held in other flash sectors as well. The only information that you have really lost is any setting done by "boot" configuration command. That can be reset by issuing the appropriate boot command.

Actions

This Discussion