Interactive Kickstart

Brad Smith usernamenumber at gmail.com
Fri Jul 30 18:19:58 UTC 2004


Could you elaborate on what you've tried and why it didn't work?

Some ideas that come to mind (note that I haven't actually tried any
of these, but they _should_ work...

Add something like this to the %post section:
--------
# Get the last octet of the IP. There's probably a better way but this one works
NUM=$(ifconfig |grep "inet addr" | head -n1 |cut -d: -f2 |cut -d' '
-f1 | cut -d. -f4)

# Set a unique hostname (eg 'computer8')
HOSTNAME="computer$NUM"

# Make it persistent across reboots
sed 's/HOSTNAME=.*/HOSTNAME=$HOSTNAME/' /etc/sysconfig/network
--------

Or...

If you're using dhcp you can configure hostnames by MAC address (in dhcpd.conf):

host foo {
                option host-name "foo.mydomain.com";
                # Make this the machine's MAC addr
                hardware ethernet 00:09:6B:BF:06:C8;
        }

Or....

You can write (or have someone write) a CGI script that generates a
kickstart file with a unique hostname (or takes one as an argument)
and then just install systems with:

linux ks=http://url.to.cgi.script?optional_hostname=foo

Hope this helps
--Brad

On Wed, 28 Jul 2004 12:54:43 -0400 (EDT), listman at popeye.myvnc.com
<listman at popeye.myvnc.com> wrote:
> I have setup a network kickstart using a nfs share from a fedora 2
> machine. It works fine, but I want to have it stop and ask for a hostname
> for the particular machine that is being installed now.
> 
> I have seen some suggestions in the archives here and more by googling,
> but I can never get any of them to work. Does anyone know how to make it
> work with fedora core 2?
> 
> Thanks,
> Steve
> 
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>





More information about the fedora-list mailing list