]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
dhcpd: Add sample config for different PXEClient architectures
authoralberand <albershteyn.andrey@gmail.com>
Wed, 24 Feb 2021 17:59:23 +0000 (18:59 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 28 Jun 2021 06:18:02 +0000 (08:18 +0200)
Also use path to binaries generated with grub-mknetdir.

novaboot

index 8c0b41a37a2053d025541a003ccec893b393ae9c..1fdfd52e9eea29c831c02d207591a0fa66a5c26d 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -1138,10 +1138,19 @@ if (defined $dhcp_tftp)
     open(my $fh, '>', 'dhcpd.conf');
     my $mac = `cat /sys/class/net/$netif/address`;
     chomp $mac;
-    print $fh "subnet 10.23.23.0 netmask 255.255.255.0 {
-                     range 10.23.23.10 10.23.23.100;
-                     filename \"bin/boot/grub/pxegrub.pxe\";
-                     next-server 10.23.23.1;
+    print $fh "
+subnet 10.23.23.0 netmask 255.255.255.0 {
+       range 10.23.23.10 10.23.23.100;
+       next-server 10.23.23.1;
+}
+class \"pxe-clients\" {
+     match option vendor-class-identifier;
+}
+subclass \"pxe-clients\"  \"PXEClient:Arch:00000:UNDI:002001\" {
+     option bootfile-name \"boot/grub/i386-pc/core.0\";
+}
+subclass \"pxe-clients\"  \"PXEClient:Arch:00007:UNDI:003016\" {
+     option bootfile-name \"boot/grub/x86_64-efi/core.efi\";
 }
 host server {
        hardware ethernet $mac;