Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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).

share|improve this question
add comment

2 Answers

Could you please directly link the HowTo that you followed to set up the PXE? The error that mention seems like an out of date kernel, but I would need more details to help.

UPDATE:

From the HowTo provided by you, in the last step (Provide the boot image), use the direct link from the Debian mirror (e.g. stable release) to download the newest kernel (linux) and init ram disk (initrd.gz). Hope that it helps.

share|improve this answer
    
Edited question... –  Joseph R. Mar 19 '13 at 9:51
    
The ones I'm using from here are dated Feb 23, 2013 while the ones at the link you provided are dated Feb 18, 2013. so I guess the kernel image and the initrd I'm using can be safely assumed to be up-to-date. –  Joseph R. Mar 19 '13 at 18:33
add comment
up vote 0 down vote accepted

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

share|improve this answer
add comment

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.