[CentOS] Offline YUM repository setup working but yum with --installroot fails

Wade Hampton wadehamptoniv at gmail.com
Wed Dec 11 15:48:42 UTC 2013


I use a local, off-line repository for CentOS plus updates for my
development network (my setup for many years).  By design, the
repository has no physical connection to the Internet.  Everything seems
to be setup correctly and works fine for installs/updates.  However I am
trying to use the --installroot option for YUM and it is complaining
about not finding a mirror.  I removed the lines about mirror from
my CentOS repo files so I am confused.

My CentOS-Base.repo file contains:

[base]
name=CentOS-$releaseserver - Base
baseurl=http://myhost.org/yum/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

[updates]
name=CentOS-$releaseserver - Updates
baseurl=http://myhost.org/yum/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

I have RPMs from the CentOS 5.10 DVDs in a directory indexed by
createrepo.  I also have a copy of the current updates (as of Monday).
I can install and update via this configuration.

My web server has the directory tree:
  /var/www/html/yum/centos/5 -> /var/www/html/yum/centos/5.10
  /var/www/html/yum/centos/5.10/os/i386
  /var/www/html/yum/centos/5.10/updates/i386

I am testing some code to make a small, light install.  When I
run yum with --installroot, it hangs and eventually times out looking
for a mirror:

  {copy centos-release-5-10.el5.centos.i386.rpm to the current dir}
  mkdir tmpdir
  rpm --root=tmpdir -ivh --nodeps centos-release*rpm
  yum --installroot=tmpdir install basesystem filesystem bash kernel passwd

YUM hangs and eventually responds with:

Could not retrieve mirrorlist
http://mirrlist.centos/org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:  <urlopen error (-3, 'Temporary failure in name
resolution')
...

Anyone have any ideas?

Cheers,
--
Wade Hampton



More information about the CentOS mailing list