Hi James,
I am guessing that my setup is a very unusual one. I am doing all my testing of the 2.4.0 from epel-testing in my home lab (at work we still run 2.2.3). My home has AT&T Uverse, with a 2Wire 3600HGV router. The router has a built-in DHCP server, which is really awfully limited :-(
But, attempting not to be disruptive to my family members, I choose to run dnsmasq 2.63rc3 in proxy mode (the key word is pxe-service. See dnsmasq's man page at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
The result seems to be that some "magic variables" even take on the values that they should be taking (I know so; as I have a habit of using cobbler system getks --name=... and cobbler system dumpvars --name=...).
I have been unable to set static IP address in /etc/network/interfaces and desired hostname in /etc/hostname and /etc/hosts so far. I am trying to fight this intransigence of the silly 2Wire DHCP server via the 'Template Files' attribute of the system object. I should know in about another hour or so. The netbooks that I used for testing are slow like snails :-( But they use very little power...
I will let the list of my outcome.
Regards,
-- Zack
===================================================================== That's very odd, these work fine for me when using the master branch which should not be that divergent from the release24 branch currently. I'm going to be merging the signature branch in with master and release24 soon, and that branch definitely seems to work great with Ubuntu, so I'll double check for this popping up at that time.
Well, again a no go.
The following is a part of the output of cobbler system getks --name=nb1:
[...] # This command is run just before the install finishes, but when there is # still a usable /target directory. You can chroot to /target and use it # directly, or use the apt-install and in-target commands to easily install # packages and run commands in the target system. # d-i preseed/late_command string [command] d-i preseed/late_command string chroot /target sh -c ' \ \ mkdir -p `dirname /etc/hosts.new`; wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hosts.new --output-document=/etc/hosts.new; chmod 644 /etc/hosts.new; \ mkdir -p `dirname /etc/hostname.new`; wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hostname.new --output-document=/etc/hostname.new; chmod 644 /etc/hostname.new; \ mkdir -p `dirname /etc/network/interfaces.new`; wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_network_interfa... --output-document=/etc/network/interfaces.new; chmod 644 /etc/network/interfaces.new; \ /tmp/some_shell_script.sh; \ '; \
On the test cobbler server (a netbook running SL 6.3 64bit):
[root@cobbler cobbler]# pwd /srv/cobbler [root@cobbler cobbler]# ls -l total 12 -rw-r--r-- 1 root root 10 Nov 12 20:09 ub_hostname -rw-r--r-- 1 root root 311 Nov 12 19:09 ub_hosts -rw-r--r-- 1 root root 541 Nov 12 19:09 ub_static_interfaces
And, cobbler system report --name=nb1 shows that the Template Files attribute has been set:
[...] Template Files : {'/srv/cobbler/ub_static_interfaces': '/etc/network/interfaces.new', '/srv/cobbler/ub_hostname': '/etc/hostname.new', '/srv/cobbler/ub_hosts': '/etc/hosts.new'} [...]
But, the test netbook just came up, and in its /etc, I didn't see hosts.new, hostname.new. In /etc/network, I didn't see interfaces.new either :-(
Will try to use the post_run_deb to run a script and see.
Regards,
-- Zack
I really need some help. I have double-checked the cobbler system getks --name=nb1 output below using wget manually:
zackp@ws1:~$ cd /tmp zackp@ws1:/tmp$ wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hosts.new 2012-11-12 22:34:10 URL:http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hosts.new [295/295] -> "_etc_hosts.new" [1] zackp@ws1:/tmp$ cat _etc_hosts.new 127.0.0.1 localhost 192.168.1.11 nb1
# The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters zackp@ws1:/tmp$ wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hostname.new 2012-11-12 22:34:35 URL:http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hostname.new [4/4] -> "_etc_hostname.new" [1] zackp@ws1:/tmp$ cat _etc_hostname.new nb1 zackp@ws1:/tmp$ wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_network_interfa... 2012-11-12 22:34:58 URL:http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_network_interfa... [531/531] -> "_etc_network_interfaces.new" [1] zackp@ws1:/tmp$ cat _etc_network_interfaces.new # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
# The loopback network interface auto lo iface lo inet loopback
# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.11 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254 dns-nameservers 192.168.1.254
So, AFAICS, all three of them are reachable. The Cheetah template engine did its job correctly. I also believe that I followed the instructions in http://cobbler.github.com/manuals/2.2.3/5/3/1_-_Built-In_Configuration_Manag... literally.
What I would like to do is quite simple. Since the dnsmasq is not in its dhcp-authoritative mode, and the 2Wire 3600HGV is not intelligent, so I just want to copy over some templated files, and then use a script in the post_run_deb to overwrite the originals with these files with the .new ending.
But, in the newly installed test host nb1, I just can't find these files with .new ending. Is it because I misunderstood the /target and in-target somehow?
Really puzzled and would appreciated a hint or two.
Regards,
-- Zack [...]
d-i preseed/late_command string chroot /target sh -c ' \ \ mkdir -p `dirname /etc/hosts.new`; wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hosts.new --output-document=/etc/hosts.new; chmod 644 /etc/hosts.new; \ mkdir -p `dirname /etc/hostname.new`; wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hostname.new --output-document=/etc/hostname.new; chmod 644 /etc/hostname.new; \ mkdir -p `dirname /etc/network/interfaces.new`; wget -nv http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_network_interfa... --output-document=/etc/network/interfaces.new; chmod 644 /etc/network/interfaces.new; \ /tmp/some_shell_script.sh; \ '; \
[...]
cobbler@lists.fedorahosted.org