Bug 392021 - Impossible to use non-predefined static ip adresses with kickstart
Impossible to use non-predefined static ip adresses with kickstart
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-11-20 07:12 EST by Olivier Galibert
Modified: 2010-05-18 04:56 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-21 00:03:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Olivier Galibert 2007-11-20 07:12:09 EST
Description of problem:

If you use a kickstart file, the dhcp/manual selection dialog is skipped and
dhcp is used always.  There is no way to provide a static ip address at install

Version-Release number of selected component (if applicable):

How reproducible:

100%.  See loader2/net.c:781 and ponder the consequences.

Steps to Reproduce:
1. Create a boot cd/usb key with boot.iso and a kickstart file with no network
information in it
2. Boot on it
3. See loader2 trying dhcp in a loop without asking
Actual results:

Mandatory DHCP.

Expected results:

Static ip dialog possible to reach.

Additional info:

Static IP is a fact of life.  Some people don't feel like adding possible points
of failure.
Comment 1 Olivier Galibert 2007-11-20 08:38:35 EST
It also happily ignored a:
network --bootproto=static --device=eth0 --ip=
--netmask= --gateway= --nameserver=

I've just added in ks.cfg.  Joy.
Comment 2 Jeremy Katz 2007-11-20 11:20:50 EST
How are you grabbing your kickstart config?  If over the network, then it's
always been a matter of you either use DHCP or you pass all of the ip=, etc
flags on the kernel command line.
Comment 3 Olivier Galibert 2007-11-20 11:27:16 EST
In the initrd:
 default vfc8i64
 append initrd=ifc8i64.img text reiserfs ks=file:/ks.cfg
Comment 4 Matthew West 2007-12-12 19:11:49 EST
This change is stopping us from upgrading the machines in my lab using kickstart
as we've done since the Fedora 1 days. We boot with IP=... on the commandline
and fetch the ks.cfg from a webserver.

I don't control the network and can't run a DHCP server accessible by all lab
machines, so this is a major inconvenience. It's always worked so well! Now it's
back to hand-installs for us.
Comment 5 David Jansen 2007-12-13 06:43:09 EST
Similar problem here: when a system needs to be reinstalled (computer lab, or OS
upgrade), I have a script that creates a kickstart file on disk, copies the
installer kernel and initrd, and adds an entry to grub.conf, then reboots to
this installer. Worked like a charm in previous versions, but with Fedora 8, I'm
stuck on the fact that it always requires dhcp.

Is this a design decission to drop support for everything but dhcp? If so, why
isn't it in the release notes? If not, what is to be done about it?
Comment 6 Matteo Faleschini 2007-12-18 20:08:17 EST
I'm using a workaround.
In loader.c - doLoaderMain - case STEP_IFACE
I commented out this row:
loaderData->ipinfo_set = 0;

I did it because in net.c - setupNetworkDeviceConfig
network options are copied to netDev structure only of ipinfo_set != 0

I have the impression that kickstart loading process sets this variable to 1 and
only AFTER this, loader inits this variable to 0 overwriting kickstart static
Comment 7 peter gal 2008-01-21 01:18:52 EST
I tested Matteo Faleschini's workaround, and I rebuilt "boot.iso" from the F8
installer DVD ISO image (ie: images/boot.iso).  It works every time.  I now have
several shiny new F8 nodes whirring away.
Comment 8 David Jansen 2008-05-15 06:25:24 EDT
Same bug existst in Fedora 9, but it seems the workaround from Comment #6 no
longer does the trick
Comment 9 Christoph Dworzak 2008-05-23 13:20:40 EDT
I think this bug was introduced by the patch for BUG #233152.
Comment 10 Andy Lindeberg 2008-06-03 14:39:33 EDT
Moving this to F9 bugs as the workaround for F8 no longer works.
Comment 11 Gustavo Maciel Dias Vieira 2008-07-23 19:38:34 EDT
I can confirm this bug is present in F9. Also, this seems related to bug #451711 
Comment 12 David Cantrell 2008-10-14 23:40:28 EDT
I think I've fixed this in anaconda's git repo.  The next build of anaconda (anaconda- will have the fix.  That that version appears in the rawhide tree, please test if you can.

The functionality prior to Fedora 8 has been restored.  If you specify ks= and give it a network location, but do not specify IP configuration parameters, anaconda assumes DHCP.  Likewise, if you specify ks= as a network location and specify ip=, netmask=, gateway=, and so on, anaconda will configure the interface with those parameters and DHCP is never run.

network lines in kickstart files work as well, at least in my local tests.  I need you guys to test rawhide once anaconda- lands in rawhide.

Thanks for all the reports.
Comment 13 Olivier Galibert 2008-12-01 07:42:00 EST
The functionality prior to Fedora 8 is not restored.  In F10 it is impossible to avoid dhcp when doing a nfs install from a non-predefined static ip.

I have an equivalent of boot.iso on a usb key, with a kickstart file added in the initrd.  The kickstart file includes:

nfs --server=m19.limsi.fr --dir=/corpora-backup/system/%%REPO%%

  not "network" line -> dhcp
  network bootproto=static -> dhcp
  network bootproto=ask -> error window, then dhcp, then error windows again then reboot
  network bootproto=query -> error window, then dhcp, then error windows again then reboot
  network bootproto=static ip=.... -> static ip used

Is there something I can put in my kickstart file so that I get asked for what I want and I don't have a dhcp systematically done?

Comment 14 David Cantrell 2009-02-21 00:03:01 EST
I performed an installation of rawhide under the following conditions:

1) Booted using boot.iso
2) Put my kickstart file on a USB jumpdrive and passed ks=hd:sdc1:/ks.cfg on the boot line.
3) Removed the 'network' line from my kickstart file.

Installation proceeds as expected and the interface is not brought up via DHCP.  I am prompted to configure the network interface when it gets to package selection.
Comment 15 Marcus Moeller 2010-01-28 10:39:04 EST
Same on RHEL 5.4

Best Regards
Comment 16 Felipe Pereira 2010-02-03 16:54:57 EST
Is there a boot image one could use to install RHEL 5 with kickstart from network and static IP?
Comment 17 Magnus Glantz 2010-05-06 11:28:27 EDT
Again verified on RHEL 5.4.

Note You need to log in before you can comment on or make changes to this bug.