Transfering Files over a Serial Port without xmode/ymodem/zmodem Software
When booting a Debian install image up remotely, you might find you've been broadcom'ed. This is the phrase used to describe the fustration you feel when you discover there is a sodding Broadcom chipset in the system you are trying to set up. Although you have serial connectivity, you will have no network connectivity, so how do we go about getting a copy of the Broadcom firmware onto the box. Alas the Debian install initrd is very small, no base64, [xyz]modem, awk, xxd, etc. So, what to do, on the workstation end:
$ wget (firmware deb from http://packages.debian.org/search?keywords=firmware-bnx2)
$ dpkg -x firmware-bnx2_0.28_all.deb
$ # we have to use pv (http://www.ivarch.com/programs/pv.shtml) to avoid buffer overruns on the serial console server (http://www.opengear.com/products_console_servers.html) we use
$ ( echo "cat <<'EOF' > firmware.tar.gz.hex"; tar -C firmware-bnx2 c lib/firmware | gzip -9 -c | xxd | cut -d' ' -f 2-9; echo EOF ) | pv -L 2k | ssh username:port10@opengear.console.server.example.com
On the serial console, log back in and use:
# cat firmware.tar.gz.hex | tr -d '[ \n]' | echo -n -e $(sed 's/../\\x&/g') | gunzip -c | tar vx
lib/firmware/
lib/firmware/bnx2/
lib/firmware/bnx2/bnx2-rv2p-06-6.0.15.fw
lib/firmware/bnx2/bnx2-rv2p-06-5.0.0.j3.fw
lib/firmware/bnx2/bnx2-mips-09-6.0.17.fw
lib/firmware/bnx2/bnx2-rv2p-09-5.0.0.j3.fw
lib/firmware/bnx2/bnx2-rv2p-09-6.0.17.fw
lib/firmware/bnx2/bnx2-rv2p-09ax-5.0.0.j3.fw
lib/firmware/bnx2/bnx2-mips-06-6.0.15.fw
lib/firmware/bnx2/bnx2-mips-06-5.0.0.j3.fw
lib/firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw
lib/firmware/bnx2/bnx2-mips-09-5.0.0.j3.fw
lib/firmware/bnx2-06-4.0.5.fw
lib/firmware/bnx2-09-4.0.5.fw