Router Firmware Upload From Mac Via Xmodem

I had a switch that “lost” it’s operating system and was stuck in a reboot loop. Long story short is I needed to upload the OS via a direct serial connection to fix it. I didn’t have a Windows machine available, so I used my Mac and a Keyspan USA-19 (USB -> DB9) thingie (heh). This is mostly a note for myself in case I need to ever do it again, and I forget.

Things that did not work…

  • ZTerm let me get to the console just fine, but uploading the firmware with XModem failed for some reason (and you only found out it failed after a 3.5 hour upload time).
  • Keyspan device on Windows via Parallels (from all the Googling I did, apparently it’s just an known issue with that piece of hardware and Parallels and the drivers will not recognize it).
  • Virtual serial port in Windows/Parallels via a app called SerialClient (it was very difficult to find this app since the site that made it doesn’t exist anymore… people running Parallels said this worked for them, but it was many years ago… so maybe it was an older version of Mac OS X. Either way, I couldn’t get the app to “connect”.).

What DID work (thank God because I was running out of options)…

  1. Download/compile/install lrzsz via ./configure;make;make install.
  2. From Terminal: screen /dev/tty.Keyserial1 57600
  3. Hit CONTROL+A
  4. Type: :exec !! lsx -b -X ~/firmware_image.ros

It was infinitely faster than ZTerm (about 15 minutes vs. 3.5 hours), but more importantly it actually WORKED.

7 thoughts on “Router Firmware Upload From Mac Via Xmodem”

    1. No, wouldn’t need 1Gbps for that. The forum is a very small part of what uses our resources and everything combined doesn’t take that much.

      And yes… if you properly tune the servers they could handle 60,000+ concurrent vBulletin users without any issues.

  1. ok so it could handle 60,000+ concurrent vBulletin users without any issues.

    does it need 1 gbps to handle 60,000+ concurrent vBulletin users without any issues?

  2. For anyone that is confused; the ctrl+A then : is how you enter a command while in Screen.

    mv c3750-ipbasek9-mz.122-55.SE12 2.bin ios.bin (for less work)
    mkdir cisco
    mv ios.bin cisco
    cd cisco
    screen /dev/tty.USBDEVICE
    switch: copy xmodem: flash:ios.bin
    ctrl+A and type :exec !! lsx -b -X ios.bin

    Wait about 20 minutes and it will finish, rename on IOS and you’re done!

Leave a Reply

Your email address will not be published. Required fields are marked *