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

Re: preseed/url= for all install clients



Geert Stappers wrote:
> Debian-Installer can get its preseed information from a webserver.
> 
> You append preseed/url=http://webserver/di/hosta.cfg during boot.
> 
> For hostb you would add preseed/url=http://webserver/di/hostb.cfg.
> 
> And when another host has to be installed, you have again both
> work on server side (creating 'hostfoo.cfg') and client side, (appendig
> hostfoo.cfg )
> 
> To get at the client side all the same, I wrote a CGI script
> which is at http://www.stappers.nl/gst/diM/dim-mux
> all clientsss append preseed/url=http://webserver/cgi-bin/dim-mux
> 
> The script transforms the IP address of the install client
> into a directory name, from where it transmits D.I. seed information.
> 
> It assumes proper name resolving.
> 
> So when you administrate  subdomain.domain.tld.
> where you have hosta.subdomain.domain.tld and hostb.subdomain.domain.tld,
> you will have  under the webserver DocumentRoot directory the files
> tld/domain/subdomain/hosta/di.seeds and
> tld/domain/subdomain/hostb/di.seeds. For hostfoo you have to create
> tld/domain/subdomain/hostfoo/di.seeds but nothing extra at client side.
> 
> HTH, at least usefull for someone else

You don't actually need a cgi script for this. From my personal preseed
setup:

# Networking must already be set up, so it's easy to switch to a config
# based on the machine's hostname assigned by dhcp.
d-i preseed/include_command string case $(cat /etc/hostname) in elephant) echo elephant.cfg ;; donkey) echo donkey.cfg ;; limpet) echo limpet.cfg ;; kraken) echo kraken.cfg ;; *) echo othernetboot.cfg ;; esac

Of course you have to update that for every new machine. If you know you
will have a preseed file for each new machine (perhaps you add them at the
same time you add the DNS entries), it simplifies to:

d-i preseed/include_command string $(cat /etc/hostname).cfg

More examples of this kind of thing in my collection of preseed files
at http://kitenet.net/~joey/d-i/preseed/

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: