Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to install Debian on a machine, but the kernel and modules in the squeeze netinst module do not support the network driver. I can build a kernel module that works, but:

  1. How do I get the same kernel headers used for the debian installer, so I can build a compatible module?
  2. How do I make the installer aware of this module in an automated way?

Currently, I'm using the hd-media image, so I have a USB drive with a FAT16 filesystem, and the .iso installer image in there. So, it's a fairly simple matter once the module is built, to put it on this drive, but how then do I get the Debian installer to load it in an automated way?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

This is easiest if using the hd-media install method which must be downloaded from an obscure location on the debian FTP servers. This gives you install media that is a FAT16 filesystem, which is easier to modify than an ISO.

Syslinux runs from this FAT16 filesystem and unpacks initrd.gz from it, which gets you as far as running the Debian installer. The first few steps in the install process then scan hard drive devices, looking for one that contains an appropriate .iso, and once located, the installation proceeds normally.

Kernel modules can be built against the kernel headers in the main Squeeze repository.

One way to include custom drivers is to modify the initrd.gz, which becomes the root filesystem for the installer. This is a bit of a pain, though.

An easier way is to drop the custom kernel module into the FAT16 filesystem, and then use preseed to have the installer run a script early in the install process which copies the kernel module from the FAT16 filesystem (which will be mounted at /hd-media) to the root filesystem (a ramdisk created from initrd.gz). For example, I used this in preseed.cfg:

d-i preseed/early_command string /hd-media/early_command

And created the script early_command on the install media:

#!/bin/sh
kernelmoddir="/lib/modules/2.6.32-5-amd64/updates"
mkdir "$kernelmoddir"
cp /hd-media/tg3.ko "${kernelmoddir}/tg3.ko"
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.