Grub PXEBOOT Question - DHCP

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

 



I have been working with some old hardware (no CD rom unless I pull the machine apart (20 screws)) and
temporarily add one in.  I have set up a grub floppy and successfully installed an old version
of Fedora.  The relevant section of my current dhcpd.conf file looks like this:
 
------------------------------------------------------------
subnet 192.168.67.128 netmask 255.255.255.128 {
 
 option routers   192.168.67.254;
 option subnet-mask  255.255.255.128;
 
 option ntp-servers  192.168.66.130;
 
 range dynamic-bootp 192.168.67.235 192.168.67.250;
 default-lease-time 172800;
 max-lease-time 345600;
 option domain-name-servers 192.168.67.134, 192.168.64.1;
 authoritative;
        class "pxeclients" {
                  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
                  next-server 192.168.67.200;
                 
                  filename "fc6/vmlinuz";
          }
 
}
-------------------------------------------------------------

I can load a system with fc6 just fine. 
 
The grub menu.list (aka grub.conf) file looks like this:
(Some lines wrapped in the paste to email)
 ----------------------------------------------------------
default=0
timeout=30
#
title Linux_fc8_boot_phxbkup1
dhcp
root (nd)
kernel fc8/vmlinuz repo=192.168.67.200:/iso/fc8:/path ramdisk=10240 rw root=/dev/nfs boot=nfs nfsroot=192.168.67.200:/iso/fc8
initrd fc8/initrd.img
#
title Linux_fc6_boot_phxbkup1
dhcp
root (nd)
kernel fc6/vmlinuz repo=192.168.67.200:/iso/fc6:/pat ramdisk=10240 rw root=/dev/nfs boot=nfs nfsroot=192.168.67.200:/iso/fc6
initrd fc6/initrd.img
#
title Linux_fc4_boot_phxbkup1
dhcp
root (nd)
kernel fc4/vmlinuz repo=192.168.67.200:/iso/fc4:/pat ramdisk=10240 rw root=/dev/nfs boot=nfs nfsroot=192.168.67.200:/iso/fc4
initrd fc4/initrd.img
#
----------------------------------------------------

I can not load the fc4 or fc8 versions without channging the dhcpd.conf file.
This means I have the tftp boot server set up correctly (or at least close enough).
I also realize that I probably have more kernel options than I need.
What I would like to do is set up something like:

------------------------------------------------------------
subnet 192.168.67.128 netmask 255.255.255.128 {

	option routers			192.168.67.254;
	option subnet-mask		255.255.255.128;

	option ntp-servers		192.168.66.130;

	range dynamic-bootp 192.168.67.235 192.168.67.250;
	default-lease-time 172800;
	max-lease-time 345600;
	option domain-name-servers 192.168.67.134, 192.168.64.1;
	authoritative;
        class "pxeclients" {
                  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
                  next-server 192.168.67.200;
                 
                  if option dhcp-user-class = "fc4" {
                          filename "fc4/vmlinuz";
                  } elsif option dhcp-user-class = "fc8" {
                          filename "fc8/vmlinuz";
                  } else {
                          filename "fc6/vmlinuz";
                  }
          }

}
---------------------------------------------------------------------
The "if" statement is pulled out of an example I found on the internet.
The example was using the dhcp-user-class to set the default domain.
I have found reference to the grub " dhcp [--with-configfile] " and
also references to "option-150".   What I have not found is an example
that gets a parameter from the dhcp line in a grub.conf file to the
dhcp server so that it could be used in an "if" test.

Has anyone ever done this and has an example they would be willing to share?

Any advice in this area would be most appreciated.


Bob
Phoenix, AZ, USA

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux