Name and Create an image all from pxe?

  • I run a small computer repair shop and I use Fog’s pxe menu to do various tasks (run diagnostics mostly)

    I would really like to image client machines as a fall back before doing any work. The thing is, I don’t want to leave their machine.

    My Idea is to boot into PXE, select “image this machine” and have it ask “image name?” I type it in and it reboots and just makes an image on the fog server in case I need it later.

    Of course this means I need a reverse of this as well

    “recover image” and it lists the images and I select one and it reboots and deploys the image.

    I know fog is able to do all of this. I just want it all to be done from within the pxe menu so I don’t have to go back to the management machine and set up a host and image for this one time job.

    How can this be done?

  • Awesome, Keep this thread updated with your progress

  • Moderator

    I’ll continue to hammer this out just as a learning experience. I think once FOG 0.33 comes out with partclone instead of partimiage, it may be possible to clone disks with the hidden OEM recovery partition.

  • I had looked into that but hadn’t figured out how to do it as automated as FOG can.

  • Moderator

    Maybe clonezilla, which uses a different partition cloner?

  • Well that stinks. Is there something else I can do? something like run a script that calls up and images using something like dd?

    I really like using the PXE method to do things and I would like to stick with it as much as possible.

  • Moderator

    The OEM parition causes the FOG imaging programs to crash. You’ll have to remove the OEM image in order to use FOG at all.

  • Yes they are random OEM machines. I honestly don’t care if the recovery partition is cloned. I don’t know if that helps. I just want to clone the main partition for later restoration if necessary.

  • Moderator

    One of the issues you’re going to have with random computers coming in is that the programs in FOG that are used for partition cloning do not support the OEM hidden recovery partitions.

    I’m about 40% done with modifying FOG to take an image from the PXE menu after asking a few short questions, but I’m not sure it’s worth the effort if most of your machines are going to be ones with OEM partitions, i.e. Acer, Dell, HP, Gateway, etc.

  • That would make my week. I look forward to fog .33

  • Moderator

    Quick image is for hosts that have an associated image and os already chosen, and you just want to deploy the image to that machine.

    As for your request, I’ll add it to the wish list and see if I can crank out something before FOG 0.33 comes out because I think this will be easier in FOG 0.33.

  • I understood that I would have to make a custom PXE entry. I am just not at all familiar with how to make the scripting logic work.

    I have read the wiki for both modifying the init.gz and pxe menu. Now I need to get some help with WHAT modifications to make.

    Again I am hoping to make pxe boot and give the following options:

    Take Image Now (Grabs an image of machine places it on Fog server)
    Recover Image (Takes image from Fog server places it on machine)

    The second option seems like I might be able to create a script similar to “quick image” but the first one escapes my abililities.
    And I might have gotten the intent of “quick image” messed up.

  • Moderator

    You’ll need to make this one up. Look at the wiki articles for making custom pxe menu options. It involves added the menu option with the correct parameters and then modifying the init.gz to update the fog script with your logic. link to wiki in sig…