LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Very Basic Question about using a cdrom w/ Slackware (https://www.linuxquestions.org/questions/linux-newbie-8/very-basic-question-about-using-a-cdrom-w-slackware-36808/)

DZ-5 11-29-2002 11:11 AM

Very Basic Question about using a cdrom w/ Slackware
 
I have never used a linux machine before, and wanting to switch to a new OS, I installed Slackware 8.1 along side my Windows XP Pro. The dual booting went fine, but since I'm new to linux, I don't know how to view files on a disc in my cdrom. Any help would be greatly appreciated, as I need to install video drivers from cd.

Also, could someone explain what mounting is and how to do it? I tried using a command I got from slackware.org:
mount -t iso9660 -o ro /dev/cdrom /cdrom

and got the error mount point not found /cdrom or somthing like that.

I also tried: mount /cdrom and it said "/cdrom not found in fstab"

Hopefully this will be enough info for someone to help me out. Thanks a lot,

DZ-5

acid_kewpie 11-29-2002 11:19 AM

check /etc/fstab for a similar line. it might say /mnt/cdrom, although afaik /cdrom is the standard for slackware. in order to mount it fro a command line, the mount point will already need to exist.. and so...

mkdir /cdrom

then teh commadn line version should work fine.

sharper 11-29-2002 06:05 PM

/dev/cdrom /cdrom iso9660 ro,users,noauto,unhide

works with slackware 8.0

If you leave out the word users root will be the only one who can mount the drive

If you leave out noauto the system will try to mount the drive automatically when booted

The unhide shows hidden files

MasterC 11-30-2002 12:10 AM

The command you have
Quote:

Also, could someone explain what mounting is and how to do it? I tried using a command I got from slackware.org:
mount -t iso9660 -o ro /dev/cdrom /cdrom
That's how you'd mount a cd. text book answer by the way, and everyone has said it, you are just missing the mount point, here we go on a break down:

mount = this is the command, you are saying "mount this stuff"

-t = this is an option, if you type 'mount -help or mount --help you can find out more options, -t means (the first paragraph from the man mount page):
Quote:

-t vfstype
The argument following the -t is used to indicate
the file system type. The file system types which
are currently supported are: adfs, affs, autofs,
coda, coherent, cramfs, devpts, efs, ext, ext2,
ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ncpfs,
nfs, ntfs, proc, qnx4, reiserfs, romfs, smbfs,
sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, xfs,
xiafs. Note that coherent, sysv and xenix are
equivalent and that xenix and coherent will be
removed at some point in the future -- use sysv
instead. Since kernel version 2.1.21 the types ext
and xiafs do not exist anymore.
iso9660 = this is the filesystem you are telling mount to use, this is needed for linux to be able to read the disc. Most cd's are written using this filesystem. If you want to know more: man mount or man fstab

-o = this means you are going to specify more options for the mount command.

ro = this is the option you specified (which is really not necessary) and means 'read-only' for the filesystem being mounted. Now you cannot accidently write to that cd (even though you can't anway on this type of device AFAIK)

/dev/cdrom = this is the device you are mounting. It is most likely a link (symlink) to the actual device, but most distro's make these links for you to help make things a little easier. Your actual device is probably one of these:
/dev/hda
/dev/hdb
/dev/hdc
/dev/hdd

And this is determined by:
/dev/hda = Primary master
/dev/hdb = Primary Slave
/dev/hdc = Secondary Master
/dev/hdd = Secondary Slave

Then the symlink to whatever the actual device is created to /dev/cdrom so when you type:
eject /dev/cdrom or whatever it will link you to the actual device and run the function.

/cdrom = this is your mount point. It's basically an (usually) empty directory. You can mount your device(s) anywhere you'd like (with the exception of your root partition which (pretty much) has to be mounted at /

From there though, you can mount wherever you want. You just have to make the directory. So just for fun, let's say you wanted to mount your cdrom at:
/home/cd/devices/first/cdrom/device

Then you'd first need to make those directories with:
mkdir -p /home/cd/devices/first/cdrom/device

Then you can specify that in your mount command:
mount -t iso9660 /dev/cdrom /home/cd/devices/first/cdrom/device

But of course this is not normally the place to mount it. Normally it's either:
/cdrom
OR
/mnt/cdrom
So you'd first check if you have either of those directories with:
ls -l /
AND
ls -l /mnt

If either one (or both) already exist, you can mount em there (which is normal) with:
mount -t iso9660 /dev/cdrom /mnt/cdrom
OR
mount -t iso9660 /dev/cdrom /cdrom

The other really nice thing is, if you have an entry in your /etc/fstab file for this device (which you probably do) then you can mount things alot easier by just specifying the mount and mount point matching fstab. SO let's say your entry looked like this:
/dev/cdrom /mnt/cdrom iso9660 default 0 0

Then you could mount your cdrom with:
mount /mnt/cdrom

And it would mount that device at that mount point. Now, you will probably want to allow your users to mount cdrom's and to do that you'll need to change that default line to something else. Here's what I have, you can put whatever you'd like, for options see man mount:

/dev/cdrom /mnt/cdrom iso9660 noauto,users,owner,ro 0 0

What this does is allow my users to mount, but doesn't try to automount this drive during boot time.

I hope this helps, and explains a bit more than you probably wanted, but helps for other similar situations (like mounting hard drives and such).

Cool

sharper 11-30-2002 09:40 AM

A couple of additional things.

If it hasn't been mentioned you normally have to be root to mount the cd drive.

Also, it normally will not mount if there is no cd in the drive

The command I gave was the entry in etc/fstab. It probably won't work on the command line


All times are GMT -5. The time now is 03:09 PM.