Debian – Fix No Disks Detected During Preseeding Install

debconfdebianpreseed

As a follow up to this question, I am trying to fully automate the Debian (squeeze) installation procedure. I have so far managed to mount an ISO image of the main Debian DVD and serve it over FTP to the client. The thing is, the client freezes while trying to detect hard drives. After a certain timeout interval, it presents me with a (blank) list of the partitions it detected and gives me the choice to either edit the partitions or continue. Both choices of course fail since no partitions are ever detected.

To try and debug, I booted the host from the Debian DVD itself and opted for an Expert Install with low debconf priority. One of the steps done during that install seems to be the magical one: it's called "Download Installation components from CD". This seems to retrieve many more modules than my preseeded attempt does, eventually leading to a successful disk detection. In particular, it seems that this step scans the "pool" directory of the Debian mirror that's on the DVD, which the preseeding does not.

I have already tried walking through the whole installation manually and retrieving the d-i selections with

 debconf-get-selections --installer > installer_sels.txt

but nothing I found there was particularly helpful.
The messages in VT 4 (/var/log/syslog) are not much help either because in both cases (the actual DVD and the FTP ISO mount) the messages and complaints about missing modules are the same.

What am I missing here? Is there something I can add to the preseeding file to let it load additional modules from the DVD? Any advice from someone who's tried this before?

Relevant lines from my preseeding file:

d-i mirror/protocol string ftp
d-i mirror/ftp/hostname <FTP server IP>
d-i mirror/ftp/directory /<FTP dir>/debian

EDIT: Additional Details

  • I followed this HowTo
  • I'm serving the Debian squeeze DVD over FTP. I did the following to make an ISO image of it:

    dd if=/dev/cdrom of=/path/to/debian_amd64.iso

  • I'm booting from the amd64 netboot/netboot.tar.gz image.
  • My boot parameters are

... linux26

append ... auto=true priority=critical preseed/url=ftp://path to preseed

I added the linux26 deliberately to overcome the old kernel issue based on an answer I read somewhere else (can't remember where at the moment).

Best Answer

Silly me, the answer was right there in the Debian forums if I knew where to look. It was as you guessed, Guardian, to do with the initrd. The thing is, the DVD image initrd contains more modules than the netboot one. The pertinent ones here being SATA drivers. So I followed the advice in the 9th post in that thread and it worked like a charm.

I'm quoting the solution here in its entirety in case the link goes dead:

I was trying to get this exact setup and I've been tearing my hair out, turns out the solution is quite simple:

The initrd for the netboot image does not contain any ide or sata drivers and they are meant to be retrieved during a regular install, I'm not sure exactly whether they are just not present on the DVD or the installer does not detect or expect them if you are using a mirror of the DVD ( or any install cd ). However there is a solution and that is to make your own initrd.gz with the drivers present.

I've adapted here from

http://wiki.openvz.org/Modifying_initrd_image

http://ubuntuforums.org/archive/index.php/t-423963.html

First I got the initrd.gz for the netboot and off the netboot install cd, but I think the DVD initrd.gz should be fine then:

mkdir netboot-initrd-dir mkdir cd-initrd-dir gunzip netboot-initrd gunzip cd-initrd cd netboot-initrd-dir cpio -i < ../netboot-initrd cd ../cd-initrd-dir cpio -i < ../cd-initrd

Now you will have two directories with the contents of both inird.gz files, you can see what driver files are in each one by:

find ./netboot-initrd-dir -iname *.ko find ./cd-initrd-dir -iname *.ko

you should notice that there is a lot more from the one on the cd, in particular the ide and sata drivers. You can probably be more precise with this is you need to have a smaller image, but I managed to get away with:

cp -nr cd-initrd-dir/lib/modules/2.6.32-5-486/kernel/* netboot-initrd->dir/lib/modules/2.6.32-5-486/kernel/

now you just have to put it back together with:

cd netboot-initrd-dir find . | cpio -H newc -o > ../new-netboot-initrd cd ../ gzip ./new-netboot-initrd

Now you should be able to take that file and stick it in your tftp directory under initrd.gz or similar and it will now detect your disks!

Hope that helps you out.

maynim

Related Question