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

    Custom iPXE Script / Host Inventory & ONLY Hostname

    Scheduled Pinned Locked Moved
    General
    2
    2
    467
    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.
    • P
      p4cm4n
      last edited by

      HiHi.

      I’m trying to design a workflow for a massive amount of laptops and their associated imaging.

      At the moment, SOME laptops come bundled with a sticker that has a barcode with a MAC Address. Part of my workflow integrates assigning a hostname to that MAC address, and importing the CSV into fog.

      What I’d LIKE to do is basically a Semi Host Inventory of sorts, NOT full.

      I’d like to boot to fog automatically, with simply a prompt of a hostname. The hostname is entered, RETURN is pressed, the machine restarts or shuts down (I’m not technically concerned with this but shutdown would be excellent)

      Does anyone know how to go about doing this?

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

        @p4cm4n The short answer is that its possible. What you will need to do is create a customized version of the fog.man.reg file. ref: https://github.com/FOGProject/fos/blob/master/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.man.reg

        If you know programming (helpful to understand process flow) but not maybe php you can make adjustments to this file bypassing the prompts and filling in the static details.

        Then you can use a postinit script to replace the FOG issued fog.man.reg with your custom coding.

        https://forums.fogproject.org/topic/14278/creating-custom-hostname-default-for-fog-man-reg

        The last bit I need to think about a bit. I know if the FOG server passes a parameter to FOS linux after FOG does it thing (registration, imaging, etc) it will shutdown instead of reboot. I think the parameter is shutdown=1 I think… you can also set that in your custom fog.man.reg and have FOG shutdown after taking inventory. I know you can set it at a global level, but you might only want to shutdown after registration but not imaging.

        Now I’ve worked on a few big imaging projects. I have used a custom fog.man.reg file to speed up registration. I’ve also made use of barcodes. For one project the computer name was a composite of the country, city LUN code, and then the dell serial number. In one case I created a barcode with the country and lun code (i.e. USNYC) on a bit of paper. Our workflow would be then when entering the name we would scan the paper then scan the dell asset tag on the computer and finally press enter on the keyboard, From there all of the rest of the FOG required fields were defaulted.

        Another project we didn’t register the computers with FOG because FOG would not manage them once imaged. In this workflow we used the fog ipxe menu Deploy Image. We picked the image, the image would deploy and then using a post install script the name of the computer was calculated. The country and city lun codes were calculated based on the client’s IP address and then we use dmidecode to read the dell asset tag. So once we picked deploy and the image to deploy we did not touch the computer until it was ready to move to the user’s desk.

        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 1
        • 1 / 1
        • First post
          Last post

        204

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project