Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a trouble using the preseed.cfg file while installing Debian by PXE.

My network card needs the firmware-bnx2 package to be taken in account by the debian kernel.

During the PXE boot process, the manufacturer allows the system to set up its network interface and reach the initrd & kernel and the installation starts. In this initrd I have put the pressed.cfg file which is taken in account. But the installation can not be automatically accomplished until I install this bnx2 package.

I have no idea how to install the bnx2 package during this boot process. I think this is possible through the instruction

d-i hw-detect/load_firmware boolean true

The documentation says

# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.

But I don't know where to set this package and how to install it.

Can anyone help me please?

Many thanks!

share|improve this question

You probably want to add the missing firmware to the debian-installer filesystem. Here's how to proceed.

First some context : let's admit we have PXE configured to use /tftpboot as a TFTP root, and use the following "menu" instead of the default in pxelinux.cfg :

    default install label install
        menu label ^Install
        menu default
        kernel debian-installer/amd64/linux
        append vga=788 initrd=debian-installer/amd64/initrd.gz auto=true interface=auto priority=critical url=http://192.0.2.5 preseed/url=http://192.0.2.5/my-custom-preseed.cfg console=ttyS1,115200n8

So from there :

  1. go find your inirtd.gz file and expand it
    cd /tftpboot/debian-installer/amd64/
    cp initrd.gz initrd.gz.orig
    mkdir -p tmp/initrd; cd tmp/initrd
    zcat ../../inirt.gz | cpio -iv 
  1. you get the required firmware to put it inside :
    apt-get install --download-only firmware-bnx2 firmware-bnx2x
    cd /tftpboot/debian-installer/amd64/tmp/initrd
    dpkg-deb -x /var/cache/apt/archives/firmware-bnx2_*.deb ../
    dpkg-deb -x /var/cache/apt/archives/firmware-bnx2x_*.deb ../
    cp -a ../lib/firmware lib/firmware
  1. and re-build the initrd file
    cd /tftpboot/debian-installer/amd64/tmp/initrd
    find . -print0 | cpio -0 -H newc -ov | gzip -c > ../../initrd.gz

You're done, give it a try.

share|improve this answer

This may be a bit off of the beaten path but I've had good luck chaining in iPXE as the actual bootloader. Among other pluses it has a mechanism to load a kernel module along with your initrd. Check out http://ipxe.org/cmd/imgfetch?redirect=1 for an example.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.