Re: Manual network config, fetch tcp/ip setup from stage1 in stage2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erling Ringen Elvsrud wrote:
Supplying ip config on the kernel options might work,
but I would prefer nice dialog interfaces.

Anaconda and kickstart have improved a lot in the 7 or 8 years I've been using them, but this question of how to allow for just the static ip configuration at kickstart time continues to come up over and over and over. Currently, your best bet is to forget about having a nice dialog interface, and go with the kernel options at the boot prompt. As you've seen, the dialogs are just plain broken for this purpose, and can result in an incomplete configuration afterward (no hostname in /etc/sysconfig/network and only a localhost entry in /etc/hosts).

Since you are already creating your own boot iso and targets therein, you can include the parameters that are unlikely to vary. Assuming you know the dns server and netmask and possibly the gateway, the user may only have to append "ip=<ip_address>" to the target name, which is even easier than going through the dialogs. E.g.:

label one
  kernel vmlinuz
append initrd=initrd.img text nofb gateway=1.2.3.1 dns=1.2.3.4 netmask=255.255.255.0 ks=url_of_ks_file method=url_of_satellite

label two
  kernel vmlinuz
append initrd=initrd.img text nofb dns=1.2.3.1 netmask=255.255.255.0 ks=url_of_ks_file method=url_of_satellite

Using target one, the user only needs to enter the ip, with target two, she'd have to enter ip and gateway. I haven't found it necessary to include dhcptimeout=0 using this method.

You can also provide an example or reminder in your boot.msg file to help your users know what to do at the boot prompt:

-----------------------------------------------------------------
...
Please enter one of the following:

 one ip=1.2.3.???
          OR:
 two ip=1.2.???.??? gateway=1.2.???.252

Or specify custom parameters as in this full syntax example:

linux ks=<your_url> method=<your_url> ip=1.2.xxx.yyy gateway=1.2.xxx.252 dns=1.2.3.1 netmask=255.255.255.0
-----------------------------------------------------------------

In your kickstart file, use a network line like:
network --bootproto=static --noipv6
and no other pre/post hackery is needed.

hth,
Ed




_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux