<div dir="ltr"><div>I am pondering something I am not sure I even want: I guess we can call it a default option 209 <br><br></div>Is this valid, reliable, predictable? <br><div><br>dhcp-option-force=<wbr>209,"partman-auto/disk=/dev/<wbr>sda"<br><br>dhcp-host=00:26:9e:03:9d:e5,<wbr>set:negk,negk<br>dhcp-option-force=tag:negk,<wbr>209,"partman-auto/disk=/dev/<wbr>sdb"<br><br><br></div><div>The hope is ...sda except for the tag:negk case.<br><br></div><div>personally I only touch 20 machines a year, so setting up the extra 19 lines <br>is easy.  I like to understand my tools, and maybe someone with 100''s will be interested in my setup.  probaly not ;)<br></div><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 30, 2017 at 11:58 PM, Carl Karsten <span dir="ltr"><<a href="mailto:carl@nextdayvideo.com" target="_blank">carl@nextdayvideo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">woked - yay.<br><br>dhcp-host=00:26:9e:03:9d:e5,<wbr>set:negk,negk<br>dhcp-option-force=tag:negk,<wbr>209,"partman-auto/disk=/dev/<wbr>sda"<br><br># grub/grub.cfg<br>net_get_dhcp_option appends ${net_default_interface} 209 string<span class=""><br><br>menuentry "Install Ubuntu preseed" {<br>set gfxpayload=keep<br></span>linux /ubuntu-installer/amd64/linux gfxpayload=800x600x16,800x600 --- auto=true url=dc10b DEBCONF_DEBUG=5 tasks="" hostname= interface=${net_default_mac} ${appends}<br>initrd /ubuntu-installer/amd64/<wbr>initrd.gz<br>}<br><br>~ # head /var/log/syslog <br>May  1 04:30:40 kernel: [    0.000000] Command line: BOOT_IMAGE=/ubuntu-installer/<wbr>amd64/linux gfxpayload=800x600x16,800x600 --- auto=true url=dc10b DEBCONF_DEBUG=5 tasks= hostname= interface=00:26:9e:03:9d:e5 partman-auto/disk=/dev/sda<br><br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 28, 2017 at 5:53 PM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 27/04/17 17:42, Carl Karsten wrote:<br>
> I am looking for the syntax of dhcp vendor options, and then how to<br>
> access them in grub-net.  I think.  maybe there is a better way.<br>
><br>
> I pxe boot grub, which boots di (Debian Installer) and pass a preseed file.<br>
><br>
> I am trying to work out a nice way to pass host specific info to di<br>
> example, most use:<br>
> partman-auto/disk="/dev/sda"<br>
> but one machine has an onboard ssd nvme which needs /dev/nvme0n1<br>
><br>
> di will read values appended to the kernel boot line, so I can hard code<br>
> it like this:<br>
><br>
> menuentry "Install Ubuntu preseed" {<br>
> set gfxpayload=keep<br>
> linux /ubuntu-installer/amd64/linux gfxpayload=800x600x16,800x600 ---<br>
> auto=true url=dc10b hostname= partman-auto/disk="/dev/nvme0n<wbr>1"<br>
> interface=${net_default_mac}<br>
> initrd /ubuntu-installer/amd64/initrd<wbr>.gz<br>
> }<br>
><br>
> interface=${net_default_mac} - use the nic that pxe booted.<br>
><br>
> Now I get lost in conf options and syntax.  forgive me for making stuff<br>
> up here, if it worked I wouldn't be asking for help.<br>
><br>
> I am hoping for something like<br>
> partman-auto/disk=$(net_pxe_ex<wbr>tensionspath/disk}<br>
><br>
> in dnsmasq conf:<br>
> dhcp-host=40:8d:5c:7f:bb:90,,g<wbr>ator<br>
><br>
> dhcp-option-force=host:gator,2<wbr>09,"disk=/dev/nvme0n1"<br>
><br>
<br>
</span>Look for "tags" in the man page, in this case, set a tag in the<br>
dhcp-host line (it can be the same as the hostname)<br>
<br>
dhcp-host=40:8d:5c:7f:bb:90,se<wbr>t:gator,gator<br>
<br>
<br>
and make the option conditional on that tag<br>
<br>
dhcp-option-force=tag:gator,20<wbr>9,"disk=/dev/nvme0n1"<br>
<span><br>
><br>
> So yeah, how do I send random strings based on mac/hostname<br>
</span>See above<br>
<span><br>
<br>
> and how do I read what was sent in grub?<br>
<br>
</span>Set the "log-dhcp" flag in the dnsmasq configuration to get lots of<br>
useful information.<br>
<br>
Cheers,<br>
<br>
Simon.<br>
<br>
><br>
<span class="m_-2907199796490449682HOEnZb"><font color="#888888"><br>
<br>
<br>
> --<br>
> Carl K<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelle<wbr>ys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk<wbr>/mailman/listinfo/dnsmasq-disc<wbr>uss</a><br>
><br>
<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelle<wbr>ys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk<wbr>/mailman/listinfo/dnsmasq-disc<wbr>uss</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>