Debian 8, Fog trunk, PXELinux on MS Server and MS DHCP help



  • Hi all, been looking at Fog for years but only got time now so I’m testing!

    I know I have a “bad setup” being Debian 8 but let me explain.

    Here we have a server 2008 R2 with MDT 2012 running (soon 2013) and DHCP offered from another MS server.
    It was running standard PXE and wanted to boot other things so I setup PXELinux using syslinux 6.03 and it works great!

    Now I ventured on the next part and without much reading went with the latest release of Debian 8.2 and figured out after that trunk is needed, but only after installing Fog 1.2.0! So I installed trunk over 1.2.0 using Git. By the way, I wonder how to check for changelog whenever there is a new git version out? The changelog file just talks about 1.3.x but no specifics…

    So, I didn`t want to bother changing our DHCP to call Undi, it is still pointing pxeboot.0, I thought it would be simple to chainload, not really knowing what I was getting into! How the heck would one achieve this?!?

    I read quite a bit since about a week and now it’s time for me to sign up here and participate and request answers!

    I get it that I should be modifying our boot to undi of the Fog server but from the wiki’s I saw it was possible to do so, reading https://wiki.fogproject.org/wiki/index.php/Modifying_existing_DHCP_server_to_work_with_FOG and https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server. So I also installed dnsmasq but one thing not mentionned in the docs is that it will take over the original PXE boot sequence, I though it would just help me having an IP without dirupting anything else! So I stopped the service and tried https://wiki.fogproject.org/wiki/index.php/Chainloading_PXE_to_iPXE_using_pxelinux.0 instead.

    Now, i couldn’t get why I would need to change anything on the actual Fog server at this point and just used the config part of the default file for my PXE server to which I added LABEL iPXE Boot MENU LABEL FOG KERNEL ipxe.krn APPEND dhcp && chain http://x.x.x.x/fog/service/ipxe/boot.php?mac=${net0/mac}

    For this to work, I first copied the ipxe.krn file from the Fog machine to my pxe server, it asks for the tftp server address, even if I add default.ipxe containing the ip address. If I press enter it will fail saying tftp://{PXE ip address}/default.ipxe Error 0x3d126001

    If instead I enter the IP manually of the Fog box I get to the menu! Yay!! I shouldnt rejoice so fast, though!
    I try Full registration and Inventory, Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) Kernel Offset: disabled...

    I have read that it’s better to use ipxe.krn from svn but I tought why not give the one from ipxe.org ISO a try?
    Funny thing is, it gets to the Fog server without having me enter manually the ip address! Even if default.ipxe is not present on the PXE server. But even more strange, the screen instead of being the nice white Fog backgroud is a plain blue one, not centered or anything.
    If I try Full regist and inventory it works! I’m prompt to enter the info and at the end I said yes to image itt but it just rebooted.
    So I go back in I see now it’s already registered, I choose Quick Image and I get

    params: command not found
    Could not boot: Exec format error (http://ipxe.org/2e022001) 
    

    Guys I am sorry I know this is a long post! I’m trying to give as much info as I can.
    I am really trying to avoid changing the DHCP option to Undionly, seeing that it “should” be working, i think but all I read is people are trying. I do have some time to play around for a couple of days so I would love to try a few things. Thanks!


  • Moderator

    @FlowLive Hey that’s great to hear that someone can repeat my madness… :sweat:

    @Wayne-Workman Le me see if I can clean it up a bit. I need to see if I can integrate what @Sebastian-Roth noted in this thread about using a logical to represent the fog server IP. I think I can make it work.


  • Moderator

    @george1421 Can we get a more formal post of both solutions for the WiKi?



  • @george1421
    It works! Both solutions works!
    I’m now playing around with adding entry in the menu, having some that tries a command with the description or item name… weird but naming it differently seems to work for now.


  • Moderator

    @FlowLive I know it works when you call the boot.wim boot.wim. In theory it should work that way too, because you are using a logical name (boot.wim) to the physical name mapping.

    Just be aware there are a bunch of other files in that ISO directory structure you need. That is why I created the tar file. I’m sorry I didn’t think about it being blocked across the pond. But if you have WAIK then you have everything I have.

    Let us know how it goes (good or bad [I expect good things only]).



  • @george1421
    Got it, like I said dropbox is blocked but I managed to get that ISO folder on there, Along with 2 different .wim files for English and French versions of windows and just need to call it properly in the settings, all is good!"

    If the boot.wim is called differently, it would be called like this;

    Parameters:
    kernel http://<fog_server_ip>/wimboot
    initrd http://<fog_server_ip>/ISO/boot/bcd BCD
    initrd http://<fog_server_ip>/ISO/boot/boot.sdi boot.sdi
    initrd -n boot.wim http://<fog_server_ip>/ISO/LiteTouchPE_x64.wim boot.wim
    boot
    

    I guess it calls boot.wim to load LiteTouchPE_x64.wim? Or whatever the .wim file is called…

    Really happy with this, thanks george1421!


  • Moderator

    @FlowLive Sorry I got tied up in meetings this AM.

    You want to copy that tar file to where your web root is. That is either /var/www or /var/www/html depending on your distribution. In the case of this tar file it creates an upper case folder called ISO when you run the tar -zxf command to extract the file.

    When you get done, there should be wimboot in the http servers root directory and a folder called ISO. The LiteTouchPE_x86.wim comes from MDT and it needs to be copied into the ISO folder as boot.wim. That file does not go into the boot folder it self just into the /ISO folder as I defined in the option settings.



  • @george1421
    "Then copied the LiteTouchPE_x86.wim from MDT deployment share to /var/www/html/ISO as boot.wim."

    There is already a boot.wim file in /var/www/html/ISO/boot/, you keep both of em or you made an error on the destination?



  • @george1421
    Yes but if I put it in the ISO folder it would be the one from the .iso as well, I would end up having the same boot prompts as if I was booting off the disc. Or can I take some files from MDT, like the bcd file and boot.sdi?

    Just to clarify, i don’t know if it’s the new Debian settings or Fog that changed it but I do see DocumentRoot to be /var/www/html/ found this in /etc/apache2/available-sites/000-default.conf and 001-fog.conf files.

    I’m trying to download the files but i guess dropbox is blocked over here, thanks anyways!

    I did create the structure using WAIK, I will try to get this to boot see if it’s any different.


  • Moderator

    @FlowLive

    Then take the wim file from MDT and move it to the ISO folder and rename it boot.wim. Then just follow the option 2 instructions. If you want to replicate what I’ve done here install MS waik and build this directory structure. None of this code belongs to me or my company.


  • Moderator

    @FlowLive said:

    Is it important to actually use /var/www/html/ or can I just use /var/www/?

    I read docs, in part http://ipxe.org/howto/winpe and I already have a wim file but also created an .iso from MDT 2012, now I’m trying to get all this to boot.

    My issue is if I use the ISO, I have to press a key to boot from CD or DVD like if I was booting from an install disc which is a bit different than the current setup on PXE which brought us directly to the LiteTouch environment.

    Can’t I simply take the wim file already in MDT and along with other needed files have the same “feel” as if I was using the old PXE boot?
    Anyone did that or knows what I mean?

    As for point 1. the path is specific to your distribution. The rhel branch of linux has /var/www/html the debian branch uses /var/www. To answer your question it needs to be what is correct for your distribution. What I should have said (maybe) is off the root of your web servers base directory (I’m not sure if that is any clearer).

    OK, remember that the ISO image IS a CDROM image. This (press any key to boot) is exactly what you get when you boot from a CDROM. So on the plus side it is working exactly correct. Whoot!! but not as you need.

    To get roughly the equivalent of what you have with WDS you need to use the option 2 from my post. This is a bit more complicated to setup, but in this case you will take the boot.wim (or what ever the wim file is called) from MDT rename it to boot.wim and install it in the ISO folder.

    Let me see what I can do to archive my setup.



  • @george1421 said:

    Bingo, I have it.

    I have two ways to boot a MDT litetouch image via FOG.

    1. The first way is how I stated to take the iso image created by MDT and move that to your FOG server (on rhel variants) in /var/www/html/iso folder. The file I used was to move LiteTouchPE_x86.iso from the MDT deployment share to that …/iso folder as ltpe_x86.iso. Then to create the PXE boot menu as I outlined below. The freeze issue I had was related to how I created the VM. I created it as a linux VM not a windows VM (shame on me). Once I reset it to a windows 7 VM the system booted to the lite touch menu.

    2. By using instructions found in Wayne’s link below. http://ipxe.org/howto/winpe I used this as the bases of option 2. I’ve created WinPE USB boot drives so I already had WAIK installed and already had a boot.wim created, so I’m not going into that part. But in the target winpe environement I took the ISO folder and moved it to the fog server in /var/www/html/ISO (which is different than the <lowercase> iso folder from option 1). I placed the wimboot file (downloaded from the link provided by Wayne) in the web root folder /var/www/html. Then copied the LiteTouchPE_x86.wim from MDT deployment share to /var/www/html/ISO as boot.wim. And finally created the FOG PXE menu with these settings.
      Menu Item: winpe.BootMDT_x86
      Description: Boot MDT LiteTouch x86
      Parameters:
      kernel http://<fog_server_ip>/wimboot
      initrd http://<fog_server_ip>/ISO/boot/bcd BCD
      initrd http://<fog_server_ip>/ISO/boot/boot.sdi boot.sdi
      initrd -n boot.wim http://<fog_server_ip>/ISO/boot.wim boot.wim
      boot

    I still would like to understand how I can use the variables to the fog server IP address so I don’t have to hard code the IP address into the boot menu. That would make the instructions a bit more dynamic.

    Understand what I’ve done is a first pass attempt to make FOG deploy both FOG images and to launch MDT’s litetouch image without the need of a WDS server (which would have made things a bit easier in one respect)

    Is it important to actually use /var/www/html/ or can I just use /var/www/?

    I read docs, in part http://ipxe.org/howto/winpe and I already have a wim file but also created an .iso from MDT 2012, now I’m trying to get all this to boot.

    My issue is if I use the ISO, I have to press a key to boot from CD or DVD like if I was booting from an install disc which is a bit different than the current setup on PXE which brought us directly to the LiteTouch environment.

    Can’t I simply take the wim file already in MDT and along with other needed files have the same “feel” as if I was using the old PXE boot?
    Anyone did that or knows what I mean?


  • Moderator

    @jukka2015 Ok then, my first recommendation is for you to start a new thread so this one doesn’t get polluted with off topic discussions. Then we can focus on your specific needs.



  • @george1421

    Do I understand that you want to remove most of the standard FOG menu items except for a select few?

    That’s exactly what I want… My use of FOG is just as that minimal and I don’t want users to get confused. :) … I want to run my .ISO file directly from the first menu, I was succesfully start it from the Advanced menu for now, but I don’t know how to link it to first list below default choice .


  • Moderator

    @jukka2015

    Not sure I totally understand what your goal is.

    But for the easy part first. You have to be running the SVN trunk build (pre 1.3.0) not the 1.2.0 base. Under the fog settings there is the ipxe boot menu. You must add a new entry then you can set the options to display the new menu item depending on the state of the target computer (new, undefined, all, etc [stating from my memory]). You can add in the iso image as I outlined below. Also @Wayne-Workman just updated a wiki about adding items to the ipxe menu.

    Now about the part I’m not sure about. Do I understand that you want to remove most of the standard FOG menu items except for a select few? If that is the case you will need to edit the mysql database. Before I go into that, lets make sure that is what you want to do. (personally I don’t recommend this approach [tweaking the database] because there is no way to know how it will impact FOGs execution, stated as a non developer). Wayne kind of laid out what needs to be done to the database about midway down in this thread.



  • @george1421

    I only want one list of options, is there a way to build a list with FOG management GUI and copy it to: BootMenu.class.php file directly? Or any other suggestion…
    Where is located that Advanced boot menu settings? I just want simple list with couple of options, like: “Boot from local drive”, “Diagnostic” (that’s .ISO image) and make a “Quick inventory”…


  • Moderator

    Saw that. Good work. The only reason I wanted WDS and FOG to work together was to leverage WDS’s handling of UEFI/BIOS identification. But the DHCP method is much more elegant and less resource intensive.

    I am glad that you got that working though. Options are valuable when doing IT work.


  • Moderator

    @need2 said:

    I’m late to the party, but no I never got WDS and FOG to play well together.

    @FlowLive was just able to do this. Its a bit down in the thread, but he has FOG acting as the PXE boot server then you can select the WDS environment from the FOG Menu.

    I went the other way around and setup FOG to be able to boot the MDT litetouch image so that you can deploy through MDT from the FOG boot menu. Two different ways to have FOG and MDT/WDS coexist.


  • Moderator

    I’m late to the party, but no I never got WDS and FOG to play well together. I wasn’t just trying to get them to coexist on the same network though, I was pressing their faces so hard together that they’d forget if they were kissing or not. My goal was to work around the now solved issue of using a Windows DHCP environment to handle Legacy and UEFI PXE coexistence, which WDS can inherently handle.


  • Senior Developer


Log in to reply
 

427
Online

38918
Users

10688
Topics

101398
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.