Page 1 of 1

PXE install + kickstart --> CentOS-Base.repo ?

Posted: 2014/12/11 15:58:02
by kalki70
Hello,

I am configuring a server for PXE install + kickstart, to install several other systems in an unattended way. So far it works, just one thing.
After a system boots and install automatically from my boot server, the CentOS-Base.repo has the standard contents pointing to mirrors on the web, for instance :
CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$ ... ch&repo=os
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
...etc..

I don't want this, I want the repo file in my installed system to point to my own server, not to the mirrors. Something like:
baseurl=http://myserver/centos/7/x86_64

Please don't tell me "go to /etc/yum.repos.d, edit the files...". The idea is that after installation the new systems have already the right configuration, without manual intervention. I have many systems to install.

Thanks,

Luis

Re: PXE install + kickstart --> CentOS-Base.repo ?

Posted: 2014/12/11 16:16:26
by gerald_clark
Create and install your own repo files in %post.

Re: PXE install + kickstart --> CentOS-Base.repo ?

Posted: 2014/12/11 17:36:47
by TrevorH
Look at things like puppet which can automate system configuration post-install.

Re: PXE install + kickstart --> CentOS-Base.repo ?

Posted: 2014/12/11 17:48:06
by MoonWolf
You may build your own version of centos-release RPM and either install it in kickstart or create your own repository and put it there.

Re: PXE install + kickstart --> CentOS-Base.repo ?

Posted: 2014/12/11 18:07:22
by TrevorH
Better not to name is centos-release. If you need to edit the files to disable the repos then a new centos-release comes along then the edited files will not be replaced. A differently named package will not conflict later on.

Re: PXE install + kickstart --> CentOS-Base.repo ?

Posted: 2014/12/11 19:18:58
by kalki70
Hello,

Thansk to all for the answers. When I wrote the question I did not know in which rpm the repo files were, I found that after some googling. In Redhat it is a redhat-yumconf something.
I was starting to modify that rpm and create my own repodata, but using the post installating script from the kickstart sounds much better, I will use that.

Thanks again!