Schedule Kickstart - hostname for system
When you schedule a kickstart for a virtualization host in the Satellite GUI, are you able to pass the name you enter there into the kickstart (as a hostname, for example), in any way?
Responses
What Fabio describe is an option that we also have used.
The method we currently use (which is bit more involved)...
- comment out the network line in your kickstart profie (on the Sat Server)
- PXE boot (or boot from ISO) and use the arrow keys to move to the kickstart you would like to use then hit TAB
- when you hit TAB the kickstart command will appear - append the following to that line
- ip=192.168.0.110 netmask=255.255.255.0 gateway=192.168.0.1 dns=192.168.0.10 hostname=mytest.mycompany.com
I believe if the IP address you provide is in DNS, it will figure out the hostname on it's own. You might also want to try
ip=dhcp hostname=mytest.mycompany.com
The part of the method we use that is bothersome for me is having to comment out the network line in your kickstart. However, if I did not do that part - it did not seem to matter what I provided at boot time, the kickstart profile would take precedence.
So - give it a try and see if it works for you. I may have a screen shot that I can attach to this thread.
## EDIT: I also should mention that we upload our own Kickstart profile (in addition to using Satellite to generate the profile). This allows a lot more flexibility, but also requires quite a bit of knowledge of what it expects for options and keywords.
## EDIT 2: I just realized that I was missing one key point in the original post - you are scheduling a Kickstart from Satellite (which we do not do). I believe there is a spot where you can pass kernel params, etc.. and that would be the spot where you put ip=<blah> netmask=<blah> etc... Now I have some homework as I am curious how you would scehdule a kickstart! ;-)
I set the hostname of a machine by setting my own variable at PXE boot time like 'THEHOSTNAME=my-servers-fqdn'. I then fetch that by sourcing /proc/cmdline (all the variables set at boot time will appear there) and process the information in my kickstart script. Something like:
# example
# in %PRE
cp /proc/cmdline /tmp/mycmdline
# in %POST NOCHROOT
. /tmp/mycmdline
hostname $THEHOSTNAME
# enf of example
Not sure how this would play out when you schedule a kickstart from RHN Satellite though..
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
