Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
I downloaded tow iso files of RedHat7.1 and recorded them to two CDs. Now in Windows they look like this:
G:\a\seawolf-i386-disc1.iso
G:\b\seawolf-i386-disc2.iso
What I am confused is that how to mount them in Linux to see the extracted files rather than iso files? I use "mount /dev/cdrom /mnt/cdrom" but see /mnt/cdrom/a/sea~1.iso or /mnt/cdrom/b/sea~2.iso. I want to see the .rpm files so that I can install some RPMs I need. What parameter(s) should be added to the mount command? Looking forward to your response and support.
Oh, it's really a pity! And now what should I do? Shall I find software to extract iso file in Linux just like isobuster or winimage for Windows? Or shall I extract the files in Windows first and then mount the windows partition?If yes, these two CDs mean nothing to me from now on.
All was not lost. As a tip for the future you could have mounted the iso image onto a directory after you mounted the cd-rom with:
mount -o loop /mnt/cdrom/seawolf-i386-disc1.iso /somemountpoint
cd into /somemountpoint and you will see the contents of the iso image. This would have be ok for your situation where you were looking to get some rpms for a running linux system. Don't use those cds as coasters just yet. Someone else can still use those rpms if they use the above command!
I got it. "mount /dev/cdrom /mnt/cdrom" first, and then "mount /mnt/cdrom/a/seawolf-i386-disc1.iso /mnt/rh71". Now I can see the RPMs in /mnt/rh71. Thank u, ccapoccia. But on more question: why cant I use "mount -o loop /dev/cdrom/a/seawolf-i386-disc1.iso /mnt/rh71"? When I do this I get an error message that /dev/cdrom/a/seawolf-i386-disc1.iso is no a directory.
The error message you received that /dev/cdrom/a/seawolf-i386-disc1.iso is not a directory is correct. The file /dev/cdrom is a symbolic link to the block special file that represents your cd-rom drive (Probably something like /dev/hdb). /dev/cdrom and the file it is linked to do not contain the files on the cdrom you may have mounted with a "mount /dev/cdrom". The files on the media are accessible via the mount point, which is normally /mnt/cdrom. So if you want to mount a file on the cdrom you'll have write the pathname to that file from the device's mount point. For this reason
mount -o loop /dev/cdrom/a/seawolf-i386-disc1.iso /mnt/rh71
won't work, because there really is no file (or directory for that matter) named /dev/cdrom/a/seawolf-i386-disc1.iso. Instead try:
mount -o loop /mnt/cdrom/a/seawolf-i386-disc1.iso /mnt/rh71
Of course do this after you have already mounted the cdrom.
But, you seem to have it working already so mounting via the loop device doesn't seem necessary. I quite surprised actually. I've never been able to mount an iso image without the loop option, but we might be using different versions of the mount command.
Thanks again, ccapoccia. And now I seem to have a sense of the difference between "device file" and "ordinarily file" in Linux. Linux is so distinct from Windows!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.