PXI Image menu on new installation
-
@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.
-
@george1421 Yes thanks, I am fine with mysql commands, been doing it for far too many years!
Just as an aside - do you know anything about the imageSize column ?
-
@waveydavey The imagesize column is for information only. That is(was) populated when an image was uploaded to the fog server. I seem to recall there is now a fog agent that will (on interval) update that field with current values. But again its not used for any operational function inside fog, its only for display.
-
@george1421 Having spoken to a colleague yesterday evening we have come to the (not unsurprising) conclusion that life is too short to do battle with 20 old images that are very unlikely to be used much.
Four images of our most used builds should probably address 95% of our needs, so we will just grab those 4 machines, image them on to the new fog server, and commence from there. It’s really not worth losing sleep and brain cells to take the obscure images any further.I now need to decide whether to drop the database and reinstall fog, or just delete all test images, and start with an empty set of images.
-
@george1421 Any idea how to mark this post/topic solved ?