воскресенье, 17 февраля 2013 г.

Using ROMmon to Recover startup-config from NVRAM


Восстановить startup-config из nvram через ROMmon.
We had a supervisor die in a core switch today. (Alas! He served us well…) Incidentally, an unrelated issue with CiscoWorks meant that I did not have the fresh, readily-available backup config that I have come to take, all too much, for granted. A quick look through my console logs (I keep a local log of everything I ever do. Remind me to post on that later.) revealed that my last ‘show tech’ for this particular device was back in December of last year. It would not have been a huge deal to start there and make a few updates, but I really really really like to be confident I have the most fresh config possible. I would hate to miss some small detail and have an issue down the road attributed to human error. So… why not pull the config out of NVRAM from the half-baked supervisor?
The answer would be because you can’t. At least that was the response from the TAC Engineer when I asked. Of course, I didn’t believe him. ;) The real challenge was that, in this particular case, the supervisor would no longer boot. It would crash and break back into ROMmon before there was an opportunity to enter any commands in IOS and, apparently, there is no (easy) way to access the NVRAM file system from within ROMmon. The ‘dev’ command will show what file systems are available.
rommon 10 > dev
Devices in device table:
        id  name
      net:  network                  
 bootdisk:  boot disk                  (device is file system capable)
    disk0:  PCMCIA Disk 0              (device is file system capable)
    disk1:  PCMCIA Disk 1              (device is file system capable)
    eprom:  eprom                      (device is file system capable)
   mkseg1:  main memory (kseg1)      
   mkseg0:  main memory (kseg0)      
   mkuseg:  main memory (kuseg)