<div dir="ltr">woked - yay.<br><br>dhcp-host=00:26:9e:03:9d:e5,set:negk,negk<br>dhcp-option-force=tag:negk,209,"partman-auto/disk=/dev/sda"<br><br># grub/grub.cfg<br>net_get_dhcp_option appends ${net_default_interface} 209 string<br><br>menuentry "Install Ubuntu preseed" {<br>set gfxpayload=keep<br>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/initrd.gz<br>}<br><br>~ # head /var/log/syslog <br>May  1 04:30:40 kernel: [    0.000000] Command line: BOOT_IMAGE=/ubuntu-installer/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="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 class="">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/<wbr>nvme0n1"<br>
> interface=${net_default_mac}<br>
> initrd /ubuntu-installer/amd64/<wbr>initrd.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_<wbr>extensionspath/disk}<br>
><br>
> in dnsmasq conf:<br>
> dhcp-host=40:8d:5c:7f:bb:90,,<wbr>gator<br>
><br>
> dhcp-option-force=host:gator,<wbr>209,"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,<wbr>set:gator,gator<br>
<br>
<br>
and make the option conditional on that tag<br>
<br>
dhcp-option-force=tag:gator,<wbr>209,"disk=/dev/nvme0n1"<br>
<span class=""><br>
><br>
> So yeah, how do I send random strings based on mac/hostname<br>
</span>See above<br>
<span class=""><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="HOEnZb"><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">Dnsmasq-discuss@lists.<wbr>thekelleys.org.uk</a><br>
> <a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.<wbr>uk/mailman/listinfo/dnsmasq-<wbr>discuss</a><br>
><br>
<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.<wbr>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.<wbr>uk/mailman/listinfo/dnsmasq-<wbr>discuss</a><br>
<br></blockquote></div><br></div>