Auto registration for unregistered hosts with Quick registration and invetory

  • I think that’s easily done in the current SVN revision.

    The newer revisions actually have a web GUI for editing the boot menu to your liking, including just quick-registering clients that aren’t registered. That’s probably the most common use for it.

  • [quote=“Tom Elliott, post: 43696, member: 7271”]I guess I’m not understanding what you’re trying to do.[/quote]
    I thought I explained it well, guess not… 😄 Simply - I want register (and deploy image to) 150 new computers without need to plug every one of them to keyboard and monitor and I want it do quickly as possible when they arrive. My idea was to plug them few at the time to power and network, boot them, they automaticaly register to FOG with inventory info, they shutdown. I add these computers to one “deploy” group , add task to this group to deploy image, power on computers, let it do its works move them to “finished” group and repeat.

    I wanted do this with clonezlilla as we did it before, but I like the idea of have them registered, with invetory, have multiple different images ready for them when needed… So I started playing with FOG.

  • [quote=“Junkhacker, post: 43692, member: 21583”]or, you could enable Fog quick registration
    fog configuration > fog settings > fog quick registration[/quote]
    I count on it. But as I understood, quick registration only helps with naming, assigning image to registering hostsetc… But you must register host normaly (choose one of registration option from FOG boot menu, manualy register it on web page, etc…) Or am I mistaken?

  • I guess I’m not understanding what you’re trying to do.

  • Developer

    or, you could enable Fog quick registration
    fog configuration > fog settings > fog quick registration

  • I think the simplest solution will be edit the php code. Thanks for offering a help, if I’ll need something I’ll use it.

  • Moderator

    I can help you with the scripting. Do you prefer setting up a DHCP server (which you will need at some point anyway) or capturing the MAC addresses via tcpdump (you’d need a capture PC)??

    Either way is a bit of extra work. DHCP pool setup or tcpdump capture, your choice… The good thing about the tcpdump solution is that you can use a laptop and walk from PC to PC, connect it straight to your laptop, capture boot it, wait for the DHCP request and off to the next…

    On the other hand editing the boot menu and quick registrating all of them seems even less work. Which ever you choose it would be wise to follow some kind of order.

    By the way, do you want to use random dynamic IPs (DHCP range) or static IPs assigned by your DHCP server?

  • Thanks. No problem to editing some php code, but wanted to avoid this kind of customization for future fog updates (they probably overide this). But will, if I dont find other solution. I thought about this when I realised the boot menu is generated by php, but dont known the system yet. So great to pointing me to right class and code.

    Regarding the computers, they will be refurbished and they will be (should be) set up to boot from network and without need to connect keyboard (as we asked for this).

    Extracting MACs from log file is option, but for me problably most complicated. But when the script is done and functional, at least the possibility of error will be lower (agains manually recording it).

  • Moderator

    Hmmm, interesting question! Concerning the default menu entry it depends on your FOG version. With 1.2.0 you’ll have to edit ‘/var/www/fog/lib/fog/BootMenu.class.php’. Find a like of code looking like this:
    [CODE]$this->defaultChoice = “choose --default fog.local --timeout $timeout target && goto ${target}\n”;[/CODE]
    Just change ‘fog.local’ to ‘fog.reginput’ (full registration) or ‘fog.reg’ (quick registration)… Save the file and boot your clients.

    With never FOG versions you can just configure the default entry in the web interface (iPXE Menu).

    I was thinking about automating your 150 new clients too. Do you buy them brand new? You probably will have to configure each and every client by hand to make it boot from network anyway, right?? If yes, you can just let it do the (quick registration) after you configured the BIOS settings…

    If they are all configured to boot from network already then you could start them one at a time (in that order you want them to be). Have your DHCP server assign IPs from a Pool at this stage. You’ll see all MAC addresses in the log file on the DHCP server. Or if you don’t want to configure a DHCP server just yet you could also use ‘tcpdump’ to capture DHCP requests and get the MACs from there. A little shell scripting can then extract those MAC addresses and generate CVS to import into FOG. We should be able to help you with that if you need assistence…