PDA

View Full Version : Problem with kickstart and network interface


Phoenix946
18th August 2011, 03:47 PM
Hey all,

I've been having major issues with creating my own spin of a restore image and installing it automatically with a kickstart file through USB, but I'm almost there. I have just one more issue to resolve, and I have been googling like crazy but failing to find a similar problem, so I figured I'd make my own thread. *prays no one provides 5 links with the same problem*

Here are the steps I've done so far:
1. Create an ISO using pungi with the packages I want.
2. Put it on a USB stick with unetbootin.
3. Create a kickstart file.
4. Modify syslinux.cfg on the USB stick so that it loads the kickstart file.
5. Put the ISO on the USB stick as well.

See the attachment for the kickstart file.

The issue is in line 2: harddrive --partition=sdb1 --dir=/images/install.img
sdb1 is the USB stick that I put the ISO on.

This causes anaconda to find the install.img file, but later in the process require me to configure a network interface. I don't want this. The undesired workaround is to not define the location of install.img (i.e. --dir=.), which causes anaconda to provide an error finding the image. I can then (manually, which is why it is undesired) specify that the medium is a hard drive and the partition is /dev/sdb1. Anaconda can then find it and proceed normally, without having to configure a network configuration.

Can anyone tell me what is going on here and how I can get anaconda to find the image automatically and not require a network interface configuration? Thanks a million in advance!

thumper109
24th August 2011, 04:17 AM
Have you tried just putting a bogus network config in to prevent anaconda trying to configure the network?

IE:


network --bootproto=static --ip=10.0.0.1 --netmask=255.255.255.0 \
--gateway=10.0.0.1 --nameserver=10.0.0.1


The doco I have seen says if anacona does not see a network command in the kickstart file, it will assume that eth0 will be configured dynamically. As such it will try to configure it. If you give a bogus static config, hopefully anaconda will not try to configure the net itself.

You can then de-config or re-config the interface in your %post script.

Just speculating. Haven't tried it myself.

Phoenix946
24th August 2011, 06:49 AM

Hey thumper, thanks a lot for your reply.

I had tried that yes, but unfortunately that provided errors for the configuration for some reason that I could not find out about.

However, when I played around with some other settings in the kickstart file, this issue all of a sudden got fixed! I specifically remember changing the bootloader into this:

bootloader --location=mbr --driveorder=sda --append="rhgb quiet"

but I have no proof that is actually what fixed it.

Anyway, this thread can be closed. Thanks again :)