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

Bug#319524: please allow DHCP server to specify default archive mirror

On Sat, 2005-07-23 at 15:15 -0400, Joey Hess wrote:
> Phil Blundell wrote:
> > You're right that a preseed file would also allow me to set the mirror
> > location during install, but that would be slightly more cumbersome from
> > my point of view.  I don't really want to get into building customised
> > CD images, so in order to make it "just work" without manual
> > intervention there would need to be a way for clients to automatically
> > locate the preseed file on the server, which I think would again come
> > down to a DHCP option.
> I've wanted for a while a way to let dhcp servers broadcast a preseed
> file (either content or url). If you can point me at a way to make a
> dhcp server do that and show me what it looks like to a dhcp client,
> then the rest of the peices should be very easy to put together.

Sorry about taking so long to reply to this.

I guess there are a couple of ways to make this work.  One possibility
would just be to have the installer try to retrieve the preseed file
from a fixed location on the "next-server" specified in the DHCP lease,
using tftp and/or http.  So, if you wrote "next-server" in
your dhcpd.conf, the installer might try"; or something.  That'd be easy to
set up, and probably powerful enough for most folks.

It'd probably help if the clients had 'send vendor-class-identifier
"Debian";' or something similar in their dhclient.conf files, in case
the server needed to provide different next-server values to d-i and
other clients.

A slightly more complex approach would be to put this in the dhcp config

option space debian;
option debian.preseed-file code 1 = text;

class "debian" {
  match if option vendor-class-identifier = "Debian";
  vendor-option-space debian;
  option debian.preseed-file "http://server/preseed.txt";;

That way, you could specify a complete arbitrary URL for the installer
to retrieve, at the cost of rather more configuration at the server end.
I think the URL ought to show up as $new_preseed_file in the
dhclient-script's environment; you'd probably want the script to write
this out to some other file from where the installer proper could pick
it up.

I guess the two mechanisms aren't exclusive: you could have the clients
use the "debian.preseed-file" option if the server sends it, and
otherwise try the next-server thing.


Reply to: