[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#848597: debian-installer: iPXE script in DHCP bootfile option is interpreted as preseed filename

On Sunday 18 December 2016 21:32:32 Geert Stappers wrote:
> On Sun, Dec 18, 2016 at 08:33:47PM +0100, Pali Rohár wrote:
> > when DHCP server is configured to send bootfile option with iPXE
> > script
> > then debian-installer fails with following "red" error:
>      <snip/>
> > Debian installer should not try to always process DHCP bootfile
> > option as it does not have to contain Debian preseed file...
> That is why Debian-Installer manual has this
> <quote
> from="https://www.debian.org/releases/jessie/armhf/apbs02.html.en#pr
> eseed-dhcp">
> B.2.5. Using a DHCP server to specify preconfiguration files
> It's also possible to use DHCP to specify a preconfiguration file to
> download from the network. DHCP allows specifying a filename.
> Normally this is a file to netboot, but if it appears to be an URL
> then installation media that support network preseeding will
> download the file from the URL and use it as a preconfiguration
> file. Here is an example of how to set it up in the dhcpd.conf for
> version 3 of the ISC DHCP server (the isc-dhcp-server Debian
> package).
> if substring (option vendor-class-identifier, 0, 3) = "d-i" {
>     filename "http://host/preseed.cfg";;
> }
> Note that the above example limits this filename to DHCP clients that
> identify themselves as "d-i", so it will not affect regular DHCP
> clients, but only the installer. You can also put the text in a
> stanza for only one particular host to avoid preseeding all installs
> on your network. </quote>

I have not able to find anything about it... Nor in documentation. 
Thanks for link & explanation.

> > Due to this bug booting Debian installer from iPXE setup is broken.
> > 
>     :-)
> Please note that there is difference
> between "bug" and "does not work I expect it to work"

Yes, understood.

> > On http://boot.oskarcz.net/ is running such iPXE setup. You can
> > easily reproduce this problem by starting iPXE in qemu and trying
> > to start installation of Debian.
> > 
> >   qemu-system-x86_64 -net nic -net
> >   user,bootfile=http://boot.oskarcz.net/
> I think that bugreporter is missing that there are *2* DHCP requests.

I know that they are two DHCP requests. Problem is that Debian installer 
try to interpret bootfile (returned by second request) as preseed file 
even it is not preseed file (but looks like URL).

And I consider this as a bug. As more things can look like URL, e.g. 
iPXE script which can also be in bootfile option.

> One from a bootROM as iPXE and the other DHCP request by
> Debian-Installer. (Hence the "if statement" in the manual ( quoted
> above ) that should go into DHCP server configuration)
> On "CDROM boot" or "USBstick boot" there is the same Debian-Installer
> code that does network configuration, which uses DHCP.
> Advice: Networksniff (tcpdump, wireshark, tshark) the whole
> installation. Pay special attention to the DHCP request by
> Debian-Installer which can be recognisted on "d-i". Check that the
> DHCP reply as the URL of the wanted preseed file. [1]

I know what is happening there...

> Please report the results to this bugreport.
> ( Keep  848597@bugs.debian.org in the loop )
> Groeten
> Geert Stappers
> [1] If not, come back with "My setup work does not work"
>   (or other wording which saves "bug" for later.)

Pali Rohár

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply to: