Auto install from bootable USB, yum update failure

General support questions
Post Reply
mgillow
Posts: 5
Joined: 2015/08/26 18:55:45

Auto install from bootable USB, yum update failure

Post by mgillow » 2015/08/26 19:57:48

Newbie, so please be merciful.
I inherited an installation project. We create a bootable USB to install 6.5 (minimal) with no user interaction. Everything works except the attempt to run yum update as the last thing in ks.cfg. It fails with PYCURL 6, “Couldn’t resolve host ‘mirrorlist.centos.org’”. After restarting the machine and logging in as root, however, yum update works just fine. I would really like to get the update done during the automated install.

We use the following line in ks.cfg:
network --onboot yes --device eth0 --bootproto dhcp --noipv6

I put ifconfig just above the yum update command to confirm that the machine had a viable IP address before the attempt - it does.

Suggestions on how to troubleshoot/resolve? -Thanks

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Auto install from bootable USB, yum update failure

Post by aks » 2015/08/27 04:34:43

You can log the output of the kickstart pre and post commands (see documentation). I'm guessing at the time of that installation the curl part of yum was attempting to connect to the node over IPv6 and assuming you don't have a working IPv6 connection to the Internet that's what is making it fail.
Perhaps set the IPv6 instance to link local only before the bit that runs yum update or set the hostname statically in /etc/hosts and remove the entry prior to completion?
Otherwise, please post a little more detail.

mgillow
Posts: 5
Joined: 2015/08/26 18:55:45

Re: Auto install from bootable USB, yum update failure

Post by mgillow » 2015/08/28 15:54:11

Ifconfig was showing that I was getting an IPv6 adress. I had read that the –noipv6 switch didn’t work and confirmed using ifconfig before the yum call. I tried disabling IPv6 by using these lines before the update call:
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
and confirmed with ifconfig that I no longer had an IPv6 address. Didn’t change the end result. I suspect from other reading that perhaps at that point it is using the loopback adapter for the nameserver, but I did not do any further testing to confirm that suspicion.

Ultimately I bailed on trying to run yum update during the install but rather set up a script to run it on the post-install reboot and then disable itself so that it doesn’t run on every boot. The advantage for me is that I can re-enable that script with chkconfig before I shut down the unit for extended storage and it will automatically update the next time I power it up.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Auto install from bootable USB, yum update failure

Post by TrevorH » 2015/08/29 22:34:43

Please please please do not roll out 6.5. It's 2 years old (give or take) and has unfixed security vulnerabilities. You should be using 6.7. And running yum update.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply