Are you tired of constantly swapping CD ROMS when you install?
There is a way to avoid this and in the process generally make your installs a bit faster, at the expense of some disk space.
# mkdir /mnt/iso # mount -t iso9660 -o loop,ro image.iso /mnt/iso # cd /mnt/iso # ls -lR media | less
1st you need IMAGES of your installation CDs. If you downloaded ISO images from a mirror/bittorrent then you're all set, thats all you need. If you have actual CDs then all you need is to use the 'dd' command to copy them. Note this is going to use disk space equal to the size of your images, about 2 gigs for a 3 CD disk set, or 4 gigs for a full 6 CD set of 10.1 Powerpack. These days thats pretty trivial but if you have an older system...
So, if you need to make images from CDs, just do this:
dd if=/dev/cdrom of=mdk10.1off-pwrpack.cd1.iso
That should make a copy of the 1st disk, just repeat for the others. Naturally your cdrom drive may be 'elsewhere' than /dev/cdrom (esp if you have more than one). One way to find it is look at the fstab file, it may be scary gibberish, but in there you should find a line with something like '/mnt/cdrom' or maybe '/mnt/cdrom2' in it, the 1st item on that line of the file should be a device starting with /dev, just use that, it should work1.1
Once you have your disk images, I suggest putting them somewhere easy to find, like /var/images perhaps. Make them readable by everyone, though really only root probably needs access...
Next once you have copies of all your disks you will need to mount them. That just makes the files available. We're just going to pretend that you have CDs still, so we will just 'loopback mount' the disk images you have. The easiest way to do this is to manually edit the file /etc/fstab. Make a copy of it first, then go ahead and load the thing up in 'kwrite' (or whatever, no editor flame wars here...). We're just going to add lines similar to the following to the file:
/var/images/mdk10.1off-pwrpack.cd1.iso /mnt/cd1 iso9660 loop 0 0 /var/images/mdk10.1off-pwrpack.cd2.iso /mnt/cd2 iso9660 loop 0 0 /var/images/mdk10.1off-pwrpack.cd3.iso /mnt/cd3 iso9660 loop 0 0 /var/images/mdk10.1off-pwrpack.cd4.iso /mnt/cd4 iso9660 loop 0 0 /var/images/mdk10.1off-pwrpack.cd5.iso /mnt/cd5 iso9660 loop 0 0 /var/images/mdk10.1off-pwrpack.cd6.iso /mnt/cd6 iso9660 loop 0 0
Now we need mount points for these, which are going to be /mnt/cd1 etc. So in a root console you need to create those directories, like thus:
mkdir /mnt/cd1
Etc.
NOTE: The exact disks you have, their number, and what the image files are named depends on you and on your exact distribution.
At this point you should try mounting these cds, from your command line just try:
mount /mnt/cd1
and go ahead and try the others, you should end up with each mount point containing the contents of the original CD the image was made from. If you get errors or you have nothing in /mnt/cd1 after you mount it then you'll need to go back and make sure everything is set up right. Its easy to make typos in the fstab file especially.
Finally you can update your urpmi media database. The easiest way to do that (unless you are a GUI luddite) is to run rpmdrake and choose to 'manage media'. Over the last few versions of Mandrake this has chaned only slightly, the basic concept is always the same. There will be a list of 'media', we are only interested in the ones with 'cdrom' somewhere in their names. Generally they look something like 'installation CD 1 (cdrom1)'. The only part of the name we care about is 'CD 1' which tells us that this part of Mandrake Linux is physically located on the disk image for CD 1. Now you will want to select one of these. Ignore any that are named 'update_source' or 'mirror.something'. For the rest select them one at a time and click on the 'edit' button to the right. You'll get a dialog box with 2 text fields, one labelled 'URL' and the other (usually) 'Relative path to synthesis/hdlist', we will change both of them. Probably the URL is now something like 'removable:/mnt/cdrom/media/main', change it to read '/mnt/cd1/media/main' (the part after 'cdrom' may vary but we don't change that part anyway). The 'Relative path' will always get changed in the same way, it should currently look like '../../something', we want to make it look like '../../../cd1/something' (IE we're always adding a '../cd1/' in before 'something' (which again varies from one releast to another, it will be some kind of file path ending with '.cz' usually).
For each disk do the same, always adding in your '../cd1/' (no it isn't 'cd2' on cdrom 2...). and clicking 'save changes'. You should get a message about 'updating media' and after a short time you're back at 'Media Manager' ready to do the next one. Note that some CDs have several sets of media on them, especially if you have a powerpack edition1.1
Note I've run into a few machines where this part just goes wrong for obscure reasons. You'll get one of a variety of errors. _Usually_ an error at this point means you mistyped something. Once in a while though urpmi somehow gets confused and just doesn't accept media updates. You can try doing them from the command line, (man urpmi.addmedia) or find someone smarter than me to tell you how to fix it1.1
Once all your media have been updated you should no longer ever have to put a CD in the drive again1.1 When you install software it will just get installed with no more annoying 'put in cd 1, put in cd 3, put in cd 2...' and you no longer need to fear the sinking feeling you get when cd 2 is lost and your best buddy borrowed your USB cdrom drive...
Versão a mostrar 1.9 last modified by Arkub on 06/01/2006 at 18:26