I decided to upgrade my IT-type skills a little by learning about Cisco routers, and a friend of mine lent me a C1710 that was sitting around idle.
I got it up and running, followed an online tutorial, and decided to save the configuration work I'd done. So, I typed:
copy running-config start-config
and told it to go ahead an erase the flash when it asked.
This was a Really Bad MistakeTM.
It turns out that "flash" is where Cisco stores its boot software. The configuration is actually stored in "nvram", in a file called startup-config.
Nothing went immediately wrong with the router, so I had no clue I'd screwed up. Until a few days later, when the cat jumped up on the counter and flipped the switch on a power strip. That's when I discovered that I'd erased the IOS, and the only functioning software in the box is the bootloader. And the nightmare began.
My friend doesn't have a backup copy of the IOS to reflash the box, and Cisco won't let me download an official replacement unless I buy a service contract. Even if I could afford one, I'm not sure they'd sell it to me, since the C1710 is long since discontinued.
I found a couple of what are alleged to be copies of IOS for the C1710 on some untrusted ftp sites, but I'm really hesitant to load unverified binaries into a box that has low-level access to my LAN: I have visions of the router trying to recruit my PCs (a couple of which actually do run Windoze sometimes) into a botnet.
So, is there some way to either un-hose the flash file system, or to verify that the IOS files aren't malware (given that Cisco won't even give me access to the release notes that might contain an MD5 sum)? A google search didn't seem to return much other than Cisco user docs on how to upload the files I can't get from them :(
Welcome to the used Cisco market. Consider yourself lucky they'll offer you a service contract on old equipment. It used to be impossible to get one unless you bought new equipment and kept proof of ownership if you let it lapse. It's likely the equipment specific IOS is available from them, but then you pay :o; my ASA-5505 started out at $100 and is $75/year. But then I use it for work...
Or, you could buy a second working one off e-bay and follow these instructions http://articles.techrepublic.com.com/5100-10878_11-5623025.html
I can get you a checksum for an imagename and version, I think. (c1700-i-m 12.0(3)T)
I'm not aware of any maliciously modified IOS images floating around (but then I'm not aware of pirated normal images floating around either.)
Your mistake was that you should have typed:
copy running-config startup-config
"startup-config" is a magic filename that gets stored off in nvram rather than flash. "start-config" is just a random filename that was stored on the default device (flash.)
I decided to take a chance on a 12.2 image that's about the same rev as the one I destroyed, and which seemed to be a real copy. So far, it appears to be legit. I'm probably missing a few fixes, but this is just a "class project", so it's no biggie.
I also discovered, from reading the experiences of others that made the same mistake, that "startup-config" isn't actually a file name: it's a keyword parameter, subject to the same "minimum match" rules as other parameters. You can do a save without the risk of shooting yourself in the, um, flash by just typing:
copy run start
The command interpreter will then feed you the right default filename, and do what sensible people >:( would expect.
Heh, the intuitive nature of IOS ;D and the real secret as to why Cisco router propellerheads used to make a lot of money. Not because what you're doing is complex, but because the command line can be quite obtuse. Try working with Tadiran phone systems sometime "spew emoticon needed". Glad you got it working...
There is always the ancient form of the command: "WRITE MEMORY"
A filesystem is not always the best abstraction for every function :-(