Recently I had to factory-reset a Juniper EX2200 switch for which the password got lost. No big deal one would assume: Connect the console cable to the switch, plug in a USB-to-serial adapter since neither my notebook nor my desktop come with a serial port anymore, reset the switch and press space when the boot messages scroll by…
… except they don’t. Which is funny, because the serial connection itself worked fine just a minute ago – I just had no way of logging in. Reset the switch again, nothing. Wait a couple minutes… and the switch is completely fired up, except I still don’t get any output on the serial port. Detach the USB adapter, hook it up again, press some keys and there’s the login. Try the Reset again, same thing happens. And so on…
Apparently, the only way I get output is to attach the serial line after the switch powered on. Well, ok then – connect the line the second after the switch got power. Apparently that’s to fast. Plug it in a couple seconds later, apparently that’s to slow since the switch is already booting the kernel and you’ll have to press space at the bootloader before that. Let’s try something in between… doesn’t work either, only gets garbage output and doesn’t accept my input, since apparently that’s not the right time either. Goddamn, WTF? How hard can it be to watch the switch boot? Strange thing is, I haven’t had any problems with that cheap-ass adapter and other devices so far.
An hour (and about a dozen or two resets) later I decided to fuck it and grab an old HP Server I have laying around for testing spare-hardware… it still has a serial port. Hook it up to a screen, keyboard, connect the serial line there and boot an OS from USB. Guess what? The Juniper bootloader shows up just fine, no matter what. It’s just my fucking retarded USB serial adapter thingy which craps out for some reason or another.
# press spacebar when prompted
loader> boot -s
root@switch01# set system root-authentication plain-text-password
# enter some password like juniper1
Reboot the system [y/n] y
Done. In about two minutes or so, if it wasn’t for my stupid serial adapter, which turned it into an two almost hour ordeal.