Difference between revisions of "Debian Remaster Netinstaller - Integrate Firmware bnx2x and Preseed"

From n0r1sk software solutions
Jump to: navigation, search
Line 1: Line 1:
 +
last edit {{REVISIONDAY2}}.{{REVISIONMONTH}}.{{REVISIONYEAR}} made by {{REVISIONUSER}}
 
==General==
 
==General==
 
We are using about eight Debian based OpenVZ hosts to run 150+ OpenVZ containers on it. At this time this containers are Ubuntu based, in the future we would like to use Debian Squeeze. The Hardware boxes are HP BL Blades 460c G6 and they have onbord Broadcom bnx2x network interface cards. To make life easier we have decided to use the Debian Netinstaller, a local repository cache (app-proxy-ng), our own repository with self made packages, Puppet for configuration file changes and of course Debian preseed.
 
We are using about eight Debian based OpenVZ hosts to run 150+ OpenVZ containers on it. At this time this containers are Ubuntu based, in the future we would like to use Debian Squeeze. The Hardware boxes are HP BL Blades 460c G6 and they have onbord Broadcom bnx2x network interface cards. To make life easier we have decided to use the Debian Netinstaller, a local repository cache (app-proxy-ng), our own repository with self made packages, Puppet for configuration file changes and of course Debian preseed.
Line 80: Line 81:
  
 
[[Category:General Documentation]]
 
[[Category:General Documentation]]
 
 
 
last edit {{REVISIONDAY2}}.{{REVISIONMONTH}}.{{REVISIONYEAR}} made by {{REVISIONUSER}}
 

Revision as of 09:20, 21 September 2010

last edit 21.09.2010 made by Mario

General

We are using about eight Debian based OpenVZ hosts to run 150+ OpenVZ containers on it. At this time this containers are Ubuntu based, in the future we would like to use Debian Squeeze. The Hardware boxes are HP BL Blades 460c G6 and they have onbord Broadcom bnx2x network interface cards. To make life easier we have decided to use the Debian Netinstaller, a local repository cache (app-proxy-ng), our own repository with self made packages, Puppet for configuration file changes and of course Debian preseed.

In fact, the setup from the pure iron to the running ready to use system doesn't take longer as 15 minutes an we are using this setup over the last 5 years.

Informations about bnx2x firmware

The firmware for the bnx2x hardware is only available through the Debian non-free repository. This meens that the firmware is not included on the Debian setup media and therefore e.g. a netinstaller setup will not work.

To get things up and running you will have to integrate the firmware onto the netinstaller. In 2009 Dann Frazier [1] wrote a script that integrates the needed firmware automatic onto the netinstaller. Unfortunatley the link to the script on his side is dead. I've tried to send him an email but haven't got respond until today (Sep. 2010)

Why we wrote this documentation?

After a lot of search on the internet we found all needed information to do it on ourself. But the informations are currently spreaded about a lot of sites with obsolate state. You could find the ressources at the bottom of this page. If you have problems with this step by step guide, please let us know!
This guide is a summary of certain pages listed at the bottom of the page!

HowTo

Preperation

Create a folder as working directory. Under this folder we will extract the netinstaller, the init.rd and after all we will recreate the iso.

Important: You will probably have to work as root user or at least you have to use sudo!

Let's create our folder:

mkdir ~/netinstaller

Download and extract Debian netinstaller iso

Create a folder called "cd" unter our "netinstaller" folder. To this folder we will extract the contents of the netinstaller iso file.

mkdir ~/netinstaller/cd

Change into the netinstaller folder and download the current stable netinstaller from one of the Debian mirror sites.
Please check back the current stable version at: http://www.debian.org/CD/netinst/

cd ~/netinstaller && wget http://cdimage.debian.org/debian-cd/5.0.6/i386/iso-cd/debian-506-i386-netinst.iso

To extract the netinstaller in a simple manner we use "bsdtar". This version of tar is not installed on default. Use apt to install it.

apt-get install -y bsdtar

Extract the iso to the ~/netinstaller/cd folder.

bsdtar -C ~/netinstaller/cd -xf ~/netinstaller/debian-506-i386-netinst.iso

Download and extract the bnx2x firmware

Create a folder called "bnx2x" unter our "netinstaller" folder. To this folder we will extract the contents of the bnx2x Debian firmware package.

mkdir ~/netinstaller/bnx2x

Change into the netinstaller folder and download the current stable bnx2x firmware package from one of the Debian mirror sites.
Please check back the current stable version at: http://www.debian.org/CD/netinst/http://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/

cd ~/netinstaller && wget http://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2x_0.26_all.deb

To extract the firmware package we use dpkg-deb.

dpkg-deb -x ~/netinstaller/firmware-bnx2x_0.26_all.deb ~/netinstaller/bnx2x/

Extract and modify the initrd.gz

Now we are ready to extract the initrd.gz, modify it and bring the changes back to an initrd.gz. Create a folder called initrd under our "netinstaller" folder. To this folder we will extract the content of the initrd.gz from the netinstaller.


Test

wget http://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2x_0.26_all.deb

1. zcat ../initrd.gz | cpio -iv

2. dpkg-deb -x firmware-bnx2x_0.26_all.deb bnx2

2.1 copy all under lib.... to init.rd root

2.2 add preseed scp root@10.200.2.96:/srv/repository/openvz-host-lenny preseed.cfg

3. find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz

4. mkisofs -o debian-506-amd64-netinst-bnx2x.iso -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat ./cd


bsdtar -C cd -xf debian-506-amd64-netinst.iso


find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz mv initrd.gz cd/install.amd/ cd cd; md5sum `find ! -name "md5sum.txt" ! -path "./isolinux/*" -follow -type f` > md5sum.txt; cd .. mkisofs -o debian-506-amd64-netinst-bnx2x.iso -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat ./cd

Test1