Bug 392021

Summary: Impossible to use non-predefined static ip adresses with kickstart
Product: [Fedora] Fedora Reporter: Olivier Galibert <galibert>
Component: anacondaAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 10CC: chris, cristian.ciupitu, deknuydt, felmasper, gustavo, herrold, jansen, k.georgiou, lance, marcus.moeller, matteo.faleschini, mglantz, mwest, ron
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-21 05:03:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Olivier Galibert 2007-11-20 12:12:09 UTC
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
time.

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

11.3.0.50

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 13:38:35 UTC
It also happily ignored a:
network --bootproto=static --device=eth0 --ip=192.44.78.42
--netmask=255.255.255.0 --gateway=192.44.78.22 --nameserver=192.44.78.6

I've just added in ks.cfg.  Joy.


Comment 2 Jeremy Katz 2007-11-20 16:20:50 UTC
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 16:27:16 UTC
In the initrd:
 default vfc8i64
 append initrd=ifc8i64.img text reiserfs ks=file:/ks.cfg


Comment 4 Matthew West 2007-12-13 00:11:49 UTC
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 11:43:09 UTC
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-19 01:08:17 UTC
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
request.


Comment 7 peter gal 2008-01-21 06:18:52 UTC
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 10:25:24 UTC
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 17:20:40 UTC
I think this bug was introduced by the patch for BUG #233152.

Comment 10 Andy Lindeberg 2008-06-03 18:39:33 UTC
Moving this to F9 bugs as the workaround for F8 no longer works.

Comment 11 Gustavo Maciel Dias Vieira 2008-07-23 23:38:34 UTC
I can confirm this bug is present in F9. Also, this seems related to bug #451711 


Comment 12 David Cantrell 2008-10-15 03:40:28 UTC
I think I've fixed this in anaconda's git repo.  The next build of anaconda (anaconda-11.4.1.49-1) 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-11.4.1.49-1 lands in rawhide.

Thanks for all the reports.

Comment 13 Olivier Galibert 2008-12-01 12:42:00 UTC
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%%

With:
  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?

  OG.

Comment 14 David Cantrell 2009-02-21 05:03:01 UTC
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 15:39:04 UTC
Same on RHEL 5.4

Best Regards
Marcus

Comment 16 Felipe Pereira 2010-02-03 21:54:57 UTC
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 15:28:27 UTC
Again verified on RHEL 5.4.