Using FOG as Multi-Arch/Distro PXE Server?
-
FOG: 1.5.2
OS: CentOS 7.4.1708 updated
Server: PowerEdge R620 (FW updated)
Networking: 10.0.0.x, DHCP (server will be 10.0.0.2, GW is 10.0.0.1)Hello,
I am new to FOG (as in found out about it yesterday) so please be gentle.
Short version:
I want to setup a PXE server that can deploy from standard/official and unmodified images the following OS’s to install on the client machine:
- CentOS 7 (latest)
- CentOS 6.9
- VMWare ESXi 6.7 (Dell image, currently A00)
- VMWare ESXi 6.7 generic image (from VMWare, not OEM specific)
- VMWare ESXi 6.5 U1 (Dells image, currently A10)
- VMWare ESXi 6.5 U1 generic image (from VMWare, not OEM specific)
I also would like to be able to run via PXE on a client (not installed on client but run from memory):
- Clonezilla (for existing images until moving the process to FOG)
- DBan (also open to other secure disk wiping software, bonus if it works with SSD’s too)
I am unclear on how to add these OS’s as options to boot via iPXE both in terms of where I place the content/files, how I structure the directories and how I update the iPXE menus to reflect the choices. Any help direct or linked to would be awesome.
Ideally I would like to have 4 menu options in the “main” menu:
- Local boot
- OS Install
- HV Install (standing for hypervisor)
- Utils Run (for things like clonezilla and dban)
Other than local boot, the rest should have sub menus leading to the OS (Like CentOS 6/7, then on to specific options to install OS’s)
For now I am happy with them just starting a manual install as if I had popped the disk in, in the future kickstarting/scripting the installs would be nice but I am not concerned with it for now.
So any guidance or links to resources specific to the goal of setting up FOG to act as a PXE server (via iPXE) to serve both UEFI and BIOS machines with multiple OS’s would be much appreciated. I have read over much of the FOG wiki, looked over many posts in these forums and scoured Google. I havent yet found any clear cut, specific directions for specifically using FOG as a PXE server in the capacity I have described.
Long Version:
I had manually setup a PXE server using SYSLINUX and had BIOS based machines working no problem. I got, eventually and after much effort, to the point that my UEFI machines would boot the menu but could not execute any other options successfully (on most machines, one machine would work in UEFI just fine). I have scoured the internet trying to get it to work and came to the conclusion that SYSLINUX is a dead project (last release was ~2015) and wasnt cut out for my needs in a multi-arch AND multi-OS environment.
Thats how I came across FOG, looking for an alternative to SYSLINUX and GRUB as a means to deploy installations via PXE. iPXE alone seems to be the basis for this but appears to be very complicated and was unable to find clear direction for using it by itself.
Really what it comes down to is simply:
I want to be able to PXE boot any machine, BIOS or UEFI and get a functional (and nice looking) menu to install or run a number of very different OS’s. I am hoping FOG is the best tool for the job with room to grow into other roles re: deployment in the future (like replacing Clonezilla).
Let me know if you need me to share any other specific information, if I have misunderstood anything or if I have not explained my goals and questions clearly.
Thanks
-
@zer0cool Look over this article: https://wiki.fogproject.org/wiki/index.php?title=Include_any_ISO_in_the_FOG_Bootmenu There is lots of stuff in the forums about this, search for ISO. Also, nice username.
-
@wayne-workman Thanks.
I did see that. Is there a way to do it not using the memdisk/iso method?
Excuse my ignorance on the topic, but comparing it to what I know using SYSLINUX and say CentOS 7 for example I would have it boot using the syslinux provided kernel and initrd image and point it at the installation path via inst.repo=http//server/path which contained the contents locally of what can be viewed at this mirror (http://mirror.grid.uchicago.edu/pub/linux/centos/7/os/x86_64/)
Unless the 2 methods are more similar than I thought, the method I outlined above would not have to xfer and store in RAM the full ISO to do an install but could instead grab smaller files and then only the packages needed during install. Would that be a correct understanding or does the above really just xfer the whole thing and mount it in RAM anyway?
Is there even an equivalent method via FOG/iPXE or is memdisk/ISO the only way? Also, isnt memdisk BIOS only or does it work in UEFI?
The article however does shed some light on creating menu entries, is there a good resource specific to adding menu entries, parameter syntax, reorganizing menus, theaming/formatting them, etc?
Ill read over the article more closely and evaluate it further. I of course will keep searching and reading (or re-reading) as much of the wiki as I can.
Thanks!
-
Also where would I be placing the install media? From the article it seems like it all goes under /var/…
However the install directions mentioned creating a partition called ‘images’ which I presumed was where the bulk of the data would go.
Ive got 2x 300GB SSD RAID 1 for OS (/, home, var, etc) and 6x 600GB HDD in RAID 5 (called “data”) mounted to /images. Should I have instead mounted var to the “data” array and placed a folder inside it for /images?
I guess I am a little unclear on if the various paths FOG uses are hard coded thus requiring careful partitioning or if they are variables that can be set to the desired dev’s partitions.
Thanks
-
@zer0cool I’m not the best guy to ask all this of, but @Sebastian-Roth or @george1421 would be very knowledgeable on the topic. What I can tell you is that you can use the ISO method, you can use an NFS filesystem, you can even use an HTTP filesystem if the kernel your booting allows for it, or you could load everything into RAM from an init and kernel like FOS does now. The configurations for all these things are very different - and the configurations for each individual thing you are trying to boot is usually very differnet from the next. There is not one way to do it all, you will most likely be forced at some point to use some particular method for one and not another.
-
@zer0cool said in Using FOG as Multi-Arch/Distro PXE Server?:
Also where would I be placing the install media?
Its really up to you where this stuff lives. The stuff in the article just shows a couple of ways, of course these can be changed to fit your needs.
-
@wayne-workman said in Using FOG as Multi-Arch/Distro PXE Server?:
There is not one way to do it all
Yep thats what I found with PXE/SYSLINUX, it all worked fine with 1 arch or 1 distro but was very messy when combining. With syslinux it just became apparent it was never going to be possible to overcome the issues.
Ill do more research myself as well.
As for the paths, I am just unsure how I would go about deciding and setting where things live. I found in the storage paths for image and ftp which do both point to my /images mount, which is good. Do I just place my ISO’s and/or installation files in this directory, are they treated as “images” or is that reserved for images captured from a machine?
Sorry I know its alot of newb questions, just trying to wrap my head around the gaps in the documentation (or things I have overlooked)
-
@zer0cool said in Using FOG as Multi-Arch/Distro PXE Server?:
Do I just place my ISO’s and/or installation files in this directory, are they treated as “images” or is that reserved for images captured from a machine?
You certainly can put things into /images if you like. The only potential problem with this is if you create an actual FOG image of the exact name of a directory you previously created in the /images directory. In that case, the directory would probably get deleted & recreated.
-
I did this:
Put your images in the http server – for me I made a new folder for ISOs /var/www/fog/iso
Then enable plugins and the tasktypeedit plugin.
Once enabled make a new task and add this to the kernel parameters:
&& imgfree && initrd http://${fog-ip}/fog/isos/<name of iso you want to boot> && chain memdisk iso raw
Now when fog runs the script to load the fog kernel after it loads it frees the existing initrd image and loads the your ISO instead.
Now you can boot to ISO via the tasking system.
This is a very rudimentary task and so it won’t mark itself as complete – I am working on fleshing it out so it will. In the meantime you will need to manually remove the task after boot.
-
@fishfox While I find your post quite interesting I reckon it is just making it more complicated in this case here. I wouldn’t go down that road myself.
@Zer0Cool As you already know most boot ISOs are a bit different and there is no simple solution for all of them. A lot do work using the memdisk but it’s causing trouble often enough.
I guess you might find this quite helpful: https://github.com/tianocore/tianocore.github.io/wiki/Configuring-PXE-Boot-Servers-for-UEFI