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

Re: specifiying a preseed url by dhcp



On Wed, Dec 08, 2004 at 11:08:23PM +0000, Alex Owen wrote:
> Hi,
> comming to this thread late...
> 
> I like the idea of using dhcp for the preseed.

[1]  ;-)

> I think the neatest way to do it is vendor encapsulated options...
> 
> pxelinux uses them...
> 
> extract from dhcpd.conf:
>         #info from pxelinux.doc
>         option space pxelinux;
  <snip/> 
> Suns solaris installer uses them:
> 
> extract from dhcpd.conf:
>         ## INFO FROM http://docs.sun.com/db/doc/806-4075/6jd69oa8p?a=view
>         option space SUNW;
>         option SUNW.SrootOpt  code  1 = text;
 <snip/>
>         option SUNW.SsysidCF  code 13 = text;
>         option SUNW.SjumpsCF  code 14 = text;
>         option SUNW.Sterm     code 15 = text;
> 
> 	host homer {
>    	    hardware ethernet 00:00:00:00:00:00 ;
> 	    fixed-address homer.my.com;
>    	    filename "inetboot9.sun4u";
>    	    vendor-option-space SUNW;
>        		option SUNW.SbootFIL  "inetboot.sun4u";
>         	option SUNW.SrootIP4  boot.my.com;
  <snip/>
>         	option SUNW.SsysidCF  "boot.my.com:/var/netboot/sysidcfg.d/homer";
>   	}
> 
> 
> In fact the option SUNW.SsysidCF is pritty much the Sun equiivilent to
> what we want...

What I see, is that it doesn't need the "class construction"[2].

For networkbooting, one has to setup two "classes",
one class for downloading a kernel (or pxelinux.0)
and one class for the preseed file.


Whatever dicisssion we make about how we put the preseed information
in the DHCP packets, there is the question
  What to do when our user
  appends preseed/url=proto://host/path/to/preseed/file at boot?

My proposal is to handle it in the netcfg code:

  if preseed/url is not yet set
  then
     search for preseed url info in DCHP answer
     if preseed url found
     then
       create preseed/url variabele so that preseeder can find it
       put found information in preseed/url
     fi
   fi

> 
> 
> Alex Owen

Geert Stappers

[1] ME TOO !!!
[2] from http://lists.debian.org/debian-boot/2004/11/msg01543.html,
 credits to vorlon:

Here is a slice of dhcpd.conf that does the right thing (with dhcp3):

 group {
   next-server 192.168.1.3;
   host tftpclient {
     # tftp client hardware address
     hardware ethernet  00:10:DC:27:6C:15;
     filename "/tftpboot/pxelinux.0";
   }
 }

 class "vendor-classes" {
   match option vendor-class-identifier;
 }

 subclass "vendor-classes" "D-I" {
   next-server 192.168.1.3;
   filename "preseed-gunk";
 }


On the client side, I've set 

 send dhcp-class-identifier "D-I";

in dhclient.conf.

Attachment: signature.asc
Description: Digital signature


Reply to: