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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
11-15-2005, 03:30 PM
|
#1
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Rep:
|
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
|
|
|
11-15-2005, 03:36 PM
|
#2
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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/
|
|
|
11-15-2005, 03:37 PM
|
#3
|
Member
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705
Rep:
|
/dev/cdrom is usually just a symlink to /dev/hdc
Code:
ln -s /dev/hdc /dev/cdrom
|
|
|
11-15-2005, 07:47 PM
|
#4
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Original Poster
Rep:
|
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.
|
|
|
11-16-2005, 12:55 AM
|
#5
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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.
|
|
|
11-16-2005, 09:57 AM
|
#6
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Original Poster
Rep:
|
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
|
|
|
11-16-2005, 01:52 PM
|
#7
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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.
|
|
|
11-18-2005, 01:31 AM
|
#8
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Original Poster
Rep:
|
$ 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
|
|
|
11-18-2005, 02:36 AM
|
#9
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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".
|
|
|
11-18-2005, 01:16 PM
|
#10
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Original Poster
Rep:
|
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.
|
|
|
11-18-2005, 02:06 PM
|
#11
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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.
|
|
|
11-24-2005, 08:08 PM
|
#12
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Original Poster
Rep:
|
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?
|
|
|
11-25-2005, 01:48 PM
|
#13
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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.
|
|
|
11-25-2005, 06:57 PM
|
#14
|
Member
Registered: Aug 2004
Distribution: deb lenny 2.6.21-amd64
Posts: 320
Original Poster
Rep:
|
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.
|
|
|
11-26-2005, 08:28 AM
|
#15
|
Senior Member
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 10:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|