Differences between revisions 31 and 32
Revision 31 as of 2012-11-28 14:55:30
Size: 5448
Editor: ?AlexOwen
Comment:
Revision 32 as of 2013-02-06 00:53:16
Size: 5457
Editor: GeoffSimmons
Comment: Update for firmware-nonfree 0.36+wheezy.1; list squeeze examples first.
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:

== Examples for Wheezy ==

Features in the debian-installer available since debian 6.0 (squeeze) release give us a simple method of adding firmware to the debian-installer initramfs.

Initial testing with the Wheezy debian-installer beta 4 shows that the squeeze method still works. Wheezy examples with updated URL's are as follows:

=== Wheezy Example #1 : add single firmware deb ===
{{{
FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir -p $FWTMP/firmware
cd $FWTMP/firmware
wget http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.36_all.deb
cd ../
pax -x sv4cpio -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz
}}}

=== Wheezy Example #2 : add debs from firmware.tar.gz ===
{{{
FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir -p $FWTMP/firmware
cd $FWTMP

wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/wheezy/current/firmware.tar.gz

tar -C firmware -zxf firmware.tar.gz

pax -x sv4cpio -s'%firmware%/firmware%' -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz
}}}

=== Wheezy Preseed Configuration ===

Remember, you will need to enable the non-free repository to ensure that the firmware packages receive security updates (should there be any).

This can be done by preseeding the following:

 {{{
base-config apt-setup/non-free boolean true
 }}}
Line 124: Line 73:
== Examples for Wheezy ==

Features in the debian-installer available since debian 6.0 (squeeze) release give us a simple method of adding firmware to the debian-installer initramfs.

Initial testing with the Wheezy debian-installer beta 4 shows that the squeeze method still works. Wheezy examples with updated URL's are as follows:

=== Wheezy Example #1 : add single firmware deb ===
{{{
FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir -p $FWTMP/firmware
cd $FWTMP/firmware
wget http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.36+wheezy.1_all.deb
cd ../
pax -x sv4cpio -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz
}}}

=== Wheezy Example #2 : add debs from firmware.tar.gz ===
{{{
FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir -p $FWTMP/firmware
cd $FWTMP

wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/wheezy/current/firmware.tar.gz

tar -C firmware -zxf firmware.tar.gz

pax -x sv4cpio -s'%firmware%/firmware%' -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz
}}}

=== Wheezy Preseed Configuration ===

Remember, you will need to enable the non-free repository to ensure that the firmware packages receive security updates (should there be any).

This can be done by preseeding the following:

 {{{
base-config apt-setup/non-free boolean true
 }}}

Translation(s): English - Français - Italiano


Netbooting and Firmware

This page describes how to include non-free firmware within Debian netboot images.

Introduction

Some network cards annoyingly do not have their firmware in ROM, but rather load it from the host operating system. This is not too much of a problem until you realise that much of the firmware is non-free and cannot be included in standard Debian Installer images.

The proposed Debian Installer solution is to produce non-free udebs containing the firmware and adjust the installer, to give the user the option of installing these firmware udebs at installation time, by downloading from a non-free archive (e.g. via the network).

The Problem

It can be seen this approach does not work well with netboot images which need Ethernet firmware... the Ethernet firmware really needs to be in the initrd.gz before the kernel boots. One solution is to build your own custom Debian Installer images. This is possible and the Debian Installer build process is described in the Debian Installer (d-i) wiki page.

I am capable of building Debian Installer images, but prefer to use a different approach based on the fact the Linux 2.6 kernel uses initramfs rather than initrd.

The Solution: Add Firmware to Initramfs

Initramfs is essentially a concatenation of gzipped cpio archives which are extracted into a ramdisk and used as an early userspace by the Linux kernel. Debian Installer's initrd.gz is in fact a single gzipped cpio archive containing all the files the installer needs at boot time. By simply appending another gzipped cpio archive - containing the firmware files we are missing - we get the show on the road!

Examples for Squeeze

New features in the Squeeze version of debian-installer give us a simpler method of adding firmware to the debian-installer initramfs.

Squeeze Example #1 : add single firmware deb

FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir  -p $FWTMP/firmware
cd $FWTMP/firmware
wget http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.28+squeeze1_all.deb
cd ../
pax -x sv4cpio -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz

Squeeze Example #2 : add debs from firmware.tar.gz

FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir  -p $FWTMP/firmware
cd $FWTMP

wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/squeeze/current/firmware.tar.gz

tar -C firmware -zxf firmware.tar.gz

pax -x sv4cpio -s'%firmware%/firmware%' -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz

Squeeze Preseed Configuration

Remember, you will need to enable the non-free repository to ensure that the firmware packages receive security updates (should there be any).

This can be done by preseeding the following:

  • base-config     apt-setup/non-free      boolean true

Examples for Wheezy

Features in the debian-installer available since debian 6.0 (squeeze) release give us a simple method of adding firmware to the debian-installer initramfs.

Initial testing with the Wheezy debian-installer beta 4 shows that the squeeze method still works. Wheezy examples with updated URL's are as follows:

Wheezy Example #1 : add single firmware deb

FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir  -p $FWTMP/firmware
cd $FWTMP/firmware
wget http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-bnx2_0.36+wheezy.1_all.deb
cd ../
pax -x sv4cpio -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz

Wheezy Example #2 : add debs from firmware.tar.gz

FWTMP=/tmp/d-i_firmware
rm -rf $FWTMP
mkdir  -p $FWTMP/firmware
cd $FWTMP

wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/wheezy/current/firmware.tar.gz

tar -C firmware -zxf firmware.tar.gz

pax -x sv4cpio -s'%firmware%/firmware%' -w firmware | gzip -c >firmware.cpio.gz

# cd to the directory where you have your initrd
cd /tftpboot/debian-installer/i386
[ -f initrd.gz.orig ] || cp -p initrd.gz initrd.gz.orig
cat initrd.gz.orig $FWTMP/firmware.cpio.gz > initrd.gz

Wheezy Preseed Configuration

Remember, you will need to enable the non-free repository to ensure that the firmware packages receive security updates (should there be any).

This can be done by preseeding the following:

  • base-config     apt-setup/non-free      boolean true

See Also


CategoryNetwork