cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1226
Views
5
Helpful
4
Replies

Configure boot device without writing to memory

Comm4nd0
Level 1
Level 1

Hi all,

 

So i have an EEM script that downloads a config file and save it straight to nvram:startup-config. e.g

action 1.0 cli command "copy ftp://192.168.0.128/config.txt nvram:startup-config

I also in the same script download a the firmware for the device and install it. I want to be able to write the boot option 'boot system switch all flash:packages.conf' but if i do this and reload it's forgotten. If i write it to memory surly the config i have save to startup-config will be over written.

 

So is there a command that i can use to tell my device (3850) to use packages.conf as it's boot without touching the startup config?

 

many thanks.

4 Replies 4

brselzer
Cisco Employee
Cisco Employee

Hello,


Why not just add the command "boot system switch all flash:packages.conf" to your txt file that you download so that it is loaded in when you download the file?

 

Hope that helps!

-Bradley Selzer
CCIE# 60833

tried that, it doesn't work. my guess is the startup-config isn't read at that stage in the boot.

Hello,

 

Only other thing I can think of would be to set the boot statement, save your config, then copy in your startup config. Maybe it will preserve your boot statement. I am pretty sure there is no way to change your boot statement without saving your config. 

 

Hope that helps!

-Bradley Selzer
CCIE# 60833

thanks, i was afraid this might be the case. The thing is that although by default the switches are set to boot from packages.conf i wanted to re-enter the command just in case if ever gets changed by mistake.

What i've done is, i've made sure the switch is set to boot from packages.conf, in my EEM script i set the parameter and save it, and in the config that's copied from FTP and saved over startup-config also has the parameter. So it's the shotgun method but it's working for now.