UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
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.
I installed Ubuntu desktop 7.04 last week and have been struggling with the CD automounting for quite some time now.
If a CD is in the drive when I reboot it will be mounted and function, but as soon as I eject it, the system fails to mount any new CD. It mounts and accesses floppies just fine.
I saw communication problems with the old drive in dmesg and swapped it out for a new drive, that ended the problem messages. If I run the hal monitor I can see the cd-rom speaking with the computer and updating it's state as I open and close the tray with out without a CD.
I can mount the drive manually, but once this problem starts I get the error message "Unable to mount drive. There appears to be no media in the drive." whenever attempting to access the CD-ROM after placing a new disc in. If any output is needed let me know nad I will get it. Thanks for any help.
look through your syslog (dmesg) for any mention of your cd drive
dmesg | grep hdc
dmesg | grep cdrom
etc.
perhaps a look at udev rules?
Is this a brand new drive?
Have you tested the drive on another machine?
Thanks for reading and trying to help. I'm sure this is something simple but I have very little Linux experience ( )and need some help here and there.
The CD-ROM is not new but was working well when pulled from it's previous home. Down at the bottom I pasted the info from dmesg about the drive. Which udev rule should I be looking at, I glanced through them briefly and was
If I can post anything else that could give anyone a clue to tell me what to look at let me know, I will be with this computer for a few more hours today until I go home.
when quoting output, quote the command for the output too. Also need to know the messages that come from attempting to mount a cd manually (unsuccessfully).
Both commands you suggested came up with nothing so I just skimmed the entire output of dmesg for what I pasted.
Anyway, I can mount and unmount manually with no issues. Browsing the disc yields no errors. Also, if I reboot and stick the disc in immediately after booting from the hard drive but before starting the OS it will mount at boot. Unfortunately when I eject the drive it reverts back to it's old ways.
I did install 6.10 on Tuesday and it worked fine. The disc automounted every time with no issues. Then I upgraded back to 7.04 today, thinking maybe I just had a corrupted install disc before. However, as soon as I made the mistake of upgrading back to 7.04 through the Ubuntu upgrade manager the same issue came right back.
In the interest of not being a difficult support subject, this is the result of manually mounting and unmounting:
Code:
user@user-desktop:/$ sudo mount /dev/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
user@user-desktop:/$ cd /cdrom
user@user-desktop:/cdrom$ ls
cdromupgrade doc isolinux pics preseed ubuntu
dists install md5sum.txt pool README.diskdefines
user@user-desktop:/cdrom$ cd ..
user@user-desktop:/$ sudo umount /dev/cdrom
user@user-desktop:/$ cd /cdrom
Thanks for sticking with this thread and trying to help me out, but I suspect you are right and I will just reinstall 6.10 and give the soon to be owner of this machine instructions to avoid upgrading to 7.04.
Am I the only person that has run into this problem? I've been searching for nearly two weeks and not only can I not find any similar issues anywhere, you seem to be the only person who has even taken an interest in this problem. For that, I'm grateful to you.
It would appear you are, indeed the only person to have this experience.
Do not upgrade - download the feisty iso and install. (An managed upgrade from a working system should also work but.)
What I was hoping to do was compare get enough info on your drive to work out what is happening. Automounting is managed from autofs and udev...
Looking at fstab:
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0
... /dev/cdrom is a link; where to (ls -l /dev/cdrom)
eg. for me:
simon@indigo-prime:~$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 4 2007-05-08 23:12 /dev/cdrom -> scd0
I can then look up udev stats for this node
Code:
simon@indigo-prime:~$ udevinfo -a -p `udevinfo -q path -n /dev/scd0`
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/block/sr0':
KERNEL=="sr0"
SUBSYSTEM=="block"
DRIVER==""
ATTR{stat}==" 241820 10143364 41540808 7648820 0 0 0 0 0 3943476 7648800"
ATTR{size}=="14844588"
ATTR{removable}=="1"
ATTR{range}=="1"
ATTR{dev}=="11:0"
[...snip...]
...and I can look for rules about this device in /etc/udev/rules.d/00.rules
user@user-desktop:~$ udevinfo -a -p `udevinfo -q path -n /dev/scd0`
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/block/sr0':
KERNEL=="sr0"
SUBSYSTEM=="block"
DRIVER==""
ATTR{stat}==" 6 22 112 2164 0 0 0 0 0 2164 2164"
ATTR{size}=="1426500"
ATTR{removable}=="1"
ATTR{range}=="1"
ATTR{dev}=="11:0"
looking at parent device '/devices/pci0000:00/0000:00:1f.1/host1/target1:0:0/1:0:0:0':
KERNELS=="1:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sr"
ATTRS{ioerr_cnt}=="0x0"
ATTRS{iodone_cnt}=="0x41e"
ATTRS{iorequest_cnt}=="0x41f"
ATTRS{iocounterbits}=="32"
ATTRS{timeout}=="0"
ATTRS{state}=="running"
ATTRS{rev}=="T100"
ATTRS{model}=="CDRW/DVD SM-308B"
ATTRS{vendor}=="SAMSUNG "
ATTRS{scsi_level}=="6"
ATTRS{type}=="5"
ATTRS{queue_type}=="none"
ATTRS{queue_depth}=="1"
ATTRS{device_blocked}=="0"
looking at parent device '/devices/pci0000:00/0000:00:1f.1/host1/target1:0:0':
KERNELS=="target1:0:0"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1f.1/host1':
KERNELS=="host1"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:1f.1':
KERNELS=="0000:00:1f.1"
SUBSYSTEMS=="pci"
DRIVERS=="ata_piix"
ATTRS{msi_bus}==""
ATTRS{broken_parity_status}=="0"
ATTRS{modalias}=="pci:v00008086d00002411sv00008086sd00002411bc01sc01i80"
ATTRS{local_cpus}=="ff"
ATTRS{irq}=="0"
ATTRS{class}=="0x010180"
ATTRS{subsystem_device}=="0x2411"
ATTRS{subsystem_vendor}=="0x8086"
ATTRS{device}=="0x2411"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
If I may ask, what are you looking for in all of this output? I am as interested by this as I am frustrated, I look forward to eventually figuring this out, so that I will be better prepared to troubleshoot further problems some other time. Thanks again.
Problem solved. On a whim I swapped CD drives. Although the old drive tested fine and works perfectly in other systems and under 6.10, it is NOT compatible with 7.04 apparently.
Although it could boot, install and run from the CD just fine and access files when manually mounted without issue, the old drive was incompatible with 7.04.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.