LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   /dev/cdrom is gone! (https://www.linuxquestions.org/questions/linux-general-1/dev-cdrom-is-gone-44654/)

Crashed_Again 02-08-2003 11:15 PM

/dev/cdrom is gone!
 
I recently got a digital camera and found a way to get the images off the camera by editing the /etc/fstab file. After adding one new line to the file my cdrom/dvd drive is not recognized anymore. After adding the new line to my fstab file it looked like this:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/fuji vfat noauto,owner,ro,user

The last line is the line I added. Now it looks like there is no reference to /dev/cdrom anymore. So I looked in the /etc/fstab.REVOKE file and this line was in there:

/dev/cdrom /mnt/cdrom auto defaults

I figured that somehow this line got taken out of the /etc/fstab file so I put it back in and tried to mount /mnt/cdrom but it said there was no such directory. So I did:

mkdir /mnt/cdrom

Okay so now it says:

special device /dev/cdrom does not exist

What happened? If I create the /dev/cdrom will it work and if so how do you create the /dev/cdrom? HELLLPPPP!

neo77777 02-08-2003 11:38 PM

Ok, well it seems like a little bit of ide-scsi might've gotten being involved, what
cdrecord -scanbus
reports? Of course if you have cdrecord installed
Secondly do you know on what channels you CD-ROM/DVD-ROM reside? Primary slave, secondray master, etc?
the devices are
/dev/hda for prim. master
/dev/hdb for prim slave
/dev/hdc for sec master
/dev/hdd for sec slave
also check if the symlink /dev/cdrom is still there
ls -l /dev/cdrom
for it to function it must point to the actual device (see above), if you played with ide-scsi emulation for your CD-ROM (it referes to setting up CD burner, do you have one btw?) then your ide device for cdrom is no longer seen by the system.
So tell us what exactly did you do to set up your camera.

Crashed_Again 02-08-2003 11:42 PM

All I did was add one new line to the /etc/fstab file. cdrecord -scanbus just shows my cdrom device:

scsibus0:
0,0,0 0) 'Toshiba' 'DVD-ROM' 'blah blah'

I never "played" with ide-scsi emulation.

PTBmilo 02-09-2003 03:10 AM

Re: /dev/cdrom is gone!
 
Quote:

Originally posted by Crashed_Again
how do you create the /dev/cdrom? HELLLPPPP! [/B]
It's really just a symlink to the actual device file.

Even if you've never played with it, you do have scsi-emulation enabled on your cd drive (otherwise it wouldn't have showed up w/ 'cdrecord -scanbus')

cd /dev
ln scd0 cdrom

Check out your /etc/lilo.conf or grub.conf file, it should say something about append="hdc=ide-scsi" or something similar. your cdrom would be /dev/hdc, but since it's a scsi drive now, it's /dev/scd0

Crashed_Again 02-09-2003 09:13 PM

Okay here are the contents of /etc/fstab

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/fuji vfat noauto,owner,ro,user
/dev/scd0 /mnt/cdrom auto defaults

Now when I plug my digital camera into the USB port and mount the /mnt/fuji I somehow lose my cdrom mount. The last line(/dev/scd0 /mnt/cdrom auto defaults) gets taken out of the /etc/fstab file and put into /etc/fstab.REVOKE. Every time I mount my digital camera I have to go back and put this line back into the /etc/fstab file and then create the symlinks. Also the /mnt/cdrom directory gets deleted as well so I have to do mkdir /mnt/cdrom everytime. Whats up with this?

Crashed_Again 02-11-2003 03:25 PM

Could someone possibly move this post to the hardware forum so that it gets the attention it deserves?

PTBmilo 02-11-2003 03:47 PM

It may be a redhat issue.... I've never had slack change fstab, delete symlinks and directories on me.

MasterC 02-11-2003 05:14 PM

More-so I believe it's a kudzu issue. Isn't kudzu's job to discover and create entries for new hardware? Turn it off and see if you find yourself in a much happier place (assuming you know your hardware better than RH ;) ).

And FYI, I really doubt it'd get more attention in hardware ;) You probably have it in the best forum for this problem, since it's not surely hardware, nor is it surely software, networking, security, or newbie. :)

Cool

Crashed_Again 02-12-2003 05:19 PM

Well now I shut kudzu off and removed it from the runlevel. Then I set up my /etc/fstab file so that it recognized the cdrom drive again. After uploading another picture from the digital camera my cdrom drive is no longer detected again. This is extremly frustrating. Please read the whole thread for more info.

MasterC 02-12-2003 05:29 PM

Ok, thanks for suggesting another read. I see at least 2 things wrong. You have no fsck/dump values. The 2 numbers at the end of each entry. For your cdrom's and camera entries, place a 0 and a 0 next to it, so it should look like this:
/dev/sda1 /mnt/fuji vfat noauto,owner,ro,user 0 0
/dev/scd0 /mnt/cdrom auto defaults 0 0

I don't know how this would cause things to be removed, however it's worth looking into since I am not sure how the revoke script works.

Cool

Crashed_Again 02-12-2003 05:41 PM

Okay how does she look now?

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/fuji vfat noauto,owner,ro,user 0 0
/dev/scd0 /mnt/cdrom auto noauto,owner,kudzu 0 0

MasterC 02-12-2003 05:43 PM

Code:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/fuji vfat noauto,owner,ro,user 0 0
/dev/scd0 /mnt/cdrom auto noauto,owner,kudzu 0 0

Code:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/sda1 /mnt/fuji vfat noauto,owner,ro,user

When compared to the original, much better :)

FYI, if scd0 is your cdrom device, you can make the symlink again for ease of use:
ln -sf /dev/scd0 /dev/cdrom

Cool

arnold 02-12-2003 08:02 PM

ahh, dear old linux -
I have a SCSI host adpater, USB card reader and use SCSI emulation for my CD. I have configured so when I boot, my SCSI drives are not mounted,

I have noticed that if I "mount" my USB reader, I can't mount/read my SCSI devices - I might have the same problem with the CD, but havent seen it.

The problem is with the modules ide-scsi and scsi_mod. The 1st guy in gets the LUN. I also vaguely recall that scsi emulation hides the physical cd (typically hdb).

Try unmounting the USB (I assume it uses SCSI emulation) and
rmmod ide-scsi and scsi_mod. maybe also sr_mod

ROR

Crashed_Again 02-12-2003 08:28 PM

I assume rmmod is used to remove the modules. The thing that is different in my situatuion is that when I mount the USB it removes the /mnt/cdrom and then when I unmount the USB the /mnt/cdrom is still gone. I am a little weary about erasing these modules. Sell me on this.

MasterC 02-13-2003 01:52 AM

It's nothing needing selling, it simply removes modules. Modules can easily be loaded back up. They aren't removed from the system for good. rmmod is the opposite of insmod. So, if you rmmod a module, and want it back, simply insmod it and it'll return :) No worries here, this person isn't suggesting to bork your system, simply rmmod a module :)

Cool


All times are GMT -5. The time now is 01:06 PM.