Generic questions about how to use FOG
-
Hi,
We are looking to implement FOG for managing our laboratory. All computers in the lab are from the same manufacturer with the same specs. I’ve been going through the documentation and Wiki pages to address some specific questions we have but found little information. I would appreciate your guidance on the following:
Capturing Process:
Our laboratory requires various images for different use cases, such as Windows 11 and Ubuntu 22.04. Could you please clarify the process for capturing multiple images? Do we install each operating system individually and then capture them into FOG?
Deployment to Second Disk:
When a user selects a Linux image, we want FOG to automatically deploy it to the second disk without affecting the default Windows image on the first disk. Is there a specific configuration or setting for achieving this?
Sysprep Considerations:
Our images contain user accounts that we need to retain, making Generalized Sysprep unsuitable for our needs. Does it matter if Sysprep is set to Specialized in this case? Any recommendations or best practices for our scenario?
New Menu Item Configuration:
I noticed the option to create a new menu item, but I’m unsure about configuring the parameters to correctly point to the desired image. Could you direct me to the documentation that covers the parameters and menu configuration in detail?
Thank you very much.
-
@mashina said in Generic questions about how to use FOG:
Our laboratory requires various images for different use cases, such as Windows 11 and Ubuntu 22.04. Could you please clarify the process for capturing multiple images? Do we install each operating system individually and then capture them into FOG?
FOG has several capture modes, single disk, single partition, multiple disks. In the host definition you can define to send the image to disk 1 or disk 2, but FOG is not really desined to be dynamic in the since you want to deploy windows to disk 1 and linux to disk 2. Now if you setup your golden computer with windows on disk 1 and linux on disk 2 then you would simply use the multiple disk capture model.
When a user selects a Linux image, we want FOG to automatically deploy it to the second disk without affecting the default Windows image on the first disk. Is there a specific configuration or setting for achieving this?
Basically answered that in the first question.
Our images contain user accounts that we need to retain, making Generalized Sysprep unsuitable for our needs. Does it matter if Sysprep is set to Specialized in this case? Any recommendations or best practices for our scenario?
The short answer is you should sysprep the image and Microsoft will do what Microsoft does. I suggest that any accounts that you need that get deleted by sysprep that you create them on the deployment OOBE/WinSetup side post deployment with FOG. You can use the setupcomplete.cmd batch file or create the user account in the unattend.xml file. Either way you can create user account and set default passwords.
I noticed the option to create a new menu item, but I’m unsure about configuring the parameters to correctly point to the desired image. Could you direct me to the documentation that covers the parameters and menu configuration in detail?
The creation of the ipxe menu really depends on what you are trying to accomplish. I have a tutorial on booting different types of OS installers that will give you a clue how to populate the iPXE menu builder: https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images
-
@george1421, I appreciate your prompt response, and your explanation was quite helpful.
I’m still grappling with the last question, specifically about adding a new iPXE menu entry to enable users to deploy a disk image to a particular disk.The link you shared seems to emphasize installers, correct? In my scenario, there are no installers; only disk clones.
In this discussion, you proposed certain parameters that appeared effective for other users.
kernel bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=127000 web=http://${fog-ip}/fog/ consoleblank=0 rootfstype=ext4 mac= ftp=${fog-ip} storage=${fog-ip}:/images/ storageip=${fog-ip} irqpoll chkdsk=0 capone=1 type=down img=Dell3630Base imgType=n imgPartitionType=all imgid=39 osid=9 imgFormat=5 imgfetch init.xz
I keyed these and changed the values to match my setting. Something like this:
kernel bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=275000 web=http://10.255.66.1/fog/ consoleblank=0 nvme_core.default_ps_max_latency_us=0 mac= ftp=10.255.66.1 storage=10.255.66.1:/images/ storageip=10.255.66.1 irqpoll chkdsk=0 img=Windows_11_Pro imgType=n imgPartitionType=all imgid=9 osid=9 imgFormat=5 hd=/dev/nvme1n0 imgfetch init.xz boot
I’m pretty sure I have misconfigured many of these parameters because I get this error.
Can you hep me spot my mistakes?
Thank you!
-
@mashina I’ve seen the unknown type :: null error message when booting from the usb stick and selecting deploy without a deployment task being first created on the fog server.
I think that is akin to what you are trying to do here, deploy directly from a ipxe menu without a matching deploy task be scheduled in FOG.
-
@george1421, We have an old FOG server that is configured to deploy Windows 10 images to
/dev/sda
and other images to/dev/sdb
, and it’s working as expected. Just to clarify, the users can choose which image they want from the menu and the FOG does the rest.What I’m aiming for is exactly the same as what I previously shared, and this similarity boosts my confidence that I’m not attempting something beyond FOG’s capabilities.
The only difference I’ve noticed is that my disk image is for Windows 11 and the disks are SSD (nvme). I suspect I might be missing some parameters in the menu entry. How can I make sure I’ve included all the necessary parameters correctly? The values of the URL and IDs are correct because I have copied them from the FOG debug dump.
-
@mashina Let me start with a bit of a statement and then a hacker way to go about it (1980’s hacker term not black hat term).
With FOG there is a iPXE menu… called Deploy image. This lets you start the imaging process right from the iPXE menu without having to register the computer with the FOG ui, all from the iPXE boot menu. (system rebuilders use this menu to deploy an image to a computer that will never be managed by fog, so no need to register the computer) With FOG you can have this deploy image menu display all images on the FOG server or in the case of a registered computer, only the defined image for the computer. So the options are all images or only the image that is defined for the computer. So in a way you can set it up so that the end user can redeploy the defined image or any image to the target computer.
Now working from that is possible to drive down to the actual ipxe command to deploy the image you are interested in. Understand this is all ipxe so we should be able to drive to the proper command that gives us a deployment.
-
@mashina Ok now for the hacky path.
You can view the menu program behind the fog ipxe menu by pointing your browser to
http://<fog_server_ip>/fog/service/ipxe/boot.php
in the following example I’m going to use192.168.50.23
as the fog server’s IP address.You will see that the text behind the fog server’s ipxe menu is akin to a computer program.
You will see the “Deploy Image” (old name is Quick Image or qi) menu where it calls the boot.php program once again but adds in the parameter
qihost=1
So now if we call that url again with the new parameters
http://192.168.50.23/fog/service/ipxe/boot.php?qihost=1&username=fog&password=yourpass
note you will need to enter a valid user ID and Password for your fog server to get past this menu. So in this case there are 3 parameters that need to be passed (qihost, username, password).At this next screen it will list out all of the images you have defined in fog with its image id.
Each section will look something similar to this
set imageID 1 params param mac0 ${net0/mac} param arch ${arch} param imageID ${imageID} param qihost 1 param username ${username} param password ${password} param sysuuid ${uuid} isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
Now we add the imagid to the parameters list and call the boot.php program once again.
http://192.168.50.23/fog/service/ipxe/boot.php?qihost=1&username=fog&password=yourpass&menuAccess=1&imageID=1
That will produce this menu structure similar to what you are creating in your custom ipxe menu which is bootable via iPXE.
#!ipxe set fog-ip 192.168.50.23 set fog-webroot fog set boot-url http://${fog-ip}/${fog-webroot} set storage-ip 192.168.50.23 kernel bzImage loglevel=7 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=275000 web=http://192.168.50.23/fog/ consoleblank=0 rootfstype=ext4 nvme_core.default_ps_max_latency_us=0 mac= ftp=192.168.50.23 storage=192.168.50.23:/images/ storageip=192.168.50.23 osid=9 irqpoll chkdsk=0 img=Dell3630Base imgType=n imgPartitionType=all imgid=1 imgFormat=5 capone=1 type=down imgfetch init.xz boot
So this ipxe menu then will instruct the client to boot into imaging download mode.
Now to rewrite this into fog ipxe menu params block format
set imageID 1 params param mac0 ${net0/mac} param arch ${arch} param imageID ${imageID} param qihost 1 param username fog param password yourpass param sysuuid ${uuid} isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
Now you can create multiple fog ipxe menus just use a different image ID for the image you want to deploy. You can see what these image IDs are from the FOG web UI when you look at the images in list form.