PDA

View Full Version : Easy way to fix your cd-dvd drives



Romkillah
05-29-2004, 11:43 PM
Hey guys, seems ppl are still being plagued by the cd rom bug in knoppix 3.4 with the 2.6.* kernel. So here is the quick easy way to fix it.
(depending on your drive layout, you will have to change this a little to suit)

1. Open a root console window, navigate to /dev/

2. Type "rm cdrom, rm cdrom1, rm dvd (depending on your drive layout)

3. Type ln -s scd0 cdrom (link for your cdrom-if it's a dvd, change cdrom to dvd)

4. Do the same for your second drive if you have one

5. Change the cdrom lines in your /etc/fstab(without quotes)to say:

"/dev/cdrom /cdrom iso9660 auto user,noauto,exec,ro 0 0"
(same for cdrom1 and dvd except change the relevant wording, ie "/dev/dvd /dvd" etc, or simply edit and reuse the existing cdrom link if it's nearly right :wink: )

6. Now delete the cdrom link from your desktop as it never worked anyway did it?

7. Got to your desktop configuration and check "Show devices on desktop" Check the relevant devices to you, i.e. "Show mounted/unmounted cdrom-cdwriter-dvd"

8. You should now have working links on your desktop for your cd drives.

There you go. This should work. Even though the 2.6.* kernel is supposed to support proper ide/atapi settings for optical drives, I have found personally that it is nigh on impossible to make it work, so these will do till they fix it.

If I have made any typo's that u guru's can see, please make note,as I wouldn't want to lead anyone astray :roll:

Hope this helps!!

DimGR
05-30-2004, 04:17 AM
it did not work unless i am doing it wrong


my fstab

# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1

proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
usbdevfs /proc/bus/usb usbdevfs defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/cdrom /cdrom iso9660 auto user,noauto,exec,ro 0 0
/dev/cdrom1 /cdrom1 iso9660 auto user,noauto,exec,ro 0 0

# Added by KNOPPIX
/dev/hda2 none swap defaults 0 0
# Added by KNOPPIX
/dev/hdb1 /mnt/hdb1 vfat noauto,users,exec,umask=000 0 0
# Added by KNOPPIX
/dev/sda1 /mnt/sda1 vfat noauto,users,exec,umask=000 0 0




and now the errors



mkdir cdrom
root@PenguinGR:/home/dimgr# mount /dev/cdrom
[mntent]: line 10 in /etc/fstab is bad
[mntent]: line 11 in /etc/fstab is bad
mount: can't find /dev/cdrom in /etc/fstab or /etc/mtab

Romkillah
05-30-2004, 08:03 AM
Ah, that'd be your cdrom lines...I did have that prob, I found that this line(no iso9660) worked:

/dev/cdrom /mnt/auto/cdrom auto user,noauto,exec,ro 0 0

Markus
05-30-2004, 12:00 PM
If iso9660 works leave off the auto instead so it doesn't have to get autodetected every time.
Also it doesn't have to be scd0. Do "dmesg |grep scd", "dmesg |grep sr", "dmesg |grep CD" to see where your cd is connected to. You can then use it as dev in fstab instead of symlinking the device.
EDIT: Forgot, these work for me:
/dev/sr0 /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/sr1 /cdrom1 iso9660 defaults,ro,user,noexec,noauto 0 0

user unknown
05-30-2004, 04:48 PM
Romkilla: why do you run lilo? I guess you better remove that info.

Why restart?
To have the automounter run again, and create desktop-links?

If you find out, how to invoke the automounter correctly, without rebooting, and include the hints from the others (dmesg | grep ...), your hints might be very helpfull to many visitors.

Romkillah
05-30-2004, 10:49 PM
Yeah, I think you are right :oops:

I don't think you need to reboot either. Like I said though, if any of you with more knowledge than I(most of you)please add comments. Thanks guys.

DimGR
05-31-2004, 04:37 AM
ok i managed to fix the cdrom and " half " of the cdrom1 :)

i can now mount the cdrom1 ( it is a cd rw ) but it can not access the media




# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/sr0 /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/sr1 /cdrom1 iso9660 defaults,ro,user,noexec,noauto 0 0

# Added by KNOPPIX
/dev/hdb1 /mnt/hdb1 vfat noauto,users,exec,umask=000 0 0
# Added by KNOPPIX
/dev/sda1 /mnt/sda1 vfat noauto,users,exec,umask=000 0 0

Romkillah
05-31-2004, 04:51 AM
try edit the cdrom1 link in /dev/ to point to scd1 instead of sr1.

So, using markus's lines, edited, would say:

/dev/scd1 /cdrom1 iso9660 defaults,ro,user,noexec,noauto 0 0

I have not personally used sr0 or sr1, as I said I used the scd0 and 1 links and it worked straight up..

Did you try a different disc just to be sure? Nitpicking I know, but stranger things have happened... :shock:

Markus
05-31-2004, 06:58 AM
On some computers it's scd, and others sr, you have to grep from dmesg to find out what you have. If sr0 works for one drive, the other is most probably sr1.
What kind of CD did you try to mount? Audio CDs have no filesystem so you have to mount a dataCD in order to browse it.
If the filesystem is nonstandars on the disk, try with auto instead of iso9660.

Romkillah
05-31-2004, 07:08 AM
If the filesystem is nonstandard on the disk, try with auto instead of iso9660.

I think that this is the magic number, so to speak!!

Thanks Markus!!


Interesting how it handles drives, because I have had my cd drives working from the scd's, and the hdc/d etc, and Markus has them running from sr0, 1 etc.

Is there any "Correct" way of doing this? :?:

OErjan
05-31-2004, 09:23 AM
actually it depends on you specific hardware. some of my external are called sg0 (scsi generic), and the internal is hdc another internal (scsi) is sr0 so if you have scsi emulation (as in 2.4 kernels) you get srX or scdX depending on some other factors.

Cuddles
05-31-2004, 02:06 PM
Is there any "Correct" way of doing this?

It appears that that this is a "teachers nightmare", multiple answers, and each one is correct...

I had learned with v3.3, and the previous v3.2, it all comes down to what dmesg says. If dmesg says sr#, then thats what you use, if it says scd#, then thats what you use. Unless you are working with DMA, in that case, you use the hdX...

From what I hear, v3.4 already sets "default" DMA active on all drives, which in previous versions, only the "main" root drive was set active to DMA, and all other drives were "default" DMA not active set.

I can't confirm this DMA setting, I am still running v3.3, but with v3.3, I had to add the hdparm to active set DMA in my bootmisc.sh, at the bottom of the file it had the hdparm for the "root" device already, and I just added for the rest of my other devices. I am going to have to check the DMA settings on v3.4 when I get it. ( I have a picky hard drive, backup data ext3 hard drive, that refuses to work with DMA set )

But, all in all, the HOWTO looks good, minor changes for the device names, but still is quite useful - for any version - I think :)
Ms. Cuddles

DimGR
05-31-2004, 04:18 PM
i got them working perfect
All i needed to do is to reboot my machine :)

sr0 sr1 is what i needed


thanks for all the help

OErjan
05-31-2004, 04:43 PM
actually umount -a&&mount -a should be enough. noneed to reboot 99% of the time.