4

I want to add the original ISO I installed RHEL from as a repository under the Add/Remove Software tool in Gnome.

How do I do this?

To clarify, I know what I need to do (add a repository) - I need the how. I have been unsuccessful in determining the correct string to put in the location field in the Gnome applet. Currently I have file:///media/rhel/Server/repodata. I have tried pointing directly to the XML file in that directory, the parent directory, its parent, and in variations with more and less slashes in the path.

Update: I found http://www.cyberciti.biz/tips/redhat-centos-fedora-linux-setup-repo.html, which has directions for creating the repository manually - but I don't see why this should be needed if the repomd.xml file is already on the DVD.

warren
  • 18,369
  • 23
  • 84
  • 135

2 Answers2

5

Hey after searching around I was able to find a better understanding answer to this problem.

Make a mount point for your iso:

mkdir /mnt/pen

Mount the OS installation iso like normal:

mount -o loop rhel.iso /mnt/pen/

Create a details entry for your repository (add a file in the /etc/yum.repos.d directory e.g. rhel.repo):

[rhel-cd]

name=Red Hat OS CD

baseurl=file:///mnt/pen/Server

enabled=1

gpgcheck=0

Clean your cache:

yum clean all

You should now have your repository visible in Add/Remove Programs.

NOTE: You might want to consider automounting your iso.

dboolbe
  • 66
  • 1
  • 2
2

Loopmount the iso under /mnt, then add a .repo file in /etc/yum.repos.d whose baseurl points to the mountpoint.

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
  • Ignacio - that is the "what", which I know (see original question): I need the "how". Specifically, I am trying to do this with the Gnome "Add/Remove Software" applet. I've added to the question to clarify. – warren Jul 01 '10 at 13:02
  • The correct path is the one that contains the `repodata/` directory. yum looks for its presence in order to find the repo data. – Ignacio Vazquez-Abrams Jul 01 '10 at 14:46
  • That is the path I've been trying to add (`/media/rhel/Server/repodata`). The error kicked-back from the applet is "Cannot retrieve repository metadata (repomd.xml) for repository: DVD. Please verify its path and try again." – warren Jul 01 '10 at 17:00
  • Contains. Not is. As in, use `/media/rhel/Server`. – Ignacio Vazquez-Abrams Jul 02 '10 at 04:03
  • :-\ tried that too, still getting the same error :( – warren Jul 02 '10 at 14:21
  • I think I'll just not worry about it and use `rpm -i` manually.. but it would be nice for it to "just work" (or to be "just setup" like it is with CentOS and all you have to do is enable the line) – warren Jul 02 '10 at 14:21