Thursday, June 25, 2009

Debian Installation on Servers With Broadcom 5708/5709 NICs using the bnx2 driver

Installing Debian on a system with Broadcom network interfaces can be quite annoying because the firmware is no longer included. If you load the firmware onto a usb disk as suggested, you run into other problems when using scsi drives resulting in a system which requires hacking menu.lst after install to boot. This approach doesn't work if you're using iLO/DRAC/iDRAC to install as they only allow one remote media connection at a time.

An easy workaround is to modify your install iso to contain the drivers. Here's how:
  1. Download a newish Debian install iso.
  2. Mount the install iso:
    1. mkdir cdrom
    2. mount -o loop debian-testing-amd64-CD-1.iso cdrom
  3. Copy the files:
    1. mkdir isocopy
    2. cp -av cdrom isocopy
  4. Download the appropriate firmware package for your installation, such as http://packages.debian.org/squeeze/all/firmware-bnx2/download
  5. Extract the drivers and copy into your new iso:
    1. dpkg-deb -x firmware-bnx2_0.16_all.deb firmware
    2. cp firmware/lib/firmware/* isocopy/cdrom
  6. Build a new iso:
    1. cd isocopy/cdrom
    2. mkisofs -o ../modified-debian.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V disks .
  7. Done, let's look at our new iso:
    1. cd ..
    2. ls modified-debian.iso

You can now burn this iso to a CD or use it as virtual media.

There's one final step, which is getting the OS to see the firmware drivers.

Once booted to the new ISO, you need to immediately switch to another console and copy the files over before the installer looks for them:
  1. mkdir lib/firmware
  2. cp /cdrom/*.fw lib/firmware
After that's done, the Debian installer should be able to autoload the bnx2 driver without any problems.

3 comments:

Unknown said...

I've been unable to get a working network configuration using the firmware..
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522206

Seems to indicate a kernel version of 2.6.29-2 is necessary.. Is this what you've found?

Thanks
David

John said...

This worked well for me on Debian GNU/Linux 5.0 stable with Kernel 2.6.26-2-amd64 on a Dell m600. Thank you J Snell!

dbp said...

The exact command for the last step:

1. When select the language, press and press to enable the 'another console'
2. mount -t iso9660 /dev/sr0 cdrom (Note: /dev/sr0 may vary)
3. mkdir lib/firmware
4. cp /cdrom/*.fw lib/firmware