Red Hat Bugzilla – Bug 392021
Impossible to use non-predefined static ip adresses with kickstart
Last modified: 2010-05-18 04:56:42 EDT
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):
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
Static ip dialog possible to reach.
Static IP is a fact of life. Some people don't feel like adding possible points
It also happily ignored a:
network --bootproto=static --device=eth0 --ip=126.96.36.199
--netmask=255.255.255.0 --gateway=188.8.131.52 --nameserver=184.108.40.206
I've just added in ks.cfg. Joy.
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.
In the initrd:
append initrd=ifc8i64.img text reiserfs ks=file:/ks.cfg
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.
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?
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
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.
Same bug existst in Fedora 9, but it seems the workaround from Comment #6 no
longer does the trick
I think this bug was introduced by the patch for BUG #233152.
Moving this to F9 bugs as the workaround for F8 no longer works.
I can confirm this bug is present in F9. Also, this seems related to bug #451711
I think I've fixed this in anaconda's git repo. The next build of anaconda (anaconda-220.127.116.11-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-18.104.22.168-1 lands in rawhide.
Thanks for all the reports.
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?
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.
Same on RHEL 5.4
Is there a boot image one could use to install RHEL 5 with kickstart from network and static IP?
Again verified on RHEL 5.4.