PXI Image menu on new installation
-
Our fog system was getting somewhat old, so I spun up a new server (Ubuntu 16.04LTS) and got going sticking Fog on it.
All seemed to be ok - I can register machines and images, set up MAC Addresses, and start up target machines to receive Tasked images on them.
However, further testing, and comparison with the original Fog system has highlighted a problem - there seems to be no menu of system images that can be imaged out to a candidate machine.
On the old system, each image made sits in /images, and when a target machine is PXE-booted to the fog box, they are (after a short while) presented with a menu to install an image, and a list of installation images to select. Selection if these then begins the image installation process.
It is my understanding that this menu sits in /tftpboot/pxelinux.cfg/default but this file is minimally small, and knows nothing of the images in the system.
Is there any process that automagically updates this file, or is it a manual thing I need to create ? (note I inherited this fog issue - I was never part of its original setup, so I am coming at it cold).
Is there any advice for debugging the pxeboot - menu process ? Any good sample menus ?
Thanks in advance
David -
What version of FOG are you coming from? Since you are mentioning pxelinux it has to be pretty old. FOG has its own internal configuration for the iPXE boot menu.
-
Rereading your OP, are you a system integration where you will load an OS on a target computer and then never see that computer again? If so then there is a Quick Deploy (or what ever its called now) on the iPXE menu that lists all of the available images on the FOG server. In this load and go method the target computer is not registered with FOG and not managed by FOG once imaging is done (as in the case of a system rebuilder would load an image then sell the computer.)
-
@george1421 Exactly that: we ship Entry Management systems for schools, all on exactly same spec of machine (with hardware and application software updates over time, so slightly different images of course). After image installation, that machine never interact with fog again.
I would appreciate being pointed at the right area of documentation if you know of it. Thanks for your help.
-
@george1421 Original fog is 0.32. New build is 1.5.4, so quite substantially newer!
-
@waveydavey OK, so if you are acting as a system rebuilder, then all you should need to do is pxe boot a target computer to the FOG iPXE menu. From there, there is a iPXE menu called quick image or deploy image (sorry I can’t remember exactly at the moment). That will list all of the images on the FOG server that have been set to enabled. Pick the image from that menu and the target computer will be imaged. Once imaging is done, the fog server will forget about that computer since it wasn’t registered. This function works the same for registered or non-register systems. There is nothing special to tweak or adjust.
-
@george1421 What target to I need in DHCP 067 entry to be ? Current DHCP setup for fog is:
060 192.168.1.175 - PxeClient
066 192.168.1.175 - Boot Server host name
067 pxelinux.0 Bootfile name
(actually there are 2x 067 entries - the above on no policy, and ipxe7156.efi on EUFI policy)How do I 1) make the Quick / Deploy image appear, and 2) update the menu with new images as they appear ?
-
@waveydavey two quick questions back to you before I answer.
- What dhcp server are you using (make and model)?
- Do you need to support uefi based computers as well as bios?
-
@waveydavey said in PXI Image menu on new installation:
067 pxelinux.0 Bootfile name
(actually there are 2x 067 entries - the above on no policy, and ipxe7156.efi on EUFI policy)legacy BIOS boot file should be
undionly.kpxe
(oripxe.pxe
) and UEFI boot file should beipxe.efi
-
@george1421 DHCP Server is our Windows DC (unavoidably so), running Windows Server 2012R2
Yes, we will need to support UEFI devices too. -
@waveydavey said in PXI Image menu on new installation:
Windows Server 2012R2
This one of the answers I was looking for.
You can configure a windows 2012 or newer dhcp server to dynamically shift between bios and uefi boot loaders based on the type of pxe booting computer (bios/uefi). The instructions are outlined here: https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence#Using_Windows_Server_2012_.28R1_and_later.29_DHCP_Policy
We need to get the wiki updated because it references ipxe7156.efi, replace that with ipxe.efi since ipxe7156.efi is no longer shipped with FOG.
-
@waveydavey said in PXI Image menu on new installation:
How do I 1) make the Quick / Deploy image appear, and 2) update the menu with new images as they appear ?
This is all automatic now since FOG 1.3.0. You don’t need to do anything extra.
-
@george1421 It now takes me to the menu ! Hooray !
Menu shows 3 images, which corresponds to 3 entries in images table. I have a big bunch of image folders from original server - can I copy them over and add matching entries into the images table ? (Effectively a manual import)
If I do this, are there other table updates I need to make ?
Most entries in images table seem straightforward, but imageSize looks a little strange - any docs on this ? -
@waveydavey said in PXI Image menu on new installation:
Menu shows 3 images, which corresponds to 3 entries in images table. I have a big bunch of image folders from original server - can I copy them over and add matching
I would advise against updating the images table directly. The newer versions of FOG cache database tables in memory and changing the underlying tables while FOG is running could lead to database corruption.
Since you are moving from a really old version of fog to new there is not a direct import for you via the webui. BUT with that said, you should be able to export the current images you have to a csv file to see the format if the file. Then create the new entries in that exported file that represent your new images you want to add. Then finally, remove the existing lines you used as examples and upload the csv file using the web ui in the images section. Its not hard doing it this way and its quicker than adding the images by hand. Just be aware that you need to set the image type to part image not part clone. Depending on the deployment frequency, you might want to deploy the image to your hardware and then recapture it right away with FOG using partclone and zstd compression to take advantage of the better compression and faster deployment speeds over what FOG 0.30 offered.
-
@george1421 Yeah, I can’t see export on 0.32 menus. I’ll maybe try entering just one image into images table, and see what happens. Worst case I can remove the row. I will restart fog server after insert, to avoid any in-memoy caching
-
@waveydavey ok I guess if you want to do it that way. I personally wouldn’t do it that way, but what the heck. No guts no glory.
-
@george1421 To be honest, if I could see the export, I would use it. However, needs must when the devil drives, and all that. I cant see any other way available.
-
@waveydavey I started writting this on the last post but decided to give you just enough rope to…
I guess I was not clear on my suggestion. I’ll go to level 2 since you seem to be familiar with db tables.
- On the new fog server, go into the images web ui page and export your current image definitions into a csv file. This will give you the expected layout on an import.
- On your old fog server go in and do a table dump of the images table into a file. If you know the commands you should be able to do a direct export of the images table into a csv file on the fog server. Bring that export to a windows computer.
- Now with the web ui csv export (to show the csv column format) merge the exported db table with the exported web ui file.
- Once you have the csv merged, remove the original images you had in the web ui export.
- On the 1.5.5 FOG server, then import that csv file.
-
@george1421 To add a bit more information. You could use this query to export the images table into a csv file.
SELECT * FROM images INTO OUTFILE '/tmp/images.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
-
@george1421 Giving me rope could be dangerous
Ok, manually entering data with little knowledge did not work - Pxe image menu did not magically contain an extra entry, so I must have missed something.
I will try following your suggestions in some detail, and see what works.
I would like to say that I am very grateful for your generosity in helping me with this - it is very kind of you.