Linux Imaging and Fog Client
-
Is there anyone out there who has had success with the FOG client on Linux?
And had a very easy and comprehensive way to deploy Linux images and rename them/Join them to the domain post deployment?
Please share working scripts if you have them. -
@jhumpf I don’t use the FOG client on Linux, but these are my scripts for CentOS 6:
/etc/rc.d/rc.local
:#!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local . root/ckhostname exit 0
/root/ckhostname
:#!/bin/sh network=/etc/sysconfig/network ipaddr=$(hostname -I) shostname=$(hostname) rhostname="$(dig +noall +answer +short -x $ipaddr)" rhostname=${rhostname%.} if [ "$rhostname" != "$shostname" ]; then sed -i "/^HOSTNAME=/s/=.*/=$rhostname/" "$network" hostname $rhostname fi
I plan to retire them as I’m migrating the hosts to CentOS 8.
hostname -I
may not give you what you want depending on how your system is configured, instead you can try something likeip -4 -br addr|awk -F'[ /]+' '/UP/,$0=$3'
or, more cautiously worded:ip -4 -br addr | awk '$2=="UP" {sub(/\/.*/,"",$3); print $3}'
-
Indeed, I am currently working on unattended Ubuntu Server 18.04 installation:
- deploying ubuntu server;
- updating hostname which is fetched from a local web service;
- changing password for a fixed user which is also fetched from a local web service;
- running installation script (apt-get install; pip install; and adjusting some unique per host configurations)
I am able to deploy ubuntu server, contact the local web service to generate hostnames and passwords using postdownload scripts, yet I am not able to change the password and the hostname, nor I am not able to do some final installations.
I assume that it is done by specifying the snapins, yet my /bin/bash snapin is queued, but not executed.
I’ve created a simple snapin
#!/bin/bash echo "Snapin BLAH BLAH beginning installation" > %systemdrive%\fog_snapin_install_snapinname.log echo "test" > /home/user/test.txt echo "Snapin BLAH BLAH ending installation" > %systemdrive%\fog_snapin_install_snapinname.log
I believe by being able to finish my small project I would be able to showcase something also for Linux users.
EDIT: of course I have just noticed that in order to use snapins one must install fog client on the host machine.
So my question would rather be “How do you run a script after the first boot using the deployed host OS without installing FOG Client?”
-
@jhumpf Have you tried the scripts? Can we mark this closed or do you need any further help with this?