• I have an issue where I have to change the image path to get fog to work.

    If I am deploying an image I change the image path to /images/dev. If I am capturing an image I have to change the image path to /images/.

    What can I do to avoid editing the storage path everytime?

  • Moderator

    It did run as expected when I included the bash reference at the top of the copy script and changed the mode of the new fog.download script to 755.

    You should see the script run right after FOS Linux picks up an IP address. The line will start out with * Running post init scripts.......

    You should have a chance to see that message if you run the fog compatibility checker from the iPXE menu.

  • Moderator

    @pnwbsi I’m currently confirming the patch file method on a development machine.

    The first thing I see wrong is in the script I forgot #!/bin/bash to be inserted at the top of the bash script. Also to set the file mode of 755 on the patched fog.download script.

    I’ve already updated to tutorial with the missing bits.

    I’m going to pxe boot a machine in the next few minutes to make sure it does what I should.

  • Moderator

    @pnwbsi Hmmm that’s not helpful if the script is not running.

    The /bin/fog.download file is on the FOG Linux engine.

  • @george1421 I followed your instructions but I am still getting the same error page, not a different debug one. Here is the postinit script I made. I did notice that I do not have a fog.download in my bin and I saw that the script replaces that.

    #Current File in FOS Linux to be replaced
    #Patch file to send to FOS Linux virtual hard drive
    # ---------------------------------------------
    # DO NOT edit any text below this line
    # ---------------------------------------------
    . /usr/share/fog/lib/funcs.sh
    echo "Testing path for our fixed file at ${newfile}"
    # Test path and run copy if found and matched.
    if [[ -r $newfile ]]; then
        echo "Found source file preparing to copy"
        cp -f $newfile $currfile >/dev/null 2>&1
        [[ ! $? -eq 0 ]] && echo "Copy Failed" || echo "Copy Succeeded"
        echo "Failed to find file [${newfile}] sorry. Copy Failed"
    . ${postinitpath}fog.patch.man.reg
  • Moderator

    @pnwbsi I think we have a new fog.download file with some additional debugging output. This file will not fix the issue, but hopefully it will give us an idea what’s happening. We’ve identified the point in the code where it could be failing.

    I have this debug mode fog.download file here:

    What I want you to do is download this new fog.download file. Then I want you to follow these instructions to setup a postinit patch. What we are going to do is dynamically replace the current fog.download in FOS Linux with the debug patched version.


    You will follow the instructions but replace the top lines to this

    # Current File in FOS Linux to be replaced
    #Patch file to send to FOS Linux virtual hard drive

    So the testing protocol I want you to use is this:

    1. Confirm you are still getting the error in the picture about unable to mount images folder. Then power off the target computer. Don’t touch the web ui, just power off the target computer.
    2. Setup the patching environment per the tutorial
    3. Download the fog.download file from my google drive and move it into the postinit directory on the fog server.
    4. reboot the target computer
    5. When the target computer throws the error again, snap a clear picture of the debugging information. This output will help us understand why…
  • Moderator

    @pnwbsi said in Image Path Change:

    I am willing to help in anyway!

    OK I’m going to work on a patched upload file to hopefully give us a bit more details and I’m going to add in a mount delay timeout just to be sure. I should have a little time later this AM to work on it. I’ll follow up with instructions later.

  • @Sebastian-Roth @george1421 An important thing to add. I just saw that if I have the image path as /Images/Dev/ and I capture (which fails) it claims it can not find the image folder /Images/Dev/Dev. So it is adding an extra /Dev/ in there.

  • @Sebastian-Roth I am running Fog 1.5.4

  • @george1421 I am willing to help in anyway!

  • Senior Developer

    @george1421 Definitely a good idea.

    @pnwbsi Which version of FOG do you currently run?

  • Moderator

    @Sebastian-Roth Are we running into the mount timeout issue we’ve tried to debug before? I also wonder if we could add a bit more debugging information in that unable to find image store message, similar to the when the path was set incorrectly.

    Let me see if I can come up with a patched fog.upload

    @pnwbsi if you are willing to help us test this, hopefully we can squash this issue once and for all.

  • 20190815_144933.jpg

  • Senior Developer

    @pnwbsi Please run ls -al /images on your FOG server and post the full output you get here!

  • That does not change anything. Same issues occur with /images or /images/

  • Senior Developer

    @pnwbsi What happens if you set it to /images without the trailing slash?

  • Yes, sorry about that.

    Updated with pictures:
    Capturing image with image path as /images/dev/ — I receive the could not mount images folder error. PICTURE1.jpg

    Deploying image with image path as /images/ ---- I receive the unable to locate image store.

    Early on in troubleshooting I discovered that if I change the storage node image path it would work. So now I have come to find a solution to avoid changing the image path because I know I have a setting wrong somewhere in fog.

  • Senior Developer

    @pnwbsi said in Image Path Change:

    I have an issue where I have to change the image path to get fog to work.

    Maybe you want to share more information on why you got the impression you had to change the path in the first place. Please post a picture of the error you see/saw.

  • @Sebastian-Roth
    /images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
    /images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)

  • Moderator

    @pnwbsi Unless someone changed the exports command, /images/dev is exported as read-write and /images is read-only. It should not be possible to upload an image to /images.

    Would you also include a snapshot of the configuration page where the image path is defined?