Compile Raspberry Pi Kernel

update: 2015-02-10: Removed folder sync as was causing builds to fail

Decided to play about with the Raspberry Pi Kernel but setting up the toolchain for a cross compile was a bit of pain not to mention remembering to download everything.
So I put together a Vagrantfile that should auto do it.

Following Variables can be edited at the top of the Vagrantfile:
Read More

CentOS 7 and OpenVPN 2.3.5 (Routed)

Decided to setup a openvpn server on a new CentOS 7 box and it was not exactly straight forward so below are the steps required, this should be enough to get started

On a (minimal) centOS 7 box:

yum -y install gcc rpm-build vim openssl-devel lzo-devel pam-devel wget
wget http://swupdate.openvpn.org/community/releases/openvpn-2.3.5.tar.gz
rpmbuild -tb openvpn-2.3.5.tar.gz

if using a seperate server for as the VPN server:

scp ./RPMS/x86_64/openvpn-2.3.5-1.x86_64.rpm server:/tmp

Read More

Flashing eeprom during imaging via PXE

I had a requirement to flash the eeprom on a FTDI chip while dropping a clonezilla image onto the system which is done via a PXE server

The 1st thing we need to do is get ftdi_eeprom tools on the clonezilla image, we do this by setting up an ubuntu system (I used ubuntu 12.04)

apt-get install squashfs-tools unzip

wget -O Clonezilla-2.1.2-20_amd64.zip http://downloads.sourceforge.net/project/clonezilla/clonezilla_live_stable/2.1.2-20/clonezilla-live-2.1.2-20-amd64.zip?r=http%3A%2F%2Fclonezilla.org%2Fdownloads%2Fdownload.php%3Fbranch%3Dstable&ts=1373475093&use_mirror=heanet

mkdir clonezilla-src clonezilla-sqfs
cd  clonezilla-src
unzip ../Clonezilla-2.1.2-20_amd64.zip
cd ../clonezilla-sqfs
unsquashfs ../clonezilla-src/live/filesystem.squashfs
cd squashfs-root/root

wget http://ftp.de.debian.org/debian/pool/main/f/ftdi-eeprom/ftdi-eeprom_0.3-2_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/c/confuse/libconfuse0_2.7-4_amd64.deb
wget http://ftp.de.debian.org/debian/pool/main/c/confuse/libconfuse-common_2.7-4_all.deb

rm *.deb

chroot ~/clonezilla-sqfs/squashfs-root
cd root

dpkg -i libconfuse-common_2.7-4_all.deb
dpkg -i libconfuse0_2.7-4_amd64.deb
dpkg -i ftdi-eeprom_0.3-2_amd64.deb

cat > ./eeprom.conf <<@
vendor_id=0x0403
product_id=0x6001
manufacturer="ME"
product="XXXXX"
serial="FTABC123"
@

exit

cd ~/clonezilla-sqfs

mksquashfs squashfs-root filesystem.squashfs -comp xz -Xbcj x86 -b 1024k

Replace the Fields above with the values you want to use most important is the two _id fields as they tell ftdi_eeprom which device to attempt to flash, you can get these by running the command “lsusb” and identifying the device.

Copy the file “filesystem.squashfs” that has just been created and overwrite the one on the PXE server used to deploy the image. When you next PXE boot the target machines you will find ftdi_eeprom is available to use.

Now during the deployment run the command
ftdi_eeprom –flash-eeprom /root/eeprom.conf

Setting up a Cisco network for video developers Part 2

Introduction

Welcome to Part 2, this part will provide the background and current topology that is to be replaced, the real fun will start in Part 3. I know you are all impatient to get started configuring switches, routers and servers but I think that the design and the reasons behind the design are as important (if not more so) than the actual configuration. As always I know I am not perfect and all knowing so if from the background and the following tutorials you think I have missed something or could have done something better then please speak up, send me a message via the contact page or leave a comment.

Background

NINet has grown since the last series and now has a floor of approximately 40 developers developing video solutions. The current solution was put together in bits and pieces and is resulting in poor performance and frequent outages. It must be stressed that this is a development network and as such cannot be locked down developers need to be able to connected unmanged switches (much to my irritation) and connect devices at will.

Read More

Setting up a Cisco network for video developers Part 1

Introduction

This series of tutorials will be similar to my posts on a wireless setup, where I take a real world requirement of mine and fit it to a tutorial about NINet.org.

Summary

This series will take an existing flat topology with mixed switches running in L2 and convert it to a Cisco Switch Topology mixing L3 and L2. Then we’ll take a bit of step into the sysadmin side of things where we setup infrastructure servers to support the end users. At the time of this writing, in the real world, this network is up and running however the supporting infrastructure is a lower priority than other work items so it may take a while to filter through to here.

Read More

Deploy Centos 6 from VMWare Template

This is just a quick gotcha that I found ages ago then forgot about and then had to figure out again. Before you convert the VM to a template.

rm /etc/udev/rules.d/70-persistent-net.rules

sed -i ‘/HWADDR*/d’ /etc/sysconfig/network-scripts/ifcfg-eth0

sed -i ‘/UUID*/d’ /etc/sysconfig/network-scripts/ifcfg-eth0

 

Update:

This also applies to SLES 11 SP2 (use /etc/sysconfig/network/ifcfg-eth0)

 

 

Normalise video file names

Updated: 2013-03-04 – Fixed bug that prevented names containing 720p/1080p from being parsed properly.

This is a perl script to normalize video file names for TV series, it will run under windows or linux.

Note: I have tested this and do use it however I may have missed something or there may be a bug I have not encountered, I would advise backing up the files to be renamed before running the script and then verify that it has worked as expected. If so delete the backups if not please leave a comment detailing what has happened and I’ll try to fix it asap.

Disclaimer: I am not responsible if this causes WWIII or nukes your computer, use at your own risk.

Supported naming schemes

Name

  • Single
  • Double.1
  • Double 2
  • Double-3
  • Double_4

Season-Episode

CPUInfo

Small shell script that returns the details in /proc/cpuinfo in a more human readable and relevant way.

Sample output

Processor seems to be quite old guessing number.
#######################################
#           CPU Information           #
#######################################

CPU Architecture is: x86_64
CPU Manufacturer is: AMD
CPU Model is:  AMD Opteron(tm) Processor 252
CPU Speed is:  1800 1800MHz
Number of physical CPUs: 2
Number of cores per CPU: 1
Number of logical CPUs (cores & hyperthreading): 2
Hyperthreading enabled (Intel only): N/A

#######################################

Read More