LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 11-15-2005, 03:30 PM   #1
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Rep: Reputation: 31
removed /dev/cdrom


I created a thread on this a month or so ago which received dozens of helpful replies, but I was never able to resolve the issue.

Here's the relevant line in fstab.
Code:
/dev/hdc        /dev/cdrom      auto    ro,user,noauto,exec                 0       0
In the most clear and concise words-- I accidentally removed /dev/cdrom. How do I get it back? Would it be possible to use mknod? If so, I don't know which parameters to use.

Thanks
 
Old 11-15-2005, 03:36 PM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Typo?
If you meant /mnt/cdrom or some such you can just do "mkdir /mnt/cdrom".
If it's a symlink from /dev/hdc you do "ln -s /dev/hdc /dev/cdrom"
If you have udev it's recreated on bootup unless you messed with /etc/udev/
 
Old 11-15-2005, 03:37 PM   #3
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
/dev/cdrom is usually just a symlink to /dev/hdc

Code:
ln -s /dev/hdc /dev/cdrom
 
Old 11-15-2005, 07:47 PM   #4
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
This is really weird. I symlinked it to /dev/hdc and I received the error:
ln: `/dev/cdrom': File exists
I don't know how it is that it exists now when it didn't in the past. It is possible I created it with mknod and simply forgot to delete it, but this is unlikely.

$ mount /dev/cdrom /mnt/cdrom
mount: you must specify the filesystem type

What is the filesystem type?


Here is the original thread.

Last edited by verbose; 11-15-2005 at 07:53 PM.
 
Old 11-16-2005, 12:55 AM   #5
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
You should change this line: /dev/hdc /dev/cdrom auto ro,user,noauto,exec 0 0
to this: /dev/hdc /mnt/cdrom auto ro,user,noauto,exec 0 0

Then you can just do "mount /mnt/cdrom". The filesystem is probably iso9660 and if you like you can specify when mounting with "mount /dev/hdc /mnt/cdrom -t iso9660". Also, you can't mount an audio cd as it has no filesystem.

EDIT: Why start a new thread on this?

Last edited by makuyl; 11-16-2005 at 12:56 AM.
 
Old 11-16-2005, 09:57 AM   #6
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
Ok, I changed the line in fstab from /dev/cdrom to /mnt/cdrom.

I bumped the previous thread twice so I figured it would work better to just create a new thread.

$ sudo mount /dev/hdc /mnt/cdrom -t iso9660

mount: wrong fs type, bad option, bad superblock on /dev/hdc,
missing codepage or other error
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)
In some cases useful info is found in syslog - try
dmesg | tail or so

I've run into this error before. I mentioned in the first thread that I was trying to get scsi-emulation to work. However, I commented out the line "options ide-cd ignore='hdc hdd" in /etc/modules.conf. This was really the only change I made that I can remember. I just followed the directions here to enable scsi-emulation support.

I cannot get kernel 2.6.8 and 2.6.13 to work either, which I discussed in the first thread also. I receive the error "VFS: Unable to mount root fs on unknown block(0,0)" and I've never been able to resolve the issue.

Thanks
 
Old 11-16-2005, 01:52 PM   #7
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Ok, do "dmesg|grep CD" and post the output. If there's a line saying something like:
"Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0"
do "ls -l /dev/sr0 /dev/scd0" and post that output as well.
 
Old 11-18-2005, 01:31 AM   #8
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
$ dmesg|grep CD
output: nothing

I was looking at /var/log/kern.log and I'm getting an excessive number of errors that look like this:

Nov 15 20:18:24 bathat kernel: hdc: command error: error=0x54
Nov 15 20:18:24 bathat kernel: end_request: I/O error, dev 16:00 (hdc), sector 58
Nov 15 20:18:24 bathat kernel: hdc: command error: status=0x51 { DriveReady SeekComplete Error }


I'm pretty sure I was really close to getting my dvd-rw drive to work right before I ignorantly did an unlink on /dev/cdrom but I can't be sure.


Any ideas?
Thanks
 
Old 11-18-2005, 02:36 AM   #9
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Can you disable dma for the drive in the bios, check with "hdparm /dev/hdc".Also disable with "hdparm -d0 /dev/hdc". You could try another disc if that's what gave the error instead of dma.
Did you use the "hdc=ide-scsi" or "hdc=scsi" option in grub/lilo? Change to try the other one.
Also do "modprobe ide-cd".
 
Old 11-18-2005, 01:16 PM   #10
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
Alright, I've disabled dma. What impact does this have on the situation, just out of curiosity.

I have two separate entries, one for scsi-emulation and one for ide.
Code:
title		Debian GNU/Linux, kernel 2.4.27-2-386 Default
root		(hd1,9)
kernel		/vmlinuz-2.4.27-2-386 root=/dev/hde5 ro 
initrd		/initrd.img-2.4.27-2-386
savedefault
boot

title		Debian GNU/Linux, kernel 2.4.27-2-386 Default (scsi-emulation)
root		(hd1,9)
kernel		/vmlinuz-2.4.27-2-386 root=/dev/hde5 hdc=scsi hdd=scsi ro single
initrd		/initrd.img-2.4.27-2-386
savedefault
boot
I have been using the first one. Should I try booting the second one (scsi)?

'modprobe ide-cd' returns nothing.

By any chance am I required to refresh/update /etc/modules.conf to reflect the change to 'options ide-cd ignore='hdc hdd'', having commented it out.

Last edited by verbose; 11-18-2005 at 01:20 PM.
 
Old 11-18-2005, 02:06 PM   #11
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
You can leave the option in modules.conf as is for now. Try with "hdc=ide-scsi" instead of "hdc=scsi". If modprobe returned nothing, it probably loaded the module. Check with "lsmod|sort". If you reboot to try the ide-scsi option, dma probably gets enabled again. You can read the -d part of "man hdparm" about dma, it would make the drive work faster, but leave it off to test if it's the culprit. Whenever you test these options, try to mount a data disc and do "dmesg|tail" to see if there's any progress.
 
Old 11-24-2005, 08:08 PM   #12
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
I disabled dma and finally rebooted but I'm still unable to mount the drive.

$ sudo mount /dev/cdrom /mnt/cdrom/
Code:
mount: you must specify the filesystem type.
Graveman seems to detect that the cd in the drive but only after a dialog box pops up asking me to put a media in the drive. It never gets past this when a dvd is in the drive so I'm assuming it does in fact detect the cd.

When I try to write files to the cd it always complains about there not being enough space, which there most certainly is. I tried writing only a 175mb file and it got to the writing process but then failed.

So, it seems to detect the cd but isn't able to write to it.
This is exactly what it was doing before I unlinked /dev/cdrom.


Any ideas?
 
Old 11-25-2005, 01:48 PM   #13
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
I'm actually getting out of ideas. Here's a post I wrote on another forum if you'd like to take a look http://www.knoppix.net/forum/viewtopic.php?t=17348
One more thing to try is "grep iso9660 /proc/filesystems" which should return "iso9660", otherwise modprobe it.
Also read /usr/src/linux/Documentation/cdrom/ide-cd if you have kernel source installed.
 
Old 11-25-2005, 06:57 PM   #14
verbose
Member
 
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320

Original Poster
Rep: Reputation: 31
Aside from the fstab line in my first post, I also have this one:
Code:
/dev/cdrom 	/mnt/cdrom 	udf,iso9660,auto noauto,user,ro 	    0 	    0
As well as this one:
Code:
/dev/hdc        /media/cdrom0   iso9660 ro,user,noauto                      0       0
I don't know whether or not I should remove one or both of these. The second line is the default.

"grep iso9660 /proc/filesystems" did in fact return iso9660.

I will definitely have to read the ide-cd documentation as well as the post you referred me to. They both look very informative.
 
Old 11-26-2005, 08:28 AM   #15
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Both lines should work but remove the second one if you have mountpoint under /mnt and not /media. Just make sure that the mountpoint exists. Using the /dev/cdrom symlink is a good idea perhaps since some programs look for it. Same as xine looking for /dev/dvd.

Here is what I have:
/dev/cdrom /cdrom iso9660 defaults,ro,users,noexec,noauto 0 0
/dev/dvd /dvd udf,iso9660 defaults,ro,users,noexec,noauto 0 0

ll -d /dev/{cdrom,dvd,hd[cd]} /cdrom /dvd
drwxrwx--- 2 root cdrom 4096 Sep 5 2004 /cdrom
lrwxrwxrwx 1 root root 3 Nov 26 16:17 /dev/cdrom -> hdc
lrwxrwxrwx 1 root root 3 Nov 26 16:17 /dev/dvd -> hdd
brw-rw---- 1 root cdrom 22, 0 Nov 26 16:17 /dev/hdc
brw-rw---- 1 root cdrom 22, 64 Nov 26 16:17 /dev/hdd
drwxrwx--- 2 root cdrom 4096 Aug 10 2004 /dvd

Best to try mounting as root first to exclude permission errors.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CDROM mounting problem => /dev/cdrom is not a valid block device Vizy Linux - Hardware 8 11-04-2010 04:46 PM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
accidentally removed /dev/cdrom verbose Linux - General 18 10-26-2005 03:44 PM
mounting 2 ide-scsi devices /dev/cdrom and /dev/cdrom1 issue penguin123 Linux - Hardware 3 09-26-2003 08:36 PM
removed CDROM drive, now CD-RW not accessible tina Linux - Software 5 02-17-2001 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:48 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
Open Source Consulting | Domain Registration