Happy holidays everyone! I decided to write up this blog since it sounds like a very simple job – we all learned this back in CCNA right? How to upgrade the IOS image. Simple.
Well of course as the real world turns out, it is sometimes not that simple. Especially when you got a maintenance window open and rebooting the device a few times makes you look funny especially if you didn’t put your monitoring system into maintenance mode for the device!
Funny enough, I looked around Cisco’s site for a good practice on upgrading the particular 4848E and didn’t find any. Thus’ here we are.
NOTE: Ended up finding it but it was dug deep in the release notes
Before we start here’s two commands we want to briefly go over before we dive into the config
1. #sh bootvar
This command is great to know. This command tells you which IOS the switch will boot off of when it reboots. Notice you’ll also have a few other images at the end of this so as in with everything IT – redundancy, redundancy, redundancy. Especially when upgrading an IOS.
Another thing to note is what the config register is. Most switches will have by default 0×2102 which means “normal bootup”. You might also remember from CCNA labs when trying to do a password recovery we use 0×2142.
For more info on different boot codes check out Cisco’s site.
2. #Sh run | I boot
This command is helpful to zoom in just onto the piece we’re looking for. Here we’re seeing two entries – one pointing to one image 152-1.E1.bin and the 2nd one – SG1.bin
Magic words again is “redundancy, redundancy, redundancy”. Best practice is to have at least two images in here so if whatever reason one fails the other takes over. Last thing you wanna see on a production switch is “rommon>”
Funny thing I noticed with these commands is bootflash was never part of the “?” help. The IOS will accept it – apparently theres no different between flash and bootflash.
Alrite now let’s dive into the config.
First, TFTP/HTTP/SCP or whatever you do to get the new image onto the flash. For info on using TFTP and VRFs hit this link for another blog post on it.
Once you got the image on there – we do what we learned back in CCNA.
(config)#boot system flash: cat4500e-entservicesk9-mz.152-1.E1.bin
So we’re done right? Just wr mem and reload right? No sir! I did a few reboots of this guy and it STILL wouldn’t boot from the right image. What gives?
Turns out the bootvar had the wrong order – it had the old image set as the first entry in the bootvar list. Think of it as waiting in line at the movies. Just because you’re the last person in line doesn’t mean you’re the first person who gets called to the booth to buy your ticket (BTW hit up BJs for some discounted movie tickets, save a few bucks on 3D movies!!!)
In order to get the IOS to be the first person in line – you first need to remove the old entries from the bootvar list. Do this using the no cmd.
So after running the #sh bootvar and I want to remove some items from the list – its usually easier to blow out the bootvar list and start from scratch. Run the #sh run | I boot cmd and just do a “no” for everything in there. Once its empty now you add FIRST in the list which IOS you want the image to boot off of.
Now here’s another important thing to remember – you need to “wr mem” for the list to update. You can type all you want but nothing changes in the bootvar list until you do a wr mem.
Once you got the right order of IOS – go ahead and reboot and your set!