Skip to content

Instantly share code, notes, and snippets.

@mkyed
Created March 12, 2013 05:29
Show Gist options
  • Save mkyed/5140564 to your computer and use it in GitHub Desktop.
Save mkyed/5140564 to your computer and use it in GitHub Desktop.
Rebuild Debian 6 amd64 netinst iso to include bnx2 driver
apt-get install wget sudo gzip dpkg genisoimage
mkdir debian-netinst
cd debian-netinst
wget http://cdimage.debian.org/debian-cd/6.0.7/amd64/iso-cd/debian-6.0.7-amd64-netinst.iso
wget http://ftp.dk.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.37_all.deb
mkdir iso
sudo mount -o loop debian-6.0.7-amd64-netinst.iso iso/
mkdir new_iso
cp -av iso/. new_iso/
sudo umount iso
cp new_iso/install.amd/initrd.gz .
mkdir initrd
cd initrd
gunzip <../initrd.gz | cpio --extract --preserve --verbose
mkdir lib/firmware
cd ..
dpkg-deb -x firmware-bnx2_0.37_all.deb firmware
cp -Rav firmware/lib/firmware/bnx2 initrd/lib/firmware/
cd initrd
find . | cpio --create --format='newc' | gzip >../initrd.gz.new
cd ../
cp initrd.gz.new new_iso/install.amd/initrd.gz
cd new_iso/
genisoimage -o ../debian-6.0.7-amd64-bnx2-netinst.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V disks .
cd ../
file debian-6.0.7-amd64-bnx2-netinst.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment