# [SOLVED][CDROM] unknown device or no medium found

## Ichika

Hi all,

I have a small problem with my cdrom... I can't mount it. It works fine because I just installed gentoo with it and I can use gparted live CD.

I looked for an answer on google and I found that lots of people had the same problem but their solutions didn't fix mine.

In fact, I have a different thing :

when I execute this command : 

 *Quote:*   

> dmesg | grep CD (or dvd, CD-ROM, ...)

 

I don't have any output but others have.

Maybe I forgot to compile something with the kernel ? What's the option to select in kernel config ? 

My DVD is an Asus DRW 22 BL or something like that.

My user is in cdrom and cdr (cat /etc/group)

The symlink => /dev/cdrom -> /dev/sr0

Can someone help me with this ? 

Thanks.  :Smile: Last edited by Ichika on Wed Feb 16, 2011 7:45 pm; edited 2 times in total

----------

## VoidMage

Check your syslog for messages that are printed upon inserting a CD - all of the messages, not just naive greps.

Can you mount the CD from commandline ?

----------

## Ichika

 *VoidMage wrote:*   

> Check your syslog for messages that are printed upon inserting a CD - all of the messages, not just naive greps.
> 
> Can you mount the CD from commandline ?

 

Okay, I'll check syslog messages.

Regarding the command line, I can't : 

 *Quote:*   

> Oslo dev # cat /etc/fstab
> 
> # /etc/fstab: static file system information.
> 
> #
> ...

 

Btw, when I executed "mount /dev/cdrom", it took ages.

/var/log/dmesg

 *Quote:*   

> [    4.466438] cdrom: Uniform CD-ROM driver Revision: 3.20
> 
> [    4.466533] sr 6:0:0:0: Attached scsi CD-ROM sr0
> 
> 

 

----------

## VoidMage

Just checking: you do know that audio cd doesn't have a file system ?

What kind of mounting are you talking about ?

For udisks-based automounting that fstab line could be a problem, for anything hal based it's a straight no-go.

----------

## Ichika

 *VoidMage wrote:*   

> Just checking: you do know that audio cd doesn't have a file system ?
> 
> What kind of mounting are you talking about ?
> 
> For udisks-based automounting that fstab line could be a problem, for anything hal based it's a straight no-go.

 

It's not audio CD.

I created a virtual machine to host a Windows system to run some tests because I don't want to have it installed on the hard disk.

I wanted to create an image with the original Windows 7 DVD with k3b but I can't because the system can't find/use/mount all the CD-ROM/DVD-ROM I have.

I don't know what I did wrong when I installed Gentoo because the Asus DRW22B2L works fine and the CD/DVD are okay.

----------

## VoidMage

Before KDE 4.6 you need hal daemon running, since KDE 4.6 you need just dbus and udisks.

----------

## Ichika

 *VoidMage wrote:*   

> Before KDE 4.6 you need hal daemon running, since KDE 4.6 you need just dbus and udisks.

 

Thanks again for your help.

I didn't have udisks. After emerging it, I restarted my computer and now, I don't have cdrom nor sr0 anymore.

I have hal and dbus when the computer starts.

----------

## VoidMage

Just so we're at the same page: are you using KDE >=4.6.0 ?

If so, check all of sr* devices with udisks, not only sr).

----------

## Ichika

 *VoidMage wrote:*   

> Just so we're at the same page: are you using KDE >=4.6.0 ?
> 
> If so, check all of sr* devices with udisks, not only sr).

 

I checked with : 

emerge --search kde-meta and I have the version 4.4.5.

Regarding udisks, I don't see my cdrom.

 *Quote:*   

> awesome@[22:58:04] $ udisks --enumerate
> 
> /org/freedesktop/UDisks/devices/sdb
> 
> /org/freedesktop/UDisks/devices/sdb1
> ...

 

Do I have to unmerge udisks ?

----------

## VoidMage

As you may have noticed 4.4.5 < 4.6.0 so you still need hal, but regardless,

if you really have a working cdrom, it should still be reported, unless your kernel config is wrong.

Pastebin it.

----------

## Ichika

 *VoidMage wrote:*   

> As you may have noticed 4.4.5 < 4.6.0 so you still need hal, but regardless,
> 
> if you really have a working cdrom, it should still be reported, unless your kernel config is wrong.
> 
> Pastebin it.

 

Yup I know that but hald is already started with the system, same as dbus.

I'm sure my cdrom is okay because I can boot a gparted live CD or Windows 7/Gentoo minimal iso or any other cdrom when the computer starts.

I can't pastebin my .config right now, I'll do that first thing this evening (note, this will be huge, wouldn't it be better to "grep" some words and paste them ?)

Thanks again for you help (you helped me several times before  :Smile: ).

----------

## Ichika

Hi,

Here are the .config file : 

http://pastebin.com/PkncGR1s

and the emerge --info output (in case that can help like USE flag missing) : 

http://pastebin.com/VETnNdV8

Thanks again.

----------

## VoidMage

What does 'udevadm info -q all' print about your cdrom ?

What's the output of 'lspci -k' ?

----------

## Ichika

Here is the result for lpsci -k : 

http://pastebin.com/w3FDpahm

I have a problem with the first command. Since I installed udevdisks, I don't have /dev/cdrom or /dev/sr0 anymore and when I execute 

 *Quote:*   

> udevadm info -q all

 

I have this message : 

 *Quote:*   

> udevadm info -q all 
> 
> query needs a valid device specified by --path= or --name=

 

I can't give --name=/dev/cdrom 

 *Quote:*   

> udevadm info -q all --name=/dev/cdrom
> 
> device node not found

 

I really don't know why udevdisks removed the cdrom symlink. Do i need to uninstall udevdisks and see if it comes back or is that a normal thing (/dev/cdrom disappearance) ?

----------

## VoidMage

Give it sr0 (or whatever the number is) as the name argument - symlink is not that interesting anyway.

Which k3b version are you using ?

As it's still <4.6.0, is hal running ?

----------

## Ichika

 *VoidMage wrote:*   

> Give it sr0 (or whatever the number is) as the name argument - symlink is not that interesting anyway.

 

/dev/sr* disappeared with /dev/cdrom

I only have sda (SSD 80go), sdb (HD 1To), sg0 and sg1 (don't know what that is).

pastebin with ls /dev and udevadm sg0 and sg1 : 

http://pastebin.com/paSCTZ8B

HAL : 

 *Quote:*   

> ps aux | grep hal
> 
> 103       2462  0.0  0.0  42432  5000 ?        Ssl  18:16   0:00 /usr/sbin/hald --use-syslog --verbose=no
> 
> root      2463  0.0  0.0  20092  1328 ?        S    18:16   0:00 hald-runner
> ...

 

k3b : 

 *Quote:*   

> Oslo awesome # emerge --search k3b
> 
> Searching...    
> 
> [ Results for search key : k3b ]
> ...

 

edit : I have an error with udev at startup

 *Quote:*   

> The udev init script is written for for baselayout-2
> 
> Please do not use it with baselayout-1

 

Fixed that with : rc-update udev del default

----------

## Ichika

I tried with the gentoo live CD and I have /dev/cdrom and /dev/sr0 and there is no problem to use the cdrom.  :Sad: 

What could it be ? A bad kernel configuration ? A missing package ? I really don't know.

I checked some .config on google and I have the same options. :s

 *Quote:*   

> cat /proc/sys/dev/cdrom/info 
> 
> CD-ROM information, Id: cdrom.c 3.20 2003/12/17
> 
> drive name:
> ...

 

----------

## VoidMage

Did you try to boot after you've removed that udev script from the runlevel ?

Till the drive appears, it's either udev or kernel problem, so don't bother with hal for now.

Those sg* nodes are probably just generic scsii for your disks.

----------

## Ichika

Yes, I rebooted several times while trying different kernel configurations.

My DVD ROM is IDE connected.

I checked again and I have the SCSI CDROM support.

What kind of commands should I use to see the difference in kernel config between gentoo live cd and my gentoo ?

I think I just removed an option I shouldn't have.   :Rolling Eyes: 

I'm trying to compile a new kernel with every SCSI options "in kernel".

Thank you again for you help.

----------

## VoidMage

That's it's IDE connected, doesn't really matter - if the correct drivers are chosen (in your case ata_piix),

the drive still will get listed as sr* node. You also have CONFIG_BLK_DEV_SR set, so the problem lies elsewhere.

Were there any warnings during emerge of udev ?

Oh, a minor note: CONFIG_IKCONFIG_PROC tends to be helpful on occasions.

----------

## Ichika

Hi,

I tried the new kernel with every SCSI options in kernel and that didn't change a thing.

I'll try to emerge udev again but I don't remember having an error or something.

I'll try with CONFIG_IKCONFIG_PROC too. I hope this option is in the gentoo livecd kernel, I will be able to compare the 2 .config.

Thanks again.

----------

## VoidMage

Nah, CONFIG_IKCONFIG_PROC is just a debugging helper/reminder - it won't change a thing for you,

but it makes figuring out if you're running correct kernel easier.

----------

## Ichika

 *VoidMage wrote:*   

> Nah, CONFIG_IKCONFIG_PROC is just a debugging helper/reminder - it won't change a thing for you,
> 
> but it makes figuring out if you're running correct kernel easier.

 

Yeah I know but if I can get the .config from the gentoo live CD, I will be able to compare it with mine and see the differences that might be related to my problem.

----------

## honp

I have the same problem on one Ubuntu box.

I am really surprised, that you even talk about k3b and KDE stuff, because i think that it could only be a kernel related (or udev) problem. Maybe try to check udev rules, but it is all that i could advice.

CONFIG_IKCONFIG_PROC - it is a good thing to turn on, but there will be probably a lot of differences between your .config and live cd .config...

good luck

----------

## Ichika

Yeah I just did a sdiff between the two config and I think that's going to be hard.

Anyway, here is my .config : 

http://pastebin.com/mG0tUjXm

Here is the live cd one : 

http://pastebin.com/xpJ9pbQU

Finally, here is the sdiff between them (my config is on the left): 

http://pastebin.com/0LfS7VZG

I tried to modify some SCSI options in my kernel config.

Regarding the "maybe" udev problem, what should I check in udev rules ? I only have few files : 

 *Quote:*   

> Oslo rules.d # ls /etc/udev/rules.d/
> 
> 10-virtualbox.rules  51-android.rules  60-virtualbox-guest-additions.rules  70-libgphoto2.rules  70-persistent-cd.rules  70-persistent-net.rules  90-hal.rules  99-g15daemon.rules

 

----------

## honp

Hm, try to use livecd kernel (take livecd .config, copy it to your kernel source and compile it, modules, and so on...) and you will see...

H.

----------

## Ichika

I got a kernel panic (VFS...).

I'll have to correct this.

Thanks again.

----------

## honp

Hm, it is a strange, having panic with distribution kernel. Did you compile it or copy? Usualy this things are because of disk-related problems, but you probably know, don`t you?

H.

----------

## Ichika

Yup, I still have a lot to learn but I can manage this kind of issue. ^^

I can confirm that this is a kernel config problem. I booted on the compiled livecd kernel and it was okay (hal, ...).

I just need to find what is missing now.

I'll update when the problem is fixed.

Thanks again for your help.

----------

## roarinelk

post a full dmesg please

EDIT:

remove the following from your .config:

CONFIG_PATA_OLDPIIX=y

CONFIG_PATA_SCH=y

CONFIG_PATA_ATIIXP=m

CONFIG_PATA_AMD=y

and set this one to "y";

# CONFIG_PATA_JMICRON is not setLast edited by roarinelk on Wed Feb 16, 2011 7:24 pm; edited 1 time in total

----------

## Ichika

Here are the modules used with the livecd : 

http://pastebin.com/fTvQLEQ3

Here is the dmesg output : 

http://pastebin.com/wCRCMVLB

(it's always the same thing except a segfault from nepomuk)

=> I think it's pata_jmicron modules which is missing (trying).Last edited by Ichika on Wed Feb 16, 2011 7:26 pm; edited 1 time in total

----------

## roarinelk

 *Ichika wrote:*   

> Here are the modules used with the livecd : 
> 
> http://pastebin.com/fTvQLEQ3
> 
> Here is the dmesg output : 
> ...

 

The 2nd link is useless since it's full of EHCI debug messages

(remove the "CONFIG_USB_DEBUG=y", do the other changes I mentioned

in the above post and try again please)

I'm pretty sure CONFIG_PATA_JMICRON=y will fix your problem.

----------

## Ichika

Problem solved with CONFIG_PATA_JMICRON=y.

Thanks (finally).  :Smile: 

----------

## Ichika

Hi,

I just have a small question (I don't want to do a bad thing).

I read almost everywhere that the kernel "needs" to be compiled as a simple user (and installed as root). 

When I emerge gentoo-sources, I have to compile it as root (/usr/src/linux).

Is that a bad idea to modify the permissions to be able to compile it with my user ?

Thanks.

----------

## roarinelk

I don't think it is required but it's prudent nonetheless

----------

## Ichika

 *roarinelk wrote:*   

> I don't think it is required but it's prudent nonetheless

 

And why is that exactly ?

Once compiled, what's the difference between the 2 kernels ?

When the computer starts, only root is active so it can execute the 2 kernels the same way, right ?

(I'm still trying to find informations about that but I'm a bit lost)

----------

## roarinelk

no there's no difference, but you know, doing as much as

possible with an unprivileged account is always a good

idea.

the kernel itself doesn't care who built it, it gets loaded

into memory by a bootloader and reigns supreme from 

then on :)

so in short, doesn't matter what uid/gid the kernel

source (and object) files have because the running

kernel doesn't access them anyway.

----------

## Ichika

Okay, thank you for the answer.  :Smile: 

----------

