• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Working with a custom host registration form

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    3
    628
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      ckasdf
      last edited by

      I was reading up at this forum post and the wiki article it linked. I put together a fog.man.reg file using this link provided by @george1421, but I got confused from there. I know the forum post and linked comments mention that the wiki is outdated in some areas, and I think it was suggesting I wouldn’t have to do some of the extra steps that were previously required.

      It suggests putting the file into /bin, but there isn’t already an existing file there - is that normal? The wiki also mentions the /tftboot/fog/ directory (and sub-directories) a few times, which I don’t have this one on my FOG server. Should I create it, or am I misunderstanding something?

      I seem to remember reading that I have to add the custom entry to the list of the PXE items, but I can’t seem to find how to do that, which I think is the last step I’m missing.

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        There are two ways to go about adding an updated fog.man.reg file to the running FOS image.

        1. I wrote a tutorial on how to dynamically patch this file using a postinit script. Post init scripts are scripts that are run on the FOS Linux engine just after the engine has been initialized and before the main command script is called. These post init scripts can initialize hardware or “patch” files in the FOS Linux engine (like fog.man.reg). https://forums.fogproject.org/topic/13500/dynamically-patching-fos-using-a-postinit-script

        2. The other way is to unpack the inits, modify the files and then repack the inits: https://wiki.fogproject.org/wiki/index.php/Modifying_the_Init_Image

        The main fog applications on FOS Linux are in /bin (inside the init.xz file).

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • C
          ckasdf
          last edited by

          So following the link in list item #1, I ran into some issues. I created the fog.patch.man.reg file as directed, copying the quoted text into the file and chmod’ing it to 755. Your step 4 mentions editing fog.postinit, which is a file I don’t have. I wondered if you were missing a step that indicated to run the patch script, so I ran it with # ./fog.patch.man.reg and got the following output:

          ./fog.patch.man.reg: line 12: /usr/share/fog/lib/funcs.sh: No such file or directory
          Testing path for our fixed file at fog.reg.man.fix
          ./fog.patch.man.reg: line 15: debugPause: command not found
          Failed to find file [fog.reg.man.fix] sorry. Copy Failed
          ./fog.patch.man.reg: line 26: debugPause: command not found
          

          I am thinking that my issue is possibly advice in this forum thread, which suggests that it’s safe to delete the contents of /images/dev/. The thread is from 2016, so perhaps dev gained more purpose than a temporary dumping ground for in-progress captures? I arrived at that thread some time ago, for the same reason as the OP - I was running out of disk space and found out it was because of occasionally-failing captures. Deleted the contents of the folder and everything was good again.


          Following the link to list item #2, “Using scripts” was a non-starter. I have /opt/fog, but don’t have utils within that directory. Instead, I have log, service, and snapins. I ran find -iname *image* and didn’t find FOGMountBootImage.sh in the results.

          I followed the instructions in the “By Hand” section for Version 1.0.0 and up. I had trouble running mount -o loop init{,_32} initmountdir as CentOS didn’t like that command, so I made the assumption that it was trying to mount two directories within initmountdir (init & init_32). I ran that command as such:

          mount -o loop init initmountdir/init
          mount -o loop init_32 initmountdir/init_32
          

          I then navigated to initmountdir/init{,_32}/bin and changed each fog.man.reg to the file I had created. It sort of worked after I packed everything up, in that things did change, but the registration didn’t act as expected. I entered a hostname as requested, left image ID blank and hit Enter, then it went to a blank line. I waited, but eventually hit Enter again, which then asked if I wanted to associate with groups. After that, when I hit Enter, it dropped to a new blank line, but didn’t continue the form. I possibly have a malformed file (I had a few errors along the way, fixed based on my knowledge of what was wrong). If you’d like, I can attach it. Any thoughts on some of the other issues above?

          Also, I was wondering, how would I create a new menu entry, so that my tests show up as a separate item from the primary full registration?

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          159

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project