LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2002, 03:23 PM   #1
Harryc
Member
 
Registered: Dec 2002
Location: New York, USA
Distribution: OpenSUSE 10.0
Posts: 220

Rep: Reputation: 32
CDROM, CDRW Mount


Could somebody please take a look at this fstab and tell if it looks out of sorts?. I think I have something wrong here. I have a Plextor CD/RW, which I believe is cdrom1 below, and a Pioneer DVD which I believe is cdrom0 below.

fstab

/dev/hdf1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdf6 /home ext3 defaults 1 2
none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/cdrom2 supermount dev=/dev/hdh,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hde1 /mnt/win_c vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hde5 /mnt/win_d vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hdf5 swap swap defaults 0 0

======================================================================

Here's my entries in /dev

/dev/dvd (Points to /dev/cdrom)
Note: I put this one in to make DVD's play in Ogle. Everything else here was done by Mandrake install routines)

/dev/cdrom (Points to cdroms/cdrom0)

/dev/cdrom0 (Points to cdroms/cdrom0)

/dev/cdrom1 (Points to cdroms/cdrom1)

/dev/cdroms/cdrom0 (Points to ../IDE/host2/bus1/target1/lun0/cd)

/dev/cdroms/cdrom1 (Points to ../SCSI/host0/bus0/target6/lun0/cd)

The other oddity I can see is in hardware associations for the DVD drive (/dev/hdh)
new devfs device (ide/host0/bus3/target1/lun0/cd

This is odd to me because that is not the same association as cdrom0 above in /dev/cdroms/cdrom0

Honestly, a few words on what these associations do, how they work, how to test them, and what to change, delete, or fix here would also be appreciated. The distro is Mandrake 9.0
To me it looks like Linux thinks my DVD (hdh) is a floppy drive. .

Last edited by Harryc; 12-31-2002 at 03:31 PM.
 
Old 12-31-2002, 05:53 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Why? I'm not too sure what'd lead you to believe linux thinks your DVD is a floppy? Anyway, onto a bit of an explaination..

Even if linux thought your DVD was a floppy, it really wouldn't matter. Your DVD drive could be /dev/scanner for all linux cares, as long as it's pointing to the correct hardware, you can have whatever /dev entry you want.

As for what your DVD drive in your fstab is (assuming it's /dev/hdh):
Code:
none /mnt/cdrom2 supermount dev=/dev/hdh,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
After supermount the device is defined.

I wouldn't go around deleting any /dev entries though, unless you created them and wish to change where they point to.

Your plextor is going to be /dev/scd0
At least this is the case according to your fstab

And it will mount at /mnt/cdrom

The mount point is also, not something to stress on. You can mount anything with a filesystem, anywhere you want. If you wanted to mount your CDRW (/dev/scd0) at /some/location/ then all you'd have to do is have that directory exist:
mkdir -p /some/location

Then you can mount it there instead of /mnt/cdrom

Anyway, so I hope this helps you out

If you don't understand my babbling, let me know, I will be glad to clarify anything, or give a better explaination.

Cool
 
Old 01-01-2003, 04:11 AM   #3
Harryc
Member
 
Registered: Dec 2002
Location: New York, USA
Distribution: OpenSUSE 10.0
Posts: 220

Original Poster
Rep: Reputation: 32
Thanks for the reply. I think part of my confusion was viewing fstab incorrectly. It takes on a whole new meaning when viewed as only 8 lines in an editor .

PHP Code:
/dev/hdf1 ext3 defaults 1 1
none 
/dev/pts devpts mode=0620 0 0/dev/hdf6 /home ext3 defaults 1 2
none 
/mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none 
/mnt/cdrom2 supermount dev=/dev/hdh,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none 
/mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hde1 /mnt/win_c vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
/dev/hde5 /mnt/win_d vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
none 
/proc proc defaults 0 0/dev/hdf5 swap swap defaults 0 0 
I think my main confusion is with these two:

PHP Code:
none /mnt/cdrom supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0

none 
/mnt/cdrom2 supermount dev=/dev/hdh,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0 
First we have /mnt/cdrom tied to /dev/scd0, but the corresponding /dev association that I see for the Plextor is /dev/cdrom1, which points to cdroms/cdrom1. I would have thought the /dev entry would have been something like - /dev/cdrom which points to cdroms/cdrom. Or perhaps I am viewing these associations and their function incorrectly?

Also, /mnt/cdrom2 tied to /dev/hdh, but the corresponding /dev entry is /dev/cdrom0, which points to cdroms/cdrom0. Why not /dev/cdrom2, cdroms/cdrom2.
Basically, I don't see any /dev entry for cdrom2, why not and should there be one?

Last edited by Harryc; 01-01-2003 at 04:31 AM.
 
Old 01-01-2003, 05:40 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Should there be one, no not unless you want one. Again, the only important /dev entry is for the actual device itself, from there you can symlink any /dev entry you want the actual device. So let's say you want your CDRW to be your /dev/cdrom45 No problem, symlink it:
ln -s /dev/scd0 /dev/cdrom45

The actual device is the most important, from there it's just a symlink to the actual device and linux doesn't care.

As far as which directory is tied to which device, you can change that to your likings as well. If you wanted your DVD to me mounted at /mnt/cdrom6988 Then all you'd have to do is create the mount point:
mkdir /mnt/cdrom6988

Then mount the device to that directory. If you wanted this to happen everytime, you'd edit fstab to show the desired mount point.

Basically, a mount point and a device are completely seperate and have little to no relation in terms of naming. If you want though, you can easily fix that. To have your DVD (/dev/hdh) be /dev/cdrom do this:
ln -sf /dev/hdh /dev/cdrom

And you want this dev to mount at /mnt/cdrom each time, edit your /etc/fstab like so:
Code:
none /mnt/cdrom supermount dev=/dev/hdh,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
And bam! It's done.



The main thing to see here is the /dev entries have nothing to do with the mount points on your hard drive. A mount point is any given directory, usually you would want this directory to be empty.

The /dev entries are created during bootup with DevFS On other systems not using DevFS these entries are created during the initial install with a script called MAKEDEV which creates almost every device a normal user would use, and then some.

Some distros will attempt to make the /dev entries and their corresponding mount points match up, but really this is un-necessary and is up to you if you want it that way or not since it's not required.

So, from what I gather, you'd like to have some sort of naming scheme setup like that. So here's pretty much something to sort of follow:

First, decide which device you want to be your primary cdrom, I'll show it to be your DVD drive. So:
ln -sf /dev/hdh /dev/cdrom /dev/dvd
(The /dev/dvd is required by some programs, so we will just take care of that right here for ya)

Ok, so now let's edit your /etc/fstab to have it mount at /mnt/cdrom:
Code:
none /mnt/cdrom supermount dev=/dev/hdh,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
Alright, now let's setup the scsi to be your secondary:
ln -sf /dev/scd0 /dev/cdrom2 /dev/cdrw /dev/cdburner
(The /dev/cdrw and /dev/cdburner are also entries that some (maybe none, but I use em ) programs use to identify your burning drive, we will just make em here for ease later on)

Now we need to edit /etc/fstab to have it mount at /mnt/cdrom2:
Code:
none /mnt/cdrom2 supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
Alright, looks like you are all set now. Anyway, you can adjust this to your needs/desires. Take it FWIW

I hope this explaination shows how all this goes together a bit better, and shows you what you can do if you want to tailor you system to your desires.

Cool
 
Old 01-01-2003, 06:10 AM   #5
Harryc
Member
 
Registered: Dec 2002
Location: New York, USA
Distribution: OpenSUSE 10.0
Posts: 220

Original Poster
Rep: Reputation: 32
MasterC, thanks for taking the time to explain this to me. In reading your explanation and looking in the /mnt directory, I think the light went on . I had never looked at it before. Basically it is up to me on how I want to link.

Last edited by Harryc; 01-01-2003 at 06:17 AM.
 
Old 01-01-2003, 06:18 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You're welcome

Hey, my light seems to be getting brighter every day, pretty soon it will be almost as bright as the led on the front of my box telling me my hd is churning

No, but if you need any more help on this, I'll be glad to.

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can't mount CDROM/CDRW/DVDROM/FLOPPY kriidler Slackware 45 07-14-2005 06:09 PM
Setup of cdrom and cdrw - can't mount cd's? matsgl Mandriva 2 02-06-2005 09:26 PM
Changed CDROM to CDRW, Debian can't mount it bcalder01 Linux - Laptop and Netbook 9 09-12-2004 04:33 PM
re: how do I mount my cdrom-which is a cdrw ergo_sum Linux - Hardware 10 11-01-2003 05:37 AM
Mount cdrom & cdrw Ed-Slack Slackware 7 01-06-2003 12:44 AM


All times are GMT -5. The time now is 07:02 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration