cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
765
Views
3
Helpful
4
Replies

Cat 2960X-- "boot system" syntax...

I am concerned that the syntax for #boot system is incorrect, which may lead to a locked out failed switch. May you please confirm that this is correct?

2960X(config)#boot system flash:c2960x-universalk9-mz.152-7.E7.bin

2960X#sh boot
BOOT path-list : flash:c2960x-universalk9-mz.152-7.E7.bin  !! no "/" !!
Config file : flash:/config.text     !! "/" exists  !!
Private Config file : flash:/private-config.text  !! "/" exists  !!

Thank you.

2 Accepted Solutions

Accepted Solutions

Leo Laohoo
Hall of Fame
Hall of Fame

I have a better solution to this:  Why not use the tried-and-tested method of upgrading the IOS, "archive download-sw".  By default, the script will extract all the relevant files out from the TAR file and, as a bonus, correctly set the boot variable string.  

And, at the conclusion of the script, it will even perform a quick hash check of the BIN file just to make sure the BIN file is not corrupt. 

View solution in original post

"it does not matter / or without the same results."

I believe that's because with "/" you've explicitly identified the file is in the root directory, and without the "/", it assumes the file is in the root directory.

(Don't recall whether Cisco supports "." for current directly, but on a PC command line, "dir" and "dir ." provide the same results.  I.e. explicit vs. assumed/implicit.)

I also believe, the reason those file locations can be parsed, with or without that particular "/" is because if follows the ":".

Also in OP, "which may lead to a locked out failed switch.", BTW I recall Cisco's boot, when if cannot find a "good" IOS .bin, as specified by the bootvar, will use the first "good" .bin in the root directory; and if a "good" .bin is not found, device should boot into ROMMON.

View solution in original post

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

it does not matter / or without the same results.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

"it does not matter / or without the same results."

I believe that's because with "/" you've explicitly identified the file is in the root directory, and without the "/", it assumes the file is in the root directory.

(Don't recall whether Cisco supports "." for current directly, but on a PC command line, "dir" and "dir ." provide the same results.  I.e. explicit vs. assumed/implicit.)

I also believe, the reason those file locations can be parsed, with or without that particular "/" is because if follows the ":".

Also in OP, "which may lead to a locked out failed switch.", BTW I recall Cisco's boot, when if cannot find a "good" IOS .bin, as specified by the bootvar, will use the first "good" .bin in the root directory; and if a "good" .bin is not found, device should boot into ROMMON.

Leo Laohoo
Hall of Fame
Hall of Fame

I have a better solution to this:  Why not use the tried-and-tested method of upgrading the IOS, "archive download-sw".  By default, the script will extract all the relevant files out from the TAR file and, as a bonus, correctly set the boot variable string.  

And, at the conclusion of the script, it will even perform a quick hash check of the BIN file just to make sure the BIN file is not corrupt. 

"Why not use the tried-and-tested method of upgrading the IOS, "archive download-sw"."

Well copying a .bin to flash, and updating the bootvar (if needed - more on that shortly), is also a very tried-and-tested method of upgrading, although, it's very likely more error prone, and for many if not most situations, I completely endorse Leo's suggestion!

One example, when you would not, and perhaps could not, use this approach, is when, for some reason, you have multiple IOS images listed in the bootvar.  For instance, something like: BOOT path-list : usb:/c2960x-universalk9-mz.152-7.E7.bin;flash:/c2960x-universalk9-mz.152-7.E6.bin  (NB: my syntax might be incorrect, and I don't know if 2960X supports a bootable USB, or even has a USB port.)

Why do something like the foregoing?  Well, if you have a brand new IOS release, which you don't 100% certainly about, you often can talk someone through, pulling a USB stick, turn off power, wait 15 seconds, turn on power.  I.e. possibly resolving a new IOS version problem in a minute without needing admin access to device!

On some devices, I found, you didn't even need to provide the filename, as boot will use the first valid IOS image on a memory device, if one was present, otherwise, it would continue down the boot path.  E.g. BOOT path-list : usb:;flash:  (As promised, no need to update the boot path, but you do need to insure your IOS images are where you intend them to be.)

BTW. Found the foregoing very handy in the "lab", just insert/swap USB, CF-Card, and reload.

Review Cisco Networking for a $25 gift card