How to create a fog iPXE menu entry that deploys a specific image?
-
We have fog 1.5.5 in a virtual server where we have been trying to create an iPXE menu entry from the fog management GUI to deploy a specific image on a registered host, without usernames or passwords.
What parameters should we use to make it happen?
We have found some examples from the web that we have tried but since we are pretty new with fog and iPXE, we couldn’t make them work. -
@tripleh said in How to create a fog iPXE menu entry that deploys a specific image?:
deploy a specific image on a registered host
Would this be a fog captured image or some other live installer image?
-
@george1421 It would be a fog captured image.
-
@tripleh There isn’t an easy way, but see if this route will work.
On the iPXE menu there is an option to Deploy Image. In this option it lets you select any one of a list of images on the fog server you can deploy. Out of the box it works this way. But there is an option to only display the image that is registered to that computer. So instead of a list of images displayed, FOG will only display the image associated with the host.
Will that work?We can address (bypass) the password issue in a bit.
-
@tripleh As much as I don’t like this route this method is also possible if the Deploy image route (preferred) doesn’t fit your need.
Here is the kernel parameters you can key in to a custom fog iPXE menu. You will need to decode what your desired image has and substitute in these parameters.
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
The image unique parameters that must be changed are below and where to get them from in the web ui.
img=Dell3630Base
imgType=n
imgPartitionType=all
osid=9
imgFormat=5
imgid=39
-
@george1421 Hi, thanks for the answer. We managed to get an option in the fog ipxe menu that deploys the image we want perfectly, now we have an issue with how to choose the specific drive, sda or sdb.
These are the parameters that we used: “ip=fog server ip”params param mac0 ${net0/mac} param arch ${arch} param qihost 1 kernel bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=127000 web=http://"ip"/fog/ consoleblank=0 rootfstype=ext4 mac= ftp="ip" storage="ip":/images/ storageip="ip" irqpoll chkdsk=0 capone=1 type=down img=XubuntuTesti imgType=n imgPartitionType=all imgid=32 osid=50 imgFormat=5 imgfetch init.xz boot
Any ideas how to specify the drive in which the aforementioned image deploys?
Thanks a ton for your help George! -
@tripleh said in How to create a fog iPXE menu entry that deploys a specific image?:
params
param mac0 ${net0/mac}
param arch ${arch}
param qihost 1FWIW: This information is not necessary in your ipxe menu since these are iPXE parameters and not something FOS uses.
Can you explain having 2 drives in the computer? Was your image captured in multiple disk mode or single disk where you want to select which disk to deploy to?
-
@george1421 Sorry for the late reply. The menu entry does work now. We have sda and sdb drives in our computers and wish to specify the sda drive for all the imaging with a parameter. The images are captured in single disk.
Edit: just to specify the idea behind the 2 drives. We have computers that students are using where sdb is always a Windows 10 image but the sda serves as “playground hard drive” where students can install anything they want. We intend to create premade ipxe entries for the deployment of different operating systems and can now do it thanks to your help. This sda/sdb targeting is the only thing we were left wondering about.
-
@tripleh You can define the target hard drive in the host configuration. Just define /dev/sda in the parameter. If you need to target the second hard drive then you will need to update this parameter.
-
-