[DONE](re)adding cdrom media

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[DONE](re)adding cdrom media

Postby santo » Oct 14th, '16, 14:03

Hi all,
in the process of updating an old mirror I run urpmi.removemedia -a which has deleted the installation CD from the media list...is there a way to reinstate the CDROM?
I tried :
urpmi.addmedia cdrom removable://<path> to the cdrom ...it is mounted as /media/Mageia-5-x86_64 so:

urpmi.addmedia cdrom removable://media/Mageia-5-x86_64

but it does not work...

It is not so importan as I dono think I will be using it until Mageia6 is out, still it bothers me...
:-)

TIA

santo
Last edited by santo on Oct 15th, '16, 04:01, edited 1 time in total.
santo
 
Posts: 40
Joined: Oct 7th, '14, 13:24

Re: (re)adding cdrom media

Postby doktor5000 » Oct 14th, '16, 17:26

Hi there, you were pretty close but removable:// is not a generic protocol, and you were missing another / where the path starts. You would need to either only use the absolute path without protocol which still works but you should use file:// protocol followed by the path. See also https://wiki.mageia.org/en/Software_man ... al_sources on how to do that via MCC.
If you want to do it via CLI then also check https://wiki.mageia.org/en/URPMI#urpmi.addmedia
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: (re)adding cdrom media

Postby benmc » Oct 15th, '16, 00:05

If you have the spare HDD space, you can also extract (using something like Ark) the Mageia-5-x86_64.iso onto your HDD and use that instead of the physical DVD.
Then use the "add a custom medium" option (under "file") on the "Configure media sources for install and update" tab.
benmc
 
Posts: 1214
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

[DONE]Re: (re)adding cdrom media

Postby santo » Oct 15th, '16, 04:01

doktor5000 wrote:Hi there, you were pretty close but removable:// is not a generic protocol, and you were missing another / where the path starts. You would need to either only use the absolute path without protocol which still works but you should use file:// protocol followed by the path. See also https://wiki.mageia.org/en/Software_man ... al_sources on how to do that via MCC.
If you want to do it via CLI then also check https://wiki.mageia.org/en/URPMI#urpmi.addmedia


Grazie...you are a genius...I check on internet everywhere an no one has a clear explanation how to do this...at least I could not find it...file:// and the third / did the trick...I also must say that I always understoo the absolute path to be that of the CD and not of the 'core' and 'nonfree' directories where the *rpms are stored...anyway this is what did the trick just in case lurker need to find it...

Code: Select all
[root@localhost /]# urpmi.addmedia  cdrom  file:///run/media/santo/Mageia-5-x86_64/x86_64/media/core

[root@localhost /]# urpmi.addmedia  cdrom1  file:///run/media/santo/Mageia-5-x86_64/x86_64/media/nonfree


p.ps
I could hae named insyead of cdrom and cdrom1 'core' and 'nonfree' but ...
:-D
Thank you a lot...

santo
Last edited by doktor5000 on Oct 18th, '16, 03:15, edited 1 time in total.
Reason: added code tags
santo
 
Posts: 40
Joined: Oct 7th, '14, 13:24

Re: (re)adding cdrom media

Postby santo » Oct 15th, '16, 04:04

benmc wrote:If you have the spare HDD space, you can also extract (using something like Ark) the Mageia-5-x86_64.iso onto your HDD and use that instead of the physical DVD.
Then use the "add a custom medium" option (under "file") on the "Configure media sources for install and update" tab.


Yes, this is what I am planning to do with Mageia 6...now the issue was finding a solution to this problem
I do not like to leave them behind unsolved...
:-)

Thanks for answering
santo
 
Posts: 40
Joined: Oct 7th, '14, 13:24

Re: [DONE]Re: (re)adding cdrom media

Postby doktor5000 » Oct 18th, '16, 03:16

santo wrote:I check on internet everywhere an no one has a clear explanation how to do this...at least I could not find it...file:// and the third / did the trick...

No need to check all of the internet, just need to read either the man page or the documentation on our wiki.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [DONE]Re: (re)adding cdrom media

Postby santo » Oct 18th, '16, 08:39

doktor5000 wrote:
santo wrote:I check on internet everywhere an no one has a clear explanation how to do this...at least I could not find it...file:// and the third / did the trick...

No need to check all of the internet, just need to read either the man page or the documentation on our wiki.


...yes, now I am aware of that...in fact it was helpful...stange that on Internet one can not find such an explanation...I have found a few post of user asking exactly the same question but in no tread there was a final answer.
The Man page ...yes I read it...I am not well versed in Linux even though I have been using Linux since my first computer I still consider myself a newbie...the man page is difficult and in any case I choose removable://also thinking I understoo the man page...
Thanks
santo
santo
 
Posts: 40
Joined: Oct 7th, '14, 13:24

Re: [DONE]Re: (re)adding cdrom media

Postby doktor5000 » Oct 18th, '16, 16:50

santo wrote:stange that on Internet one can not find such an explanation...I have found a few post of user asking exactly the same question but in no tread there was a final answer.

Not sure what you searched for, but a query for urpmi.addmedia documentation turns up the linked wiki page as the topmost result: https://www.google.de/search?q=urpmi.addmedia+documentation
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [DONE]Re: (re)adding cdrom media

Postby santo » Oct 18th, '16, 17:19

doktor5000 wrote:
santo wrote:stange that on Internet one can not find such an explanation...I have found a few post of user asking exactly the same question but in no tread there was a final answer.

Not sure what you searched for, but a query for urpmi.addmedia documentation turns up the linked wiki page as the topmost result: https://www.google.de/search?q=urpmi.addmedia+documentation


...again, yes you are right, but unless I was specifically told that the right protocol to use is file:// and not removable:// - as I found on other sites - I would have never been able to understand that file:// was the right protocol to use...when I say that I am a newbie please understand that it means that for people like me to read certain pages is not so obvious...
e.g.
I would have needed an explanation of this type:

urpmi.addmedia local_rpms file://home/uid/RPMS/

urpmi.addmedia = urpmi command

local_rpm = this can be any name you want to give to the cd device

file:// = protocol to be used to add the cd device

/home/uid/RPMS = absolute path to the directory in the CD, were the rpms are stored

Please notice that if I had put this path ( as in the Mageia wiki...) it would have never worked as the full absolute path is :
/run/home/uid/RPMS...and not /home/uid/RPMS...

...also there should be three / not two as reported in the Mageia wiki so the Mageia wiki should be corrected to

urpmi.addmedia local_rpm file:///run/media/uid/RPMS

...is it not?
;-)

thank you again for your help...
santo
santo
 
Posts: 40
Joined: Oct 7th, '14, 13:24

Re: [DONE](re)adding cdrom media

Postby doktor5000 » Oct 18th, '16, 22:53

Well, this is exactly what the man page explains. Let me quote the relevant parts, right at the top:

SYNOPSIS
urpmi.addmedia [options] <name> <url>

[...]
DESCRIPTION
urpmi.addmedia is used to add a new media to be used by urpmi, so it can find new rpms at the specified location. Currently supported media types are: local drives, removable drives (such as CDs), and networked media via different protocols (http, ftp, ssh and rsync). One of the following modes must be chosen:
[...]
urpmi.addmedia [options] <name> file://<path>
where <name> is a human-readable name for the new media (e.g. ``local updates''). <path> is the location of the media directory on your machine (e.g. "media/main").
urpmi.addmedia [options] <name> removable://<path>
<path> is the location of the media directory on your machine when the removable device is mounted. This works for removable drives, but also for ISO images mounted on a loop device. urpmi will then be able to re-mount the ISO image to the specified path (but the ISO image must be mounted when you run "urpmi.addmedia").


And for the last field, as it indicates this needs to be a URL, check https://en.wikipedia.org/wiki/Uniform_Resource_Locator
The protocol/scheme belongs to the URL, and the man page lists the supported protocols including examples for most of them.

For the question about the path following the protocol, not sure but that might be some sort of convenience function if it also works with a missing / for the path, same way as you still can omit file:// protocol for local paths.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [DONE](re)adding cdrom media

Postby santo » Oct 19th, '16, 02:58

Now that I did it, everything seems clear and understandable...but when I read the man page I can assure it was not...mind you I am not criticising the man pages, I am sure that they are as clear and simple as they can be...but when one lack the technical knowledge/jargon to understand, sometime they are intimidating...

thks
santo
santo
 
Posts: 40
Joined: Oct 7th, '14, 13:24


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest