# Recovering from changing RC_DEVICE_TARBALL [SOLVED]

## gentsquash

I saw two postings (in which udev came up) which suggested, in

file /etc/conf.d/rc, changing RC_DEVICE_TARBALL from "yes" to

```
RC_DEVICE_TARBALL="no"
```

(I did at least have the smarts to make a copy of an ls listing

of /dev/ before doing this) and then I rebooted.

This did reduce the number of devices in /dev/ from about 1500 to

about 650.  Unfortunately, it also made device /dev/hdc vanish.

For me, this device was the cd-drive.

Could some kind soul either tell me how to get back to where I

was (returning to "yes" did not bring back /dev/hdc ) or else to

indicate to me how to use "udev rules" so that the device is

correctly created?

Indeed, how did the system know to associate /dev/hdc with the actual

cdrom hardware?

----------

## jdgill0

I am no udev expert, but I thought I would share what I do know.  Maybe someone more knowledgable will come along.

I use udev with RC_DEVICE_TARBALL="no".  I have a cdrom and a dvd burner.  I did nothing special with udev and I get /dev/hdc and /dev/hdd for each of them respectively.  I believe udev should pick them up without having to do anything special.  I too came from a previous devfs setup.

Are you by chance using ide-scsi emulation for your cdrom?

----------

## TranceTip

Same here. I switched to udev a couple of days ago (devfs previously) and my DVD burner was correctly detected das /dev/hdd

and /dev/cdrom*. I set RC_DEVICE_TARBALL to "no" as well and it worked like a snap from the beginning.Last edited by TranceTip on Wed May 04, 2005 11:26 am; edited 1 time in total

----------

## dsd

sounds like you missed ide cdrom support out of your kernel config

----------

## omnicloud

I just did this yesterday and it worked like a charm. No problem devides and it reduced the number of devices from 1600 or so to exactly 800.

----------

## gentsquash

Thanks all for your ideas and suggestions.

I think that I have fixed the problem by

```
modprobe ide-cd
```

and by putting "ide-cd" into file "/etc/modules.autoload.d/kernel-2.6".

Why did the cdrom-drive work previously, even with ide-cd not

started upon booting?  

My guess is that with /dev/hdc already existing (due to the

tarball), that accessing the cdrom-drive somehow magically

caused the ide-cd module to be loaded.  But with both the device

missing, and the module not loaded, nothing worked.

----------

## dsd

thats right, if a node for a driver exists, but the driver module isnt loaded, then the kernel will attempt to load the module when the node is accessed

----------

## gentsquash

Thank you.  Where is stored the association that tells the kernel

"If the user accesses /dev/hdc then do modprobe ide-cd", do you know?

----------

## dsd

inside the kernel. see:

http://www.kroah.com/log/linux/kmod_part1.html?seemore=y

http://www.kroah.com/log/linux/kmod_part2.html?seemore=y

----------

## gentsquash

Interesting  --thank you.

----------

## Gentree

So why does he need to tell udev that his ide-cd is an ide-cd before it ca make a node and load the driver?

I dont need to tell it my soundcard is a soundcard.

Surely that is the whole point of udev , otherwise we are going backwards to a situation where everyone needs to be a dev to run gentoo and each single pce of h/w needs to be configured by hand.

I thought udev was " the future" but it seems it requires more intervention than devfs ever did.

May be I missed something but it seems that way, even if it maybe more flexible at the same time.

I just switched my DVD from ide-scsi to ide-cd, that is fine but my true scsi cd player has now disappeared from the device list and been replaced by a duplicate link to the dvd.  :Evil or Very Mad: 

```
bash-3.00#ls -ail /dev/cd*

369 lr-xr-xr-x  1 root root 13 May 10 10:11 /dev/cdrom -> cdroms/cdrom0

/dev/cdroms:

total 0

151 drwxr-xr-x  1 root root  0 Jan  1  1970 .

  1 drwxr-xr-x  1 root root  0 Jan  1  1970 ..

388 lr-xr-xr-x  1 root root  6 May 10 10:11 cdrom0 -> ../hdb

373 lr-xr-xr-x  1 root root 33 Jan  1  1970 cdrom1 -> ../ide/host0/bus0/target1/lun0/cd

```

 duh!

I hope I dont need to start writing specific rules just to see my cdplayer.

Any advice welcome . Thx. :Cool: 

----------

## dsd

 *Gentree wrote:*   

> So why does he need to tell udev that his ide-cd is an ide-cd before it ca make a node and load the driver?

 

its the other way round - you load the driver, the driver registers with sysfs, then udev creates the node. this has always been the convention.

the difference here is that gentsquash built ide-cd as a module. on any sane and normal setup, you'd build ide-cd into the kernel image. there seems to be a big misconception resulting in people building things as modules when they really dont want to.

 *Quote:*   

> I dont need to tell it my soundcard is a soundcard.

 

because you either autoload the modules (suggested) or build your sound drivers into the kernel image.

 *Quote:*   

> I thought udev was " the future" but it seems it requires more intervention than devfs ever did.

 

devfs' over-agressive module loading is one of the most broken things that is why udev came around. udev doesnt require intervention on normal setups. most distro's didnt adopt devfs because of its problems like this.

 *Quote:*   

> 
> 
> I just switched my DVD from ide-scsi to ide-cd, that is fine but my true scsi cd player has now disappeared from the device list and been replaced by a duplicate link to the dvd. 
> 
> 

 

i thought scsi cdroms were named as /dev/scd*

----------

## Gentree

Thanks for the explainations. 

Seems indeed some issues were due to having ide-scsi and/or ide-cd as modules.

I'm obvioulsy going to have to go udev at some stage so I have been working on it far a couple days  :Rolling Eyes:  and am getting somewhere.

```
bash-3.00#ls -ail /dev/cd*

1425 lrwxrwxrwx  1 root root 3 May 12 13:17 /dev/cdrom -> sr0

1535 lrwxrwxrwx  1 root root 3 May 12 13:17 /dev/cdrom1 -> sr1

1536 lrwxrwxrwx  1 root root 3 May 12 13:17 /dev/cdrw -> sr1

bash-3.00#ls -ail /dev/dvd

1537 lrwxrwxrwx  1 root root 3 May 12 13:17 /dev/dvd -> sr1

bash-3.00#ls -ail /dev/sr*

1424 brw-rw----  1 root root 11, 0 May 12 13:17 /dev/sr0

1534 brw-rw----  1 root root 11, 1 May 12 13:17 /dev/sr1

bash-3.00#ls -ail /dev/sg*

1695 crw-rw----  1 root root 21, 0 May 12 13:17 /dev/sg0

1698 crw-rw----  1 root root 21, 1 May 12 13:17 /dev/sg1

```

and the big picture:

```
bash-3.00#ls /dev

adsp      hda12    loop0      ram1    snd      tty19  tty38  tty57    vcc

agpgart   hda13    loop1      ram10   sndstat  tty2   tty39  tty58    vcs

audio     hda14    loop2      ram11   sound    tty20  tty4   tty59    vcs1

cdrom     hda15    loop3      ram12   sr0      tty21  tty40  tty6     vcs12

cdrom1    hda16    loop4      ram13   sr1      tty22  tty41  tty60    vcs2

cdrw      hda2     loop5      ram14   stderr   tty23  tty42  tty61    vcs3

console   hda3     loop6      ram15   stdin    tty24  tty43  tty62    vcs4

core      hda4     loop7      ram2    stdout   tty25  tty44  tty63    vcs5

discs     hda5     mem        ram3    tts      tty26  tty45  tty7     vcs6

dsp       hda6     misc       ram4    tty      tty27  tty46  tty8     vcs7

dvd       hda7     mixer      ram5    tty0     tty28  tty47  tty9     vcsa

dvdrw     hda8     null       ram6    tty1     tty29  tty48  ttyS0    vcsa1

fb        hda9     nvidia0    ram7    tty10    tty3   tty49  ttyS1    vcsa12

fb0       ide      nvidiactl  ram8    tty11    tty30  tty5   ttyS2    vcsa2

fbsplash  initctl  nvram      ram9    tty12    tty31  tty50  ttyS3    vcsa3

fd        inotify  port       random  tty13    tty32  tty51  ttyS4    vcsa4

full      input    ppp        rd      tty14    tty33  tty52  ttyS5    vcsa5

hda       kmem     psaux      rtc     tty15    tty34  tty53  ttyS6    vcsa6

hda1      kmsg     ptmx       sg0     tty16    tty35  tty54  ttyS7    vcsa7

hda10     log      pts        sg1     tty17    tty36  tty55  urandom  zero

hda11     loop     ram0       shm     tty18    tty37  tty56  vc

```

No scuds. That part of the prob , it all seems very ephemeral these naming convensions.

Anyway, that looks fairly sensible but leaves me with quite a few config issues.

xcdroast is fine, probably because it works at a lower level and does not worry about /dev/ at all, at least it confirms h/w and kernel.

 app-cdr/k3b-0.11.24 sees the devices correctly , which is a leap ahead. hwvr it loops trying to read copy an audio cd in the scsi cd, starts reading just stays at 0% indef.

xine-lib/xine-ui/gxine cant play audio CD in /dev/dvd . Prob a xine-lib config but I'm beat on that one.

cdplay seems fine on both drives  :Very Happy: 

----------

