[Dnsmasq-discuss] grub-net support
Simon Kelley
simon at thekelleys.org.uk
Mon Jan 9 11:58:58 GMT 2006
Sergey Spiridonov wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> Short question : dhcpd has special options for grub-net[1] support, like
>
> option grub-config code 150 = text;
> option grub-config "(nd)/grubconfig";
>
> This allows to use grub-net for remote boot. Is there grub-net support
> in dnsmasq?
>
> 1.
> http://debian.jones.dk/hykrion/pool-etch/sid-jones/grub/grub-net_0.95+cvs20040624-17.0.jones.1_all.deb
>
>
> Long explanation : I used Debian and lessdisks + dnsmasq for remote
> boot. Recently I wanted to switch to kernel-2.6.14-2, because of new
> hardware.
>
> 2.6.14 requires to use new "yaird" instead of "mkinitrd". Yaird produces
> initrd which can be loaded only by grub-net. In grub-net package I found
> example (see below) for dhcp3 server in
> /usr/share/doc/grub-net/examples/dhcpd.conf.
>
> There is now example for dnsmasq. I find nothing in documentaion/FAQ. Is
> there any way to add support for grub-net in dnsmasq?
>
> This is an example for dhcp3 server which I found in grub-net package:
>
> # Example dhcp3 fragment
>
> # GRUB (Grand Unified Boot Loader)
> option grub-configfile code 150 = text;
>
> class "grub-hosts" {
> match pick-first-value (option dhcp-client-identifier, hardware);
>
> server-name "bootserver.example.com";
> next-server 192.168.102.252; # IP of
> TFTP server (only needed if separate from DHCP server)
> # option tftp-server-name "192.168.102.252"; # same
> as (or similar to) next-server above (not tested)
> option dhcp-max-message-size 2048;
> option grub-configfile "(nd)/grub-menu.lst";
>
> if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
> filename "pxegrub-via-rhine";
> } else {
> filename "nbgrub-via-rhine";
> }
> }
>
It looks like you just need a set of dhcp options to pass information to
the booting client. It's possible to do that with dnsmasq.
A rough equivalent of the above looks like this (not tested, may have typos)
dhcp-option=150,"(nd)/grub-menu.lst"
# set pxe tag for a PXE client
dhcp-vendorclass=pxe,PXEClient
# boot info for PXE
dhcp-boot=net:pxe,pxegrub-via-rhine,bootserver.example.com,192.168.102.252
# boot info for not PXE
dhcp-boot=nbgrub-via-rhine,bootserver.example.com,192.168.102.252
The only thing this doesn't cover is increasing the DHCP max message
size: there's no support for that in dnsmasq, but the those options will
easily fit in a default sized message.
HTH
Simon.
More information about the Dnsmasq-discuss
mailing list