LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-15-2007, 04:15 AM   #1
cheezmode
LQ Newbie
 
Registered: Feb 2007
Location: Kenya
Distribution: slackware
Posts: 19

Rep: Reputation: 0
Problem with configuring yum to use DVD


First i created a Yum repository from your my DVD:

# mkdir -p /Fedora/myrepo
# chcon -t mnt_t /Fedora/myrepo

Inserted the fedora DVD, changed to the Fedora/RPMs
directory, and entered:

# rpm -Uvh dvd/Fedora/RPMS/createrepo*
# createrepo -vpo /Fedora/myrepo /mnt/cdrom/Fedora/RPMS/


2.I configured Yum to use the DVD

Edited /etc/yum.repos.d/fedora-core.repo
file and commented out the lines starting with baseurl or mirrorlist.
Lastly,I added:

baseurl=file:///mnt/cdrom

I can remove software but when I tryu to install I get something like this error:

failed to retrieve Fedora/RPMS/joe-3.4-3.i386.rpm from core
error was [Errno 4] IOError: <urlopen error unknown url type: media



my fedora-core.repo in yum.repos.d folder looks as follows:

[core]
name=Fedora Core $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-$releasever&arch=$basearch
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[core-debuginfo]
name=Fedora Core $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/debug/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[core-source]
name=Fedora Core $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/source/SRPMS/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-source-$releasever&arch=$basearch
#baseurl=file:///mnt/cdrom/
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY



any suggestions? what am i doing wrong? I followed the instructions from the fedora dvd.
 
Old 03-15-2007, 06:54 AM   #2
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,

/Fedora/myrepo is ur path,i think
try as

baseurl=file:///Fedora/myrepo

regards,
Nirmal Tom.
 
Old 03-17-2007, 04:42 AM   #3
cheezmode
LQ Newbie
 
Registered: Feb 2007
Location: Kenya
Distribution: slackware
Posts: 19

Original Poster
Rep: Reputation: 0
Talking thanks

thanks man... will try it out ASAP
 
Old 03-17-2007, 06:46 AM   #4
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
To use installation DVD as repo for YUM

1. create a .repo file in /etc/yum.repos.d, called fc6dvd.repo
(su && gedit /etc/yum.repos.d/fc6dvd.repo)
copy paste following in that file
Code:
[fc6dvd]
name=Fedora Core 6 Installation DVD
baseurl=file:///media/disk
enabled=1
gpgkey=file:///media/disk/RPM-GPG-KEY
gpgcheck=1

## baseurl : give the path where the repodata folder exists
## gpgkey : give path of folder where RPM-GPG-KEY exists
save and run yum
 
Old 03-23-2007, 12:40 AM   #5
cheezmode
LQ Newbie
 
Registered: Feb 2007
Location: Kenya
Distribution: slackware
Posts: 19

Original Poster
Rep: Reputation: 0
still not working

Hey! thanks for your reply. But it is still not working. I now get a message like: cannot open/read repomd.xml from fc6dvd.
First I used the repodata folder in the dvd and then i created my own using the createrepo -o /myrepo /mnt/cdrom/Fedora/RPMS command
I get the same error message.

Then one more thing: what do mean by runing yum?
Thanks
 
Old 03-23-2007, 02:22 AM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Just to clarify

What sn68 said, is to give the complete path to the DVD in baseurl, which should be something like this:

Quote:
/media/FC-6\ x86_64\ DVD/Fedora/RPMS/
For GPG-KEY it should be something like this:

Quote:
/media/FC-6\ x86_64\ DVD/RPM-GPG-KEY
"Run yum" = Go ahead and install with yum, it should install from the DVD. Also, I have x86_64, to get the exact path, put the DVD in the drive, change directory to "me" and hit Tab on the keyboard and bash will complete the word "media", then type "F" and again hit Tab and bash will complete the rest, etc. etc. Then copy & past that command into the file ns68 suggests.

Last edited by Junior Hacker; 03-23-2007 at 02:28 AM.
 
Old 03-23-2007, 02:31 AM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
You may have to chage the "RPMS" in baseurl to "repodata". As there is a folder by that name in there which has the repomd.xml

Last edited by Junior Hacker; 03-23-2007 at 02:32 AM.
 
Old 03-25-2007, 02:17 AM   #8
cheezmode
LQ Newbie
 
Registered: Feb 2007
Location: Kenya
Distribution: slackware
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks man.. will try it out and get back to you...
 
Old 03-29-2007, 12:13 AM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
You can't install packages from DVD/CDs. i thought Fedora Team will sort out this problem in FC6. They didn't.
Solution : For installing Packages from DVD

Put '#' sign before first baseurl line in three files fedora-core.repo, fedora-extras.repo and fedora-updates.repo in folder /etc/yum.repos.d

#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
add new line below it.
Code:
baseurl=file:///media/disk

---- create a folder 'disk' in /media
Code:
mkdir /media/disk

---- insert Fedora Core DVD and mount it
Code:
mount /dev/hdc /media/disk

---- clean 'yum' cache.
Code:
yum clean all


click on Add/Remove Softwares and install packages from DVD. for installing from internet again, put '#' sign before disk's 'baseurl' line and remove '#' before original 'baseurl' line.

quoted from: http://www.linuxforums.org/forum/red...ugs-fixes.html
 
Old 03-30-2007, 12:43 AM   #10
kizersouzay
Member
 
Registered: Jul 2005
Location: Manchester, UK
Distribution: Slackware 14.2
Posts: 58

Rep: Reputation: 15
Well I tried all the suggestions in this post but none of them work.
I am getting the same errno4.
cheezmode did u had any luck!
 
Old 03-30-2007, 02:11 AM   #11
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
All other threads with similar questions seem to suggest same thing jay73 points out. In that example they use the disk drive that the disc is in, --> /dev/hdc

Maybe the device you are using is not /dev/hdc, my disc drives are hda & hdb because I have sata hard drive.

http://www.linuxquestions.org/questi...%27s+yum+repos

Last edited by Junior Hacker; 03-30-2007 at 02:18 AM.
 
Old 03-30-2007, 05:51 AM   #12
kizersouzay
Member
 
Registered: Jul 2005
Location: Manchester, UK
Distribution: Slackware 14.2
Posts: 58

Rep: Reputation: 15
Quote:
Originally Posted by Junior Hacker
All other threads with similar questions seem to suggest same thing jay73 points out. In that example they use the disk drive that the disc is in, --> /dev/hdc

Maybe the device you are using is not /dev/hdc, my disc drives are hda & hdb because I have sata hard drive.

http://www.linuxquestions.org/questi...%27s+yum+repos
Thats not the problem junior
I always mount it manually and on my laptop its at /dev/hdc
 
Old 03-30-2007, 06:16 AM   #13
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
K

Just figured I'd mention it just in case. I remember a couple months ago, someone asked the same question and one of the moderators posted a link to a tutorial that did not resemble any I've seen here lately as I searched for that particular thread. Be damned if I could find it, maybe if I get time I'll backtrack in the Fedora forum. It must have been a good one as the thread starter only replied "Thanks".
 
Old 03-30-2007, 10:06 AM   #14
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Hmm, I remember installing extra packages from dvd when I was still using FC5. As the "recommended" procedure does not appear to work, I did a hunt for the little notebook I made myself at the time. This is what it says:

replace first url line in each file with media disk:
url file:///media/disk

I don't think I had to explicitly mount the disk but I guess that was only because it was automounted.

Note the difference: "url" instead of "baseurl". This did work for me back then but for all I know FC6 may have its own procedure that none of us have been able to figure out yet.

Also make sure that ALL internet repositories are disabled; as long as one is not, yum will try to find it and stumble over it.

Last edited by jay73; 03-30-2007 at 10:10 AM.
 
Old 03-30-2007, 11:18 PM   #15
kizersouzay
Member
 
Registered: Jul 2005
Location: Manchester, UK
Distribution: Slackware 14.2
Posts: 58

Rep: Reputation: 15
Ok finally i was able to solve this problem.
Here is the procedure.u need root privileges probably caz i was logged in as root.

1- Copy every thing from you dvd to a folder on your hard drive. say /FC6DVD

Code:
$mkdir /FC6DVD/
$mount /dev/hdc /mnt/cdrom
$cp -R /mnt/cdrom/* /FC6DVD/
2-now use the "createrepo" to make a new reposirory.Make sure use the same directory where your rmps are stored.

Code:
$createrepo -vp -g /FC6DVD/repodata/comps.xml /FC6dVD/Fedora/RPMS
This took almost 5 minutes on my notebook.The "comps.xml" file is used to keep track of groups of packages in yum/pirut.if that is not used u will not get the fancy grouping in yum/pirut

3-now edit the /etc/ yum.repos.d/fedora-core.repo file.
it should look something like this.


Code:
[fc6dvd]
name=Fedora Core 6 Installation DVD
baseurl=file:///FC6DVD/Fedora/RPMS
enabled=1
gpgkey=file:///FC6DVD/RPM-GPG-KEY
gpgcheck=1
4-now clean yum's previous cache

Code:
$yum clean all
5-Run pirut from the GNOME menu by clicking Add/Remove Programs.and it will work good now

Now as far as the above procedure is concerned , it looks similar to the methods posted by others.I think the only diference is that "yum" wants the /repodat/ directory to be at the same place where your rpms are store if u look at the /FC6DVD/Fedora/RPMS directory /repodata/ directory is now created.
Or
May be the repodata directory available on your DVD media is not compatible with your system.Caz it was created somewhere else

The downside is that u have to give ~4gb of hard drive space to save the DVD on your system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring YUM for automatic updates msteiner Linux - Server 2 02-19-2007 11:35 AM
problem configuring of yum Gogul Linux - Software 2 05-19-2006 02:28 PM
Configuring YUM taborekle Fedora 3 02-23-2006 01:35 PM
need help configuring yum with gpg keys dcdbutler Linux - Newbie 0 02-01-2005 06:54 PM
help configuring yum J0sep Fedora 1 01-13-2005 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration