# /dev/sr0: limited access [SOLVED]

## ISHAIM

I *am* able to mount and read data and audio CDs. However, certain issues arise while trying to perform other operations in other software. VirtualBox, Xfburn, and nautilus-cd-burner, for example, seem to be unable to interact with /dev/sr0 and I'm wondering if there is an issue going on with my configurations in /etc/group, /etc/passwd, /etc/fstab/ or permissions to /dev/sr0 (or its symlinks like /dev/scd0, /dev/cdrom).

VirtualBox simply lists no available CD/DVD Drives, where I can mount ISO images. The problem seems to be with the host machine and not with VirtualBox.

Xfburn will return this error: "No drives are currently available. Possibly the disc(s) are in use, and cannot get accessed. Please unmount and restart the application. If no disc is in the drive, check that you have read and write access to the drive with the current user." This is reproducible whether or not there is a blank CD-R disc in the drive and whether or not it is mounted. There is no "Burning device" from the dropdown list if I attempt to create a data composition.

nautilus-cd-burner has a similar problem to VirtualBox. The only option available to perform on an .iso file under "Write disc to: " is "File image". It appears there should be an item in the dropdown list that would say /dev/sr0 or something of the like, but as with Virtualbox there is nothing else there.

Here is /etc/fstab:

```
/dev/cdrom      /mnt/cdrom   auto      noauto,user   0 0

```

Here is /etc/group (I'm isaias):

```
cdrom::19:isaias,haldaemon,root

cdrw::80:haldaemon,root,isaias

vboxusers:x:1006:isaias,root,haldaemon

```

Here is /dev/sr0 (although I have changed these around plenty of times to no effect):

```
brwxrwxrwx 1 root cdrom 11, 0 Aug  4 20:56 /dev/sr0

```

Thank you.Last edited by ISHAIM on Thu Oct 01, 2009 3:11 pm; edited 1 time in total

----------

## hielvc

Try changing your fstab to "/dev/cdrom      /mnt/cdrom   auto      noauto,users   0 0". It might also be a hal/dbus config problem which I cant really help you with.

Edit changed to hal/dbus.

----------

## pappy_mcfae

If you are using hal/dbus, having an optical drive invoked in /etc/fstab shuts autoload down. I'm pretty sure just because you're running a virtual machine, you still have to make sure that things are properly set up.

Blessed be!

Pappy

----------

## piponazo

I have a similar problem. I can write dvd with brasero with the root user, but i can't do the same with my user.

 ls -l /dev/ | grep -E 'dvd|cd'

```
lrwxrwxrwx 1 root root         3 ago  9 17:27 cdrom -> sr0

lrwxrwxrwx 1 root root         3 ago  9 17:27 cdrw -> sr0

lrwxrwxrwx 1 root root         3 ago  9 17:27 dvd -> sr0

lrwxrwxrwx 1 root root         3 ago  9 17:27 dvdrw -> sr0

lrwxrwxrwx 1 root root         3 ago  9 17:27 scd0 -> sr0

brw-rw---- 1 root cdrom  11,   0 ago  9 17:27 sr0
```

Any suggestion ?

Thanks in advance

----------

## hielvc

Is your user included in the audio, cdrom, cdrw, and usb groups in /etc/group?

----------

## piponazo

I have already solved the problem. I belonged to these groups but I need to start a new session with my user.

Thanks anyway  :Wink: 

----------

## ISHAIM

 *hielvc wrote:*   

> Try changing your fstab to "/dev/cdrom /mnt/cdrom auto noauto,users 0 0".

 

I fixed the /etc/fstab entry and restarted to no effect.

 *pappy_mcfae wrote:*   

> If you are using hal/dbus, having an optical drive invoked in /etc/fstab shuts autoload down. I'm pretty sure just because you're running a virtual machine, you still have to make sure that things are properly set up.

 

I commented out the /dev/cdrom from /etc/fstab and restarted to no effect. I'm not sure what "properly set up" would entail as I have never tinkered much with hal/dbus before. To the best of my knowledge, the installation docs say to add the /dev/cdrom line to /etc/fstab, which is why it was there in the first place. I'm unenlightened as to how this would conflict with hal/dbus or what the implications are.

 *hielvc wrote:*   

> Is your user included in the audio, cdrom, cdrw, and usb groups in /etc/group?

 

I have long since been a part of the audio, cdrom, cdrw, and usb groups, across many sessions. It seems to make no difference in my case.

----------

## blueflame

Maybe try deleting /etc/udev/rules.d/70-persistent-cd.rules and then re-booting (it will be re-created with the correct contents).

----------

## pappy_mcfae

ISHAIM,

"Properly set up," as far as hal is concerned means:

1) you have installed hal/dbus

2) you set them to autostart

3) you have the proper permissions set in /etc/group

4) your kernel is set up to accept and deal with the device in question.

If you have steps 1, 2, and 3 right, and you still don't have access, then you have either a hardware issue or a kernel issue. So, if you have your user name in plugdev, cdrom, cdr, dvd, dvr, and usb groups in /etc/group, you should have consistent auto-mount functionality. If not, post your kernel .config, the results of lspci -n and cat /proc/cpuinfo as well as your /etc/fstab file, and I'll take a look.

Blessed be!

Pappy

----------

## piponazo

Are the permissions of your /mnt/cdrom similar like these ?

```
drwxr-xr-x  2 root root  4096 ago  9 17:45 cdrom
```

Have you the next USE flags in your /etc/make.conf ?

```
 dvd cdr dvdr
```

----------

## ISHAIM

Sorry for the lack of updates. Real life happens. Thanks to all who have helped so far.

 *pappy_mcfae wrote:*   

> ISHAIM,
> 
> "Properly set up," as far as hal is concerned means:
> 
> 1) you have installed hal/dbus
> ...

 

I personally do not think it is a hardware issue. Although I haven't seen many broken CD/DVD drives, would it still be able to playback CD/DVDs if it were in fact broken? I've tested playback of CDs and DVDs and they seem to play without a problem. The only "problem" I have during DVD playback is that sound will not play in VLC, which may be a consequence of the issues I'm having or an incorrect sound setup, although I have no other problems with sound.

After checking /etc/group, I noticed there is no dvd, dvdr group, is this wrong? As stated before, I can play DVDs in spite of this.

Here is kernel .config:

http://pastebin.com/f2aa08cd3

Here is cat /proc/cpuinfo:

```

processor   : 0

vendor_id   : GenuineIntel

cpu family   : 15

model      : 4

model name   : Intel(R) Pentium(R) 4 CPU 3.00GHz

stepping   : 1

cpu MHz      : 2999.725

cache size   : 1024 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 1

apicid      : 0

initial apicid   : 0

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 5

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr

bogomips   : 5999.45

clflush size   : 64

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 15

model      : 4

model name   : Intel(R) Pentium(R) 4 CPU 3.00GHz

stepping   : 1

cpu MHz      : 2999.725

cache size   : 1024 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 1

apicid      : 1

initial apicid   : 1

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 5

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pebs bts pni dtes64 monitor ds_cpl cid cx16 xtpr

bogomips   : 5999.16

clflush size   : 64

power management:

```

Finally, /etc/fstab:

```

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0

/dev/sda1      /boot      jfs      defaults,noatime   1 2

/dev/sda2      none      swap      sw      0 0

/dev/sda3      /      jfs      noatime      0 1

/dev/cdrom      /mnt/cdrom   auto      noauto,users   0 0

/dev/sdc1      /mnt/usb2   vfat      noauto,users,rw,umask=0   0 0

```

Thanks,

Isaias

----------

## ISHAIM

I think the problem was incorrect jumper settings on my IDE drives. Gentoo observes jumper settings, unlike Windows.

----------

## pappy_mcfae

Good to see you back. I still need your lspci -n result.

Blessed be!

Pappy

----------

## ISHAIM

lspci -n:

```
00:00.0 0600: 8086:2e20 (rev 03)

00:01.0 0604: 8086:2e21 (rev 03)

00:1a.0 0c03: 8086:3a37

00:1a.1 0c03: 8086:3a38

00:1a.2 0c03: 8086:3a39

00:1a.7 0c03: 8086:3a3c

00:1b.0 0403: 8086:3a3e

00:1c.0 0604: 8086:3a40

00:1c.4 0604: 8086:3a48

00:1c.5 0604: 8086:3a4a

00:1d.0 0c03: 8086:3a34

00:1d.1 0c03: 8086:3a35

00:1d.2 0c03: 8086:3a36

00:1d.7 0c03: 8086:3a3a

00:1e.0 0604: 8086:244e (rev 90)

00:1f.0 0601: 8086:3a18

00:1f.2 0101: 8086:3a20

00:1f.3 0c05: 8086:3a30

00:1f.5 0101: 8086:3a26

01:00.0 0300: 10de:0640 (rev a1)

03:00.0 0101: 197b:2368

04:00.0 0200: 10ec:8168 (rev 02)

05:00.0 0401: 1102:0007
```

Thank you

----------

## pappy_mcfae

You've been given the Pappy touch. 

Click here for your new .config. Compile as is.

For the best results, please do the following:

1) Move your .config file out of your kernel source directory (/usr/src/linux-  ).

2) Issue the command make mrproper. This is a destructive step. It returns the source to pristine condition. Unmoved .config files will be deleted!

3) Copy my .config into your source directory.

4) Issue the command make && make modules_install.

5) Install the kernel as you normally would, and reboot.

6) Once it boots, please post /var/log/dmesg so I can see how things loaded.

Blessed be!

Pappy

----------

## ISHAIM

Thank you very much. Not that I'm doubting your authenticity or altruism, but I'm curious, what will this do? I know it is a kernel .config, but what is it tweaked to? Also, I see some things are set to 32 bit instead of 64 bit. I have an Intel Core 2 Duo.

----------

## pappy_mcfae

 *ISHAIM wrote:*   

> Thank you very much. Not that I'm doubting your authenticity or altruism, but I'm curious, what will this do? I know it is a kernel .config, but what is it tweaked to? Also, I see some things are set to 32 bit instead of 64 bit. I have an Intel Core 2 Duo.

 

You're welcome.

It will make your computer run as fast as it can. It is tweaked to do just that. It will make the system run stably, as only required drivers are used. Superfluous drivers and settings are nowhere to be seen. 

Your original .config was x86 (32 bit). I simply went with what I was given. I can also set that up to be a 64 bit kernel, if you desire.

Since you question my motives, you are in a way doubting me. Not that that's an issue, really. It's not the first, nor the last time that I will garner the doubt of another. C'est la vie! Frankly, I'm amazed more people didn't look askew at my offer. 

I'm not all altruistic here. I am here for me. I enjoy computers, and spending time with them. Perhaps too much time perhaps, but that's a matter of opinion. I like tweaking and working on my computer as well as working with it. That's something that can't really be done to any great effect when using Windoze.

I'm also here to help others. I am a firm believer in the rights of computer users to have a choice when it comes to how to make their computers run. What good is any knowledge I might have or might gain in pursuit of Gentoo Linux if I don't share it?

None. 

I don't have kids. I'm not going to have kids. I have to share what I know with someone who needs the knowledge I have. While I'm not the smartest guy on the block, I do have a unique perspective on the Linux Kernel. That perspective has given many the opportunity to enjoy a digital choice. I like the feeling that I helped in my small way.

Anyway, enjoy the kernel.

Blessed be!

Pappy

----------

## ISHAIM

 *pappy_mcfae wrote:*   

> Your original .config was x86 (32 bit). I simply went with what I was given. I can also set that up to be a 64 bit kernel, if you desire. 

 

Here is a snippet of my current .config:

```
# Automatically generated make config: don't edit

# Linux kernel version: 2.6.30-gentoo-r5

# Wed Sep 30 23:46:42 2009

#

CONFIG_64BIT=y

# CONFIG_X86_32 is not set

CONFIG_X86_64=y

CONFIG_X86=y

CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
```

Looks like my .config is x86_64, no? Does something else look amiss? While I would like you to set that up for me, please let me know if there is something else that looks wrong.

 *pappy_mcfae wrote:*   

> Since you question my motives, you are in a way doubting me. Not that that's an issue, really. It's not the first, nor the last time that I will garner the doubt of another. C'est la vie! Frankly, I'm amazed more people didn't look askew at my offer.

 

I hope you're not offended. I didn't mean it like that. I've only been using Gentoo for about 4 years now, and there's still so much more to learn, it's voluminous. I just wanted to be sure that it was what I thought it was.

I share your views regarding computers and their usage. I read a thread of a user quitting Gentoo after 4 years out of frustration on these forums. As that cheesy Spiderman quote goes, "With freedom, comes great responsibility". The freedom to tweak your own system this much is a trade off for being spoon fed a Windows automatically-works-out-of-box configuration. Ain't no such thing as a free lunch. I wouldn't trade this experience for anything else, either. While there's something to be said for the "It Just Works" camp of computer users, there are tradeoffs no matter how you cut the cake. It all depends on what you're willing to deal with. 

That being said, Windows just kind of ignored my jumper settings on my drives, installed all drivers along with bloat, etc. On Gentoo not only would you have to install specific drivers for your motherboard's LAN port and IDE controllers, but even jumper settings are observed. Perhaps jumper settings are observed in Windows, but it seemed to ignore them while I had been using Windows XP for a bit.

Anywho, thanks for your time and effort. My only remaining concern is drivers, how would you know what drivers my kernel .config should have? For example,

```
CONFIG_BLK_DEV_JMICRON=y
```

is my IDE controller's chipset driver. I also probably need other drivers too, ALSA, etc. I would jump right into this if I wasn't afraid it was going to break something. Gentoo seems particularly sensitive to breakage/tweaking, IMHO. You don't share my caution? You haven't broken your installation once or twice? Once, Portage complained something about Python, so I unmerged it. Yeah, it didn't like that.

----------

## ISHAIM

Well, you do have 

```
CONFIG_PATA_JMICRON=y
```

How does that differ from my setting of

```
CONFIG_BLK_DEV_JMICRON=y
```

?

Here is my current .config: http://pastebin.com/m4936ba24

----------

## pappy_mcfae

No, I'm not offended in the least. I recognize that with some people and their machinery, a certain, high level of angst can come when trusting another to get into its innards. I am one of those people. That's why I am the only one that works on my car, my computers, or any of the other myriad electronic gizmos I own.

However, there comes a point when we have to trust another because we've requested assistance. I've been there, and for those occasions, I know people who I would trust in such a situation. 

Why do I trust these people? Because they have proved they can do what it is they say. I have seen them in action, and seen the results of their work. That's enough for me.

The proof of my ability to make other peoples' machines work properly is fully documented here, in various and sundry threads. So, there is evidence that I know what I'm doing. 

Folks of the Aluminum Hat wearing variety would still probably think I was somehow implanting something in the .config that would signal the CIA where to direct their mind control rays. This is both impossible, and too far from the pale for a reasonable human to consider.

My motivations and methods are my own. I have explained them, and I stick by that explanation.

The point is I am not out to do anything but improve the Linux experience for my friends here at the Gentoo forums. That's it. No grand scheme to call the CIA. No kernel related surprises. 

If someone wishes to question me, I'm more than willing to answer. I have nothing to hide. And even if I did, I'm not wearing clothes, so I don't have anyplace to hide anything anyway. hehehe.

As for what I did and didn't do to your .config, study it and see. The settings I used will make any system run as well as can be expected. You can compare that to one of my seeds, or all of them. Note how uniform the settings are. And while there are a few oopses, there are a lot less than when I started making seeds.

You answered the jmicron issue yourself.

Blessed be!

Pappy

----------

