UNSOLVED FOG Deployed Image Grub hangs "starting cmain()"

  • Hi all,

    We have some oldish Jetway Mini-Top 700 that support uefi, if its relevant. We imaged one of these devices installed with Ubuntu 18.04. Upon reboot of the machine that was imaged, PXE boot is first tried, and instead of successfully booting from the hard disk we get the following:

    launching grub
    begin pxe scan
    start cmain()

    And the device hangs. We can turn off pxe boot in the bios and the device that was imaged can then boot without issue. However any machine who has the image of this device deployed hangs at the grub prompt even if we turn pxe boot off in the bios. It seems to completely ignore the bios setting.

    We tried reinstall grub off a live ubs on the deloyed machines figuring it was easier than trying to reinstall them but no matter what we tried the grub prompt hangs. It looks like the devices are still getting hte pxe image from fog and trying to boo the hard disk but failing. As stated they shouldn’t even try network boot as we turned it off in the bios. Very odd.

    Any ideas?

  • Senior Developer

    @mxc In the second video I don’t see the client PXE booting at all?!? Maybe I get you wrong?

    In the first video it looks like a legacy BIOS PXE boot (not UEFI). Try different boot exit style settings for BIOS (and maybe UEFI just in case)…

  • @Sebastian-Roth Ok here is a video of the original machine that was imaged showing when it tries to boot from pxe. I have been unable to get the video from a machine that has had this image deployed to it as they are busy being used in training at the moment but the video below is pretty much what happens to them as well. Its odd because the pxe boot that is used to copy the image to the server works without problems.


    This is what it looks like if the hard disk is the first boot device. On the machines that have had the image deployed, they just end up pxe booting. Will try and see about adding a uefi entry once the training is over.


    Sorry had to use links due to file size limit. I might be the boot option as you suggested so will play around with that when we get the time and check the uefi entry.

  • thanks @Sebastian-Roth will do a video capture and test the machines tomorrow. I will try changing the exit options to test the result too. I did change those setting from the default so maybe that is the issue. Although when the image was deployed to a different type of hardware device it didn’t give any issues. UEFI definitely sounds like it could be an issue in this scenario.

  • Senior Developer

    @mxc As far as I know those messages posted are specific to grub4dos which we use as one way to boot from disk after PXE boot. GRUB2 being installed as part of Ubuntu 18.04 does not print those messages I am very much sure. I just grep-ed through the whole GRUB2 source code and couldn’t find any of those strings. So I am very much sure the messages are coming from grub4dos.

    Can you take a video of the boot process of a client that was imaged and has PXE boot turned off? Are you absolutely sure it’s booting straight from disk and not some other source? Maybe there is a USB stick plugged in that has some kind of live Linux using grub4dos?!

    By the way, you know that we have different exit styles in FOG. There are different ways to hand over to boot from hard disk after PXE booting. One is the GRUB way but you can try simple EXIT or SANBOOT as well. There is a global config for this in the FOG settings as well as a host specific setting.

    EDIT: Just found this thread in the forums. Sounds kind of similar. Reading that I am wondering if your machines are all in the same mode (UEFI or legacy BIOS)? There is one thing FOG still is not able to do when cloning UEFI machines: It does not capture and deploy UEFI boot entries. So if machines are all UEFI you still might need to add an UEFI boot entry on the deployed system by hand (live Linux in UEFI mode - efibootmgr command).