DVD Repository - going crazy

General support questions
Post Reply
stevesdl
Posts: 18
Joined: 2017/09/05 17:11:15

DVD Repository - going crazy

Post by stevesdl » 2018/07/18 22:53:29

DVD repository - sometimes it finally works\ sometimes it doesn't ??? :cry:
Centos 7.4; Virtualbox 5.2 (7.4 minimal iso; also tried with 7.4 dvd iso in virtual DVD)
(I do not have any issues with http repo)
I have moved all repo files to /tmp/repos

Using su - here are my steps:
mkdir -p /repos/local

cd /etc/yum.repos.d
vi local.repo
[local]
name=The Local DVD
baseurl=file:///repos/local
enabled=1
gpgcheck=0

vi /etc/fstab
UUID=2017-09-06-10-51-00-00 /repos/local iso9660 ro,user,auto 0 0
(I have also used --> UUID=2017-09-06-10-51-00-00 /repos/local iso9660 defaults,loop 0 0) --> also with the word "defaults"

mount -a (no errors but I rarely get the "read only notification)
yum clean all && yum repolist --> all good
df -h shows mounted with correct info.

Its a crap shoot, depending on continuous bumping and removal and retry an install might work but 90% of the toime I get the following:

[root@aserver1 ~]# yum install tree
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No package tree available.
Error: Nothing to do

I cannot figure it out after hours of googling and trial and error.
Help!!

User avatar
TrevorH
Forum Moderator
Posts: 24101
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DVD Repository - going crazy

Post by TrevorH » 2018/07/18 23:03:27

Why are you doing all that? All that's required is to attach the iso to the VM then mount it on one of the directories listed in the CentOS provided /etc/yum.repos.d/CentOS-Media.repo file (or edit that file and add your own directory to the list). Then run yum --disablerepo=\* --enablerepo=c7-media update (or whatever yum operation you want instead of update). If you want this as a permanent set up then edit the repo files and change enabled=1 to 0 to disable the supplied repos and enable the c7-media repo.

You will need to use the full DVD for anything other than the minimal packages (about 200+ of them) as the iso doesn't contain much. Depending on how esoteric the packages you want are, you may even need to use the 8GB "Everything" DVD iso image.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

stevesdl
Posts: 18
Joined: 2017/09/05 17:11:15

Re: DVD Repository - going crazy

Post by stevesdl » 2018/07/19 02:01:58

Always appreciate your quick responses

It was this --> use the 8GB "Everything" DVD iso image.
Somehow when I did continuous testing, the cache was not getting cleared and even though I was using minimal iso, I am thinking the cache was maybe pointing to the 8 gb iso files? that is the only thing I can think of.

thank you
Steve

Post Reply