Lessons · Network switches · which image it boots
Telling it which image to boot
`boot system flash:<image>` names the image the switch loads next time. Without it, it boots the first valid one it finds.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
It is the step people skip, and skipping it is why a switch comes back on the old version after a perfect upgrade, with nothing saying anything went wrong.
How to think about it
Copy, then boot system, then save, then reload. If any of those is missing the reload is a coin toss, and the coin is flipped when the plant is waiting.
Worked example
enableThe # prompt.
copy tftp://192.168.7.4/c2960-lanbasek9-mz.152-2.E9.bin flash:The new image is on the disk. Nothing about what boots has changed yet.
configure terminalboot system is a configuration command.
boot system flash:c2960-lanbasek9-mz.152-2.E9.binNow the next reload loads that one.
endOut.
show running-configThe boot system line is near the top. If it is not there, the upgrade is not done.
write memorySaved, because the boot line lives in the configuration and a reload reads the SAVED one.
Your turn
Tell the switch to boot the new image.
boot flash:c2960-lanbasek9-mz.152-2.E9.bin
Console into a switch
The trap
Setting it and not saving. The reload reads the startup configuration, and an unsaved boot line is not in it, so the box boots the old image and the change you made is gone as well.