Monthly Archives: September 2015

scp the-config.cfg manager@theprocurveswitch:/cfg/startup-config

If you start dipping your toe into the waters of network automation with hp procurve switches and want to push the generated config via scp (or tftp) you have to make sure you have the correct “magic” in the first config line. You are fine if it matches the beginning of a show running-config output.


someone@somewhere:~/ANSIBLE/CFGS$ head -n3 sw-edv-0-12-sw1.txt
; J4899B Configuration Editor; Created on release #H.10.115

hostname "sw-edv-0-12-sw1"
someone@somewhere:~/ANSIBLE/CFGS$

This fact is discussed in a forum thread at hp.

The magic line is also there when one creates a backup of the running-config. Thankfully, you can push a startup-config to the switch that looks like a command file you would run after an erase startup-config.

Banana Pro Serviette [updated]

A serviette is a concept introduced by Sven Guckes that can be implemented on a Banana Pro. This is a short how to.

Get an operating system (bananian, Debian 8/Jessie) running

Download the latest image from bananian.org

Make sure to replace /dev/mmblk0 with the path to your SD-card.

unzip bananian-latest.zip
sudo chown "$USER.$USER" /dev/mmcblk0
cat bananian-1508.img > /dev/mmcblk0
# delete 2nd partition, recreate it to fill sd-card
printf 'd\n2\nn\np\n2\n\n\nw\n\n' | fdisk /dev/mmcblk0
# expand filesystem.
sudo chown "$USER.$USER" /dev/mmcblk0p2
e2fsck -f /dev/mmcblk0p2
resize2fs /dev/mmcblk0p2

Get the serviette running

Put the SD-card into the bananapro and power it up. Default password for root is pi. Change it ASAP.

passwd

Run bananian-config and set your “hardware configuration” to BananaPro and add ‘ap6210’ to /etc/modules as detailed in https://www.bananian.org/hardware.

Install git, fetch the repository and run the install script. One needs to uncomment the calls to the individual install functions at the end of the script prior to running it.

apt-get update
apt-get install git
mkdir src
cd src
git clone https://github.com/serviette/serviette.git
cd serviette
vi serviette.sh
bash serviette.sh

Please note the at the time of writing the official repository/install script would not work out of the box, a pull request is in progress. Meanwhile, one can use git clone https://github.com/chbw/serviette.git instead

Update notes: As I rerun the above I realized that I had to change vim to vi, sh to bash and add ‘ap6210’ to /etc/modules as well.