Installation in environment with existing DHCP and PXE


  • Hi,

    I’m running a small environment with a working PXE server and DHCP server. I’d to to try to run Fog next to it.

    I set up a VM but I’m already stuck in the first part of it.

    According to ./installfog.sh -h, there is an option called -d / --no-defaults that doesn’t guess the defaults. So I assume that’s the right thing to do. However, that doesn’t seem to do anything.

    alt text

    Can anyone point me in the right direction?

  • Moderator

    @begelmir If you look at your config it very similar to what FOG creates if you were to use FOG’s built in dhcp server.

    https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence#Example_1

    I’m only providing this as a reference.

    In the case of your dhcp server its looking to see if the pxe booting computer is bios or uefi. Then its chaining to 10.10.205.100. I assume that system is where your menuing system is. This menuing system could be duplicated in FOG using ipxe instead of grub, but that’s a bit off point.

    From a quick check it appears once you enter the grub world it can’t chain load out of grub except for local devices. Maybe your developers know of a way. I don’t work with grub but only at a basic level.

    If you could insert the fog server between pxe booting and your grub menu then we can make it work. So the idea is to pxe boot into FOG menu then either have the default FOG menu be your Grub menu or have a menu selection for Grub.

    Now that I think about it I made a usb boot menu using grub that connects to FOG. You don’t get all of the features of FOG, but imaging works. Maybe your developers can take this and update your grub menu. https://forums.fogproject.org/topic/7727/building-usb-booting-fos-image

    Forum post ordering. I know the ordering took me some time to get use to. Just remember the latest posts are always right under the original post. When looking at the thread above remember this because if the tutorial takes multiple posts the second post in the thread is always at the bottom of the thread.

    We can get a solution for you because we have multiple ways to approach this. You just need to pick the path that works best for your network.


  • @george1421 Yes this is still an issue

    Can you give me the steps to integrate this.

    1. The DHCP server is DHCPD. It’s using ipxe. It doesn’t appear to use option 67 but it does say ipxe a whole bunch of times.
    authoritative;
    
      option space ipxe;
      option ipxe-encap-opts code 175 = encapsulate ipxe;
      option ipxe.priority code 1 = signed integer 8;
      option ipxe.keep-san code 8 = unsigned integer 8;
      option ipxe.skip-san-boot code 9 = unsigned integer 8;
      option ipxe.syslogs code 85 = string;
      option ipxe.cert code 91 = string;
      option ipxe.privkey code 92 = string;
      option ipxe.crosscert code 93 = string;
      option ipxe.no-pxedhcp code 176 = unsigned integer 8;
      option ipxe.bus-id code 177 = string;
      option ipxe.san-filename code 188 = string;
      option ipxe.bios-drive code 189 = unsigned integer 8;
      option ipxe.username code 190 = string;
      option ipxe.password code 191 = string;
      option ipxe.reverse-username code 192 = string;
      option ipxe.reverse-password code 193 = string;
      option ipxe.version code 235 = string;
      option iscsi-initiator-iqn code 203 = string;
      # Feature indicators
      option ipxe.pxeext code 16 = unsigned integer 8;
      option ipxe.iscsi code 17 = unsigned integer 8;
      option ipxe.aoe code 18 = unsigned integer 8;
      option ipxe.http code 19 = unsigned integer 8;
      option ipxe.https code 20 = unsigned integer 8;
      option ipxe.tftp code 21 = unsigned integer 8;
      option ipxe.ftp code 22 = unsigned integer 8;
      option ipxe.dns code 23 = unsigned integer 8;
      option ipxe.bzimage code 24 = unsigned integer 8;
      option ipxe.multiboot code 25 = unsigned integer 8;
      option ipxe.slam code 26 = unsigned integer 8;
      option ipxe.srp code 27 = unsigned integer 8;
      option ipxe.nbi code 32 = unsigned integer 8;
      option ipxe.pxe code 33 = unsigned integer 8;
      option ipxe.elf code 34 = unsigned integer 8;
      option ipxe.comboot code 35 = unsigned integer 8;
      option ipxe.efi code 36 = unsigned integer 8;
      option ipxe.fcoe code 37 = unsigned integer 8;
      option ipxe.vlan code 38 = unsigned integer 8;
      option ipxe.menu code 39 = unsigned integer 8;
      option ipxe.sdi code 40 = unsigned integer 8;
      option ipxe.nfs code 41 = unsigned integer 8;
    
    
    subnet 10.10.205.0 netmask 255.255.255.0 {
      interface eth1;
      range dynamic-bootp 10.10.205.70 10.10.205.95;
      max-lease-time 30;
      default-lease-time 10;
    
      class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "grub/bootx64.efi";
        next-server 10.10.205.100;
      }
    
      class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "grub/bootx64.efi";
        next-server 10.10.205.100;
      }
     class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "grub/bootx64.efi";
        next-server 10.10.205.100;
      }
    
      class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "bios/pxelinux.0";
      }
    }
    
    1. The installation server itself is used to install custom Linux distro’s that are developed in-house. I don’t control that server. This is an operational system that I’m not allowed to modify, but I can ask to add a line that redirects it to a different PXE server, for example FOG. This PXE server is used to install hundreds of Linux computers each week. I want to use FOG to install Windows machines, which are used a lot less often but I still want to be able to use an install server as multiple people have to run it and so far, FOG looks like the easiest to use imaging software, even for non IT people.

    Is there a way to add notifications? Why doesn’t this forum let me know when there is a reply? :S. And why aren’t the replies in chronological order? :S

  • Moderator

    @begelmir So I have to ask a few questions.

    1. What is your current pxe boot server? Is it using syslinux or ipxe or gpxe as the boot loader? If you don’t know look at dhcp option 67 and tell me the file name that you are sending.

    2. Why do you want to keep your existing pxe boot environment and then add in FOG?

    When you install FOG just install it with the defaults answer no to install dhcp server and or dns server. You want the fog server to be totally dependent on your existing environment.


  • @george1421 said in Installation in environment with existing DHCP and PXE:

    @begelmir Is this still a problem with your install? I can give you steps to integrate FOG into your existing environment if needed. I just need to know a bit more about your environment.

    I’m sorry I didn’t notice the reply.

    Yes I want to try to see if this is a proper solution. If you can give me the steps I’m more than willing to test them out. I’m out of the office next week so I won’t be able to try it out at work but I can set up a testing environment at home.

  • Moderator

    @begelmir Is this still a problem with your install? I can give you steps to integrate FOG into your existing environment if needed. I just need to know a bit more about your environment.

353
Online

9.6k
Users

16.0k
Topics

147.9k
Posts