[RESOLVED]Kickstart and 3rd repository

General support questions
Post Reply
kmleonix
Posts: 3
Joined: 2015/10/02 15:35:48

[RESOLVED]Kickstart and 3rd repository

Post by kmleonix » 2015/10/02 17:59:41

Hi,

I'm trying to install a CentOS 7 via PXE and a kickstart file with a addon repository.
To do so, i first created a directory 'CENTOS70-64' with a complete copy of the contents of the CentOS-7-x86_64-DVD-1503-01.iso (with .treeinfo and .discinfo)
I wrote a kickstart with a minimal installation (@core), and it works like a charm!

Then, i tried to add a new repository 'updates', which contains some homemade RPMs, but this doesn't work.
I created a directory 'CENTOS70-64/updates', added my RPMs and did a 'createrepo updates'
A subdirectory 'repodata' has been created with the usual repomd.xml and the 3 others xml.gz files.

I updated the previous kickstart by adding the new repo and added a package named 'prod-utils' which is located in 'updates'.
Unfortunately, the rpm is not found, and the installation is interrupted.

Here are the kickstart used

Code: Select all

install
url --url http://192.168.100.1/CENTOS70-64
repo --name="CentOS 7 x86_64 Update" --baseurl=http://192.168.100.1/CENTOS70-64/updates
lang en_US
keyboard fr
rootpw --iscrypted $xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
reboot
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone UTC
network --hostname=centos7
skipx
text
bootloader --location=mbr --append="rhgb quiet"
clearpart --all --initlabel
part /boot --fstype ext3 --size=200
part / --fstype ext3 --size=6000
part /tmp --fstype ext3 --fsoptions=nodev,nosuid --size=100
part /var --fstype ext3 --size=500
part /var/log --fstype ext3 --size=500
part swap --fstype swap --size=100
part /home --fstype ext3 --size=500 --fsoptions=nodev --grow

%packages
@core
prod-utils
%end

%post --interpreter /bin/bash
%end

We can see the server accessing to the 'updates' repository in the httpd log

Code: Select all

[02/Oct/2015:18:21:46 +0200] "GET /CENTOS70-64/.treeinfo HTTP/1.1" 200 1109
[02/Oct/2015:18:21:46 +0200] "GET /CENTOS70-64/LiveOS/squashfs.img HTTP/1.1" 200 288174080
[02/Oct/2015:18:21:53 +0200] "GET /CENTOS70-64/images/updates.img HTTP/1.1" 404 307
[02/Oct/2015:18:21:53 +0200] "GET /CENTOS70-64/images/product.img HTTP/1.1" 404 307
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/.treeinfo HTTP/1.1" 200 1109
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/repodata/repomd.xml HTTP/1.1" 200 3732
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/.treeinfo HTTP/1.1" 200 1109
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/updates/repodata/repomd.xml HTTP/1.1" 200 951
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/updates/.treeinfo HTTP/1.1" 404 306
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/updates/treeinfo HTTP/1.1" 404 305
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/repodata/bdfd37b128ce895899df488764fee463d589986ba41fc399b5766865961a4ea4-primary.xml.gz HTTP/1.1" 200 1383625
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/repodata/0e6e90965f55146ba5025ea450f822d1bb0267d0299ef64dd4365825e6bad995-c7-x86_64-comps.xml.gz HTTP/1.1" 200 157580
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/updates/repodata/primary.xml.gz HTTP/1.1" 200 448584
[02/Oct/2015:18:22:24 +0200] "GET /CENTOS70-64/repodata/0fb2b626d7c1358e95936fb4f0087696b010caaafc27ec0f3942b299d2c3c8c1-primary.sqlite.bz2 HTTP/1.1" 200 2858319

I tested the following in %post, and the package was installed normally.
- creation of a /etc/yum.repos.d/updates.repo configuration file.
- yum -y install prod-utils
So, the repository 'updates' sound good.

The package 'prod-utils' is not signed, so i tested with a CentOS 7 RPM which is not in the DVD. (compat-libstdc++-33)
But same behaviour...

I put in the 'updates' repository the latest kernel version, and the server has been installed with the default kernel.

Here is an extract of the /var/log/anaconda/

Code: Select all

15:56:43,022 DEBUG packaging: adding yum repo anaconda with baseurl http://192.168.100.1/CENTOS70-64 and mirrorlist None
15:56:43,028 DEBUG packaging: retrieving treeinfo from http://192.168.100.1/CENTOS70-64 (proxy:  ; sslverify: True)
15:56:43,034 DEBUG packaging: adding yum repo CentOS 7 x86_64 Updates with baseurl http://192.168.100.1/CENTOS70-64/updates and mirrorlist None
15:56:43,037 DEBUG packaging: retrieving treeinfo from http://192.168.100.1/CENTOS70-64/updates (proxy:  ; sslverify: True)
15:56:43,040 INFO packaging: Error downloading treeinfo: [Errno 14] HTTP Error 404 - Not Found
15:56:43,040 DEBUG packaging: disabling repo C7.0.1406-base
15:56:43,040 DEBUG packaging: disabling repo C7.0.1406-updates
15:56:43,040 DEBUG packaging: disabling repo fasttrack
15:56:43,040 DEBUG packaging: disabling repo C7.0.1406-centosplus
15:56:43,041 DEBUG packaging: disabling repo C7.0.1406-extras
15:56:43,041 DEBUG packaging: disabling repo base
15:56:43,041 DEBUG packaging: disabling repo C7.0.1406-fasttrack
15:56:43,041 DEBUG packaging: disabling repo updates
15:56:43,041 DEBUG packaging: disabling repo cr
15:56:43,041 DEBUG packaging: disabling repo centosplus
15:56:43,042 DEBUG packaging: disabling repo extras
15:56:43,042 DEBUG packaging: Updating payload thread state: 4
15:56:43,042 INFO packaging: gathering repo metadata
15:56:43,042 DEBUG packaging: getting repo metadata for anaconda
15:56:43,083 DEBUG packaging: getting group info for anaconda
15:56:43,098 DEBUG packaging: getting repo metadata for CentOS 7 x86_64 Updates
15:56:43,110 DEBUG packaging: getting group info for CentOS 7 x86_64 Updates
15:56:43,110 ERR packaging: failed to get groups for repo CentOS 7 x86_64 Updates
15:56:43,111 INFO packaging: metadata retrieval complete
15:56:43,111 DEBUG packaging: deleting package sacks
15:56:43,114 DEBUG yum.verbose.YumBase: Setting up Package Sacks
15:56:43,115 INFO_2 yum.verbose.plugin: Determining fastest mirrors
15:56:44,463 DEBUG yum.verbose.YumBase: pkgsack time: 1.349
15:56:44,522 DEBUG yum.verbose.YumBase: group time: 1.408
15:56:44,523 DEBUG packaging: Updating payload thread state: 5
15:56:47,523 DEBUG packaging: deleting package sacks
15:57:03,424 WARN packaging: Platform group platform-vmware not available.
15:57:03,425 DEBUG packaging: writing repository file /tmp/yum.repos.d/CentOS 7 x86_64 Updates.repo for repository CentOS 7 x86_64 Updates
15:57:03,425 DEBUG packaging: writing repository file /tmp/yum.repos.d/anaconda.repo for repository anaconda
15:57:03,426 DEBUG packaging: configuring langpacks for ['en_US.UTF-8']
15:57:03,427 DEBUG packaging: setting releasever to previous value of 7
...
15:57:03,905 DEBUG packaging: select package prod-utils
15:57:03,918 DEBUG yum.verbose.YumBase: Checking for virtual provide or file-provide for prod-utils
In fact, it is like the repository 'updates' exists, but is completely ignored during the installation.
I certainly missed something for sure, but i have no idea where :(

Thank you in advance for you help!
Last edited by kmleonix on 2015/10/02 19:58:55, edited 1 time in total.

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

Re: Kickstart and 3rd repository

Post by TrevorH » 2015/10/02 19:19:43

Don't put spaces in the repo name.
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

kmleonix
Posts: 3
Joined: 2015/10/02 15:35:48

Re: Kickstart and 3rd repository

Post by kmleonix » 2015/10/02 19:58:30

Thank you very much Mr TrevorH! it works!!!

Post Reply