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


  • Moderator

    @waveydavey Topic Tools->Marked Solved

    I took care of that for you.



  • @george1421 Any idea how to mark this post/topic solved ?



  • @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.


  • Moderator

    @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 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 ?



  • @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.


  • Moderator

    @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';
    

  • Moderator

    @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.

    1. 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.
    2. 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.
    3. Now with the web ui csv export (to show the csv column format) merge the exported db table with the exported web ui file.
    4. Once you have the csv merged, remove the original images you had in the web ui export.
    5. On the 1.5.5 FOG server, then import that csv file.


  • @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.


  • Moderator

    @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 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


  • Moderator

    @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 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 ?


  • Moderator

    @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.


  • Moderator

    @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.



  • @george1421 DHCP Server is our Windows DC (unavoidably so), running Windows Server 2012R2
    Yes, we will need to support UEFI devices too.


  • Developer

    @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 (or ipxe.pxe) and UEFI boot file should be ipxe.efi


  • Moderator

    @waveydavey two quick questions back to you before I answer.

    1. What dhcp server are you using (make and model)?
    2. Do you need to support uefi based computers as well as bios?


  • @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 ?


 

502
Online

5.5k
Users

12.7k
Topics

119.4k
Posts