PDA

View Full Version : Problems with CDROM



MillTek
07-17-2004, 09:04 PM
Hi,

I am using 3.4 HDDinstall. I compiled a kernel per Kelmo's technique to get my NVidia drivers working. I have been able to use K3B to burn many many CDs.

Today when I tried to read a data cd, I can't. Knoppix says it doesn't exist. I searced and searched this forum but found no solution that would work. Physicaly, My machine has one HDD on the first IDE plug and then my CDRW and CDROM are on the second plug/cable as Master and slave. I'd really appreciate some help with this. Here's my fstab;


Thanks,
Jim

# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda5 / 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/dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 vfat noauto,users,exec,umask=000 0 0

shah
07-18-2004, 03:58 AM
I'm not sure what type of your cdrw and cdrom. Some cdrw are treated as scsi eventhough they are ide.I considered your cdrw as cdrom1 and cdrom as cdrom2.
First you should remove the cdrom symlink in your mnt directory and create to folder:
1)cdrom1
2)cdrom2

Then edit your fstab...it should be like this:
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda5 / 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/dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/sr0 /cdrom1 iso9660 defaults,ro,user,noexec,auto 0 0
[b]/dev/cdrom /cdrom2 iso9660 defaults,ro,user,noexec,auto 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 vfat noauto,users,exec,umask=000 0 0

Then create new device on your desktop, device that link to cdrom1 and device that link to cdrom2.
You can experiment with sr0 or cdrom.

shah
07-18-2004, 04:00 AM
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda5 / 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/dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/sr0 /cdrom1 iso9660 defaults,ro,user,noexec,auto 0 0
/dev/cdrom /cdrom2 iso9660 defaults,ro,user,noexec,auto 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 vfat noauto,users,exec,umask=000 0 0

Then create new device on your desktop, device that link to cdrom1 and device that link to cdrom2.
You can experiment with sr0 or cdrom.

Sorry..i'm not goog with this html code.

kelmo
07-18-2004, 04:52 AM
What did you append to the kernel cmd line? ie in append="?" in lilo.conf

MillTek
07-18-2004, 02:15 PM
Hi Kelmo,
Here is the whole section that boots the kernel I use;

image=/boot/vmlinuz-2.6.6
label="Linux(2.6)-2"
initrd=/boot/initrd.img-2.6.6
append="ramdisk_size=100000 init=/etc/init lang=us apm=power-off nomce"
read-only

Is there something wrong with this? It wa auto generated. I didn't change anything.

Jim

MillTek
07-18-2004, 02:56 PM
Shah,
I tried your solution. In both cases I got 'Could not mount device. The error reported was: Mount: mount point iso9660 does not exist'

I then opened a console and entered 'mount /dev/sr0 /mnt/cdrom1' and that worked. The CD was mounted read-only (as expected) and I was able to access it.

Is there a way to automate this?

Jim

shah
07-19-2004, 06:05 AM
MillTek

You can try using autofs.
1) Open console & SU
2)run this command :
cd
mkdir /mnt/floppy
mkdir /mnt/cdrom (you can skip this two if the directiory is there)
mv /etc/auto.master /etc/auto.master_old
mv /etc/auto.floppy /etc/auto.floppy_old
mv /etc/auto.cdrom /etc/auto.cdrom_old
echo "/mnt/cdrom /etc/auto.cdrom --timeout 10" > /etc/auto.master
echo "/mnt/floppy /etc/auto.floppy --timeout 1" >> /etc/auto.master
echo "floppy -user,suid,fstype=msdos :/dev/fd0" > /etc/auto.floppy
echo "cdrom -fstype=iso9660,ro :/dev/sr0" > /etc/auto.cdrom
ln -s /mnt/floppy/floppy floppy
ln -s /mnt/cdrom/cdrom cdrom
/etc/init.d/autofs start (or restart)
cd

3)insert cd and try this command : ls /mnt/cdrom/cdrom
if it can read your cd...you're okay.

4)you need to edit your fstab...delete or comment out /dev/sr0....

5)you also need to run sysV-init editor and add autofs in runlevel5(start) so it can run on boot, add autofs in runlevel6(stop) so it can stop when you shutdown.

6)reboot.

Check if you can read directory /mnt/cdrom/cdrom using konquerer.
Let me know if it can be done on your machine.

Good luck

Thanks to Mark Nielsen for his tutorial.

champagnemojo
07-19-2004, 07:27 AM
Most likely these would work in your fstab:

/dev/sr0 /cdrom iso9660 ro,user,noauto 0 0
/dev/sr1 /cdrom1 iso9660 ro,user,noauto 0 0

And if you're trying to mount using the desktop icons, you'll need to create new ones after altering your fstab.

MillTek
07-19-2004, 04:58 PM
Hi Shah & Champagnemojo,

Champagnemojo, the two fstab entries you suggested work after I do a mount in a Konsole.

Shah, I'd like to try your suggestion for autmounting. I've read it and think I follow, except I don't know what sysV-init editor is? Any direction?

Also, if Kelmo reads this, did I give you the information you requested? Should I change something??

Thanks all,
Jim

voldemort
07-19-2004, 10:02 PM
had same troubles with laptop and home system

after using synaptic (graphic front end to apt)
apt-get install synaptic

i did a find with criteria (name and description) mount

found discover and installed it
during config it asked if it wanted me to handle the cdroms i gave it a go
and bam fixed all my cdrom problems

shah
07-20-2004, 02:55 AM
MillTek

SysV-init Editor is a utility you use to configure what service is going to laod when you boot your system.
It can be found when you click KDE start menu--->System ---> SysV-Init Editor.

If you never use it before, it wil ask you question about your system. Select Linux and Debian. When the gui started, you will see on the left side (Available services) list of services in your system(usually these services resides in your /etc/init.d folder).

Select and drag service called autofs and drop on Runlevel 5 (start) collum. If there's an error pop up that says something like :
"Unable to generate a valid sorting number for this position..................."
Try change kdm sorting number by right clickin on it-->properties-->
change the number to 90.
Then drag & drop autofs.Change the sort number for autofs to say 65, and change back the sort number for kdm to its original.
To stop the autofs service when you shutdown, just drop on Runlevel 6 at the bottom collum (Stop).
Dont forget to save.

Markus
07-20-2004, 08:16 AM
You could of course do the same from a root shell with:

update-rc.d autofs start 20 5 . stop 20 6 .
or if you want to start it at lower runlevels as well:

update-rc.d autofs defaults
and if you want to remove it later:

update-rc.d -f autofs remove

MillTek
07-20-2004, 02:50 PM
Shah,

I did everything exactly as you suggested, and as you said, when I open a console and 'ls /mnt/cdrom', it lists the contents of the data CD.

However, when I reboot and click on the file manager (kfmclient) it shows me, under Devices', a CD-ROM with properties as follows 'automount(pid998)mntcdrom)' . If I click on this I get ;

An error occurred while loading devices:/automount(pid998)mntcdrom:
Retrieving data from devices is not supported

Now if I open a konsole and type 'ls /mnt/cdrom' , this works but it also inserts a new entry in the list of devices in kfmclient - CD-ROM (sr0) [/mnt/ cdrom/cdrom].
The properties for this are;
devsr0mntcdromcdrom
In kfmclient if I click on this new entry it will display the contents of the data CD.
If I terminate the kfmclient session and restart it the new entry is still there and still functional.

Obviously the opening of th konsole and the 'ls' command are doing something that is not being done at boot. Any ideas?
Here are my fstab and mtab in case these help;

FSTAB
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda5 / 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/dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 vfat noauto,users,exec,umask=000 0 0


MTAB
/dev/hda5 / ext3 rw,errors=remount-ro 0 0
/dev/root.old /initrd ext2 rw 0 0
proc /proc proc rw,nodiratime 0 0
/dev/pts /dev/pts devpts rw 0 0
/sys /sys sysfs rw 0 0
/proc/bus/usb /proc/bus/usb usbdevfs rw,devmode=0666 0 0
automount(pid1003) /mnt/floppy autofs rw,fd=4,pgrp=1003,minproto=2,maxproto=4 0 0
automount(pid998) /mnt/cdrom autofs rw,fd=4,pgrp=998,minproto=2,maxproto=4 0 0

Thanks for all the help Shah and thanks Markus for the suggestion as well.


Jim

shah
07-21-2004, 09:11 AM
MillTek
I have the same problem with you but I did some adjustment

1)First what you need to do is to delete/remove autofs from runlevel5(rc5.d) and runlevel6(rc6.d).We don't need it anymore.Knoppix-autoconfig will handle it.

2) You need to delete /etc/auto.cdrom and /etc/auto.floppy

3) Edit /etc/auto.master, it should look like this :
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).
# /var/autofs/misc /etc/auto.misc
# /var/autofs/net /etc/auto.net
#
# KNOPPIX automounts for floppy and cdrom(s), see knoppix-autoconfig
/mnt/auto /etc/auto.mnt --timeout=2
/mnt/auto /etc/automount.sh --timeout=2

4) Edit /etc/auto.mnt, it should look like this :
# Knoppix automounter file for Directory /mnt
floppy -fstype=auto,sync,exec,umask=000 :/dev/fd0
cdrom -fstype=auto,exec,ro :/dev/sr0
# The following entries (if any) are auto-generated by knoppix-autoconfig

5) Edit your /etc/fstab, and it should look like this:
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda5 / ext3 defaults,errors=remount-ro 0 1

proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,users,noauto,showexec,umask=022 0 0
usbdevfs /proc/bus/usb usbdevfs defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/dvd iso9660 defaults,ro,users,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,users,noexec,noauto 0 0
/dev/sr0 /mnt/auto/cdrom iso9660 defaults,ro,users,noexec,auto 0 0
*( I added change user to users on every type of dev so that you can control you device (mount/unmount, eject) without being su )*
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda7 /mnt/hda7 vfat noauto,users,exec,umask=000 0 0

5) Try run /etc/init.d/autofs restart or reboot. You should be able to open your cdrom from CD-ROM(cdrom) from your desktop.
There will be another icon called CD-ROM(sr0) will automatically be created on your desktop.This icon will not list files on your cd, but it is usefull to eject your cd.

6) If you see something like, mount: mount point /mnt/auto/cdrom does not exist; while booting,
just ignore it because the mount point will only exist when you insert your cd.


Hope this time it will work for you.


:D

voldemort
07-21-2004, 03:02 PM
my solution may have sounded naieve but it fixed identical problem on two machines

try discover1 using apt

automatically updates fstab on boot and did it correct every time so far