LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   udev and kernel 3.6.7 not working? (http://www.linuxquestions.org/questions/slackware-14/udev-and-kernel-3-6-7-not-working-4175438457/)

dimm0k 11-23-2012 02:52 PM

udev and kernel 3.6.7 not working?
 
Currently running Slackware 14.0_x64 with kernel 3.6.7. I built this kernel using the config file from /testing and from the looks of it, there were not many options that were added when I issued the 'make oldconfig' command.

Anyway after realizing I had to manually make a link for /dev/dvdrom, I decided that I probably needed udev to re-create the 70-persistent-cd.rules so that /dev/dvdrom would get created without my intervention. I removed the 70-persistent-cd.rules file and upon reboot that file was never re-created. Booting off the Slackware DVD that file does get created with no problems and /dev/dvdrom as well. This is also the case if I boot off of the stock 3.2.29 kernel (tested with generic). If I boot off of 3.6.7 70-persistent-cd.rules is ignored and never created if it's missing. Did I miss something or is something extra needed for kernel 3.6.7?

EDIT: this looks like it's happening on kernel 3.4.4 as well... booted off of a live CD (partedmagic) and 70-persistent-cd.rules does not get created either...

markush 11-24-2012 04:22 AM

Hi,

are you sure that udev causes the problem? Isn't it possible, that there's the module for the device missing?

I would compare which modules are loaded for both kernels, 3.2.29 and 3.6.7 with lsmod. You can use
Code:

lsmod | sort > 3.2.29.txt
and
Code:

lsmod | sort > 3.6.7.txt
If the the module for the device isn't loaded in 3.6.7 and cannot be loaded even with modprobe, the module may be missing and you have to rebuild the kernel. But if the module is present and doesn't load automatically, I would really suspect a problem with udev.

Maybe my explanation isn't clear enough ;) what I mean is: if the kernel doesn't recognice your optical device, udev doesn't know it's there and does nothing.

Markus

Edit: you may as well compare lspci -k for both kernels

gmgf 11-24-2012 06:01 AM

It's probably an udev problem, same here, with kernel series 3.4, 3.5 and 3.6.

i think another post, here, related to this problem, but i have no time to find it.

AlleyTrotter 11-24-2012 02:01 PM

I'm running slackware64-14.0 kernel 3.6.7 without any DVD problems. The only config changes from generic64 in testing was y to the vmware question, y to EFI_STUB and y to EXT4 as it's the only file system I use.
The "/lib/udev/rules.d/70-persistent-cd.rules" file does not get created on a bare metal install. With that in mind it must not be a necessary part of 14.0. In kde DVDs mount with the panel launcher automagically and from a shell login terminal they are mounted as /dev/sr0 same as CDs
John

gmgf 11-24-2012 02:30 PM

Yes i agree, but just /lib/udev/write_cd_rules, don't work correctly.

AlleyTrotter 11-24-2012 02:46 PM

Quote:

Originally Posted by dimm0k (Post 4835671)
Currently running Slackware 14.0_x64 with kernel 3.6.7. ... I decided that I probably needed udev to re-create the 70-persistent-cd.rules so that /dev/dvdrom would get created without my intervention. ... Booting off the Slackware DVD that file does get created with no problems ...

On a bare metal install "70-persistent-cd.rules" file does not get created.
Maybe I just did not understand the problem.
John

dimm0k 11-24-2012 03:35 PM

Ok, so here's what I have found with a little digging. With kernel 3.2.29, 70-persistent-cd.rules handles my DVD-ROM by using ENV{ID_PATH}. to locate my device. With kernel 3.6.7, ID_PATH no longer exists for whatever reason so it all the rules that point to this particular device are ignored. Replacing ID_PATH with some other unique key displayed with "/sbin/udevadm info -p /sys/block/sr0 --query=env", such as ID_SERIAL_SHORT corrects this.

The weird thing is under kernel 3.2.29 70-persistent-cd.rules does get created. It's the later kernels that don't, as witnessed when you boot off of the Slackware 14.0 DVD.

Speaking with one of the devs on this through the systemd mailing list it looks like future versions of udev will drop generation of these rules altogether...

Quote:

Newer udev versions dropped all persistent rule generators, we will
not create any system config from device hotplug handlers anymore. It
turned out to be the wrong thing and it created more problems than it
solved.

@AlleyTrotter, accessing my DVD-ROM is no problem at all either. Access to /dev/sr0 works, but it's the missing symlinks, ie. /dev/dvd, that prevent certain programs from accessing the device from defaults. In my case vlc wanted to access /dev/dvd and it was missing... that was actually what prompted this whole "issue" for me.

I'm going to mark this one as resolved...

AlleyTrotter 11-24-2012 04:12 PM

Quote:

Originally Posted by dimm0k (Post 4836191)
The weird thing is under kernel 3.2.29 70-persistent-cd.rules does get created. It's the later kernels that don't, as witnessed when you boot off of the Slackware 14.0 DVD.
I'm going to mark this one as resolved...

I beg to differ. This built from brand new parts and installed yesterday Slackware64-14.0 does not have the "70-persistent-cd.rules". You must have done an update and not a wipe and install. I installed from the DVD huge kernel 3.2.29 and later built the 3.6.7 kernel. The install was terse with all defaults accepted. So that said, at least on this system the file was never created. I believe it was a left over from your 13.37 install. If not it must be WUJU
John

mlangdn 11-24-2012 06:46 PM

Hmmmmm. I just did a clean install of Slackware64-14, and "70-persistent-cd.rules was created somewhere along the way. /dev/dvd though points to sr1 instead of sr0. /dev/dvd0 points to sr0, and /dev/dvd1 points to sr1. Just a bit weird. That said, I dislike udev and its goofy rules.

dimm0k 11-24-2012 07:03 PM

Quote:

Originally Posted by AlleyTrotter (Post 4836204)
I beg to differ. This built from brand new parts and installed yesterday Slackware64-14.0 does not have the "70-persistent-cd.rules". You must have done an update and not a wipe and install. I installed from the DVD huge kernel 3.2.29 and later built the 3.6.7 kernel. The install was terse with all defaults accepted. So that said, at least on this system the file was never created. I believe it was a left over from your 13.37 install. If not it must be WUJU
John

Well that's the thing... I booted off the DVD-ROM for Slackware 14.0 and it does create that specific file. I'm not booting into my hard drive through the DVD, but booting as if I were going to install. Also with the stock 3.2.29 kernel if I were to remove that file and boot, that file does get recreated. While you may be seeing different, I'm beginning to believe that it's "normal" as udev is a hairy thing that works through some sort of black magic. As you can see from mlangdn's post his results are even more crazy.

AlleyTrotter 11-25-2012 08:30 PM

Black magic I agree "WUJU"
One thing I did not mention which could probably be important!
I did a UEFI install. That may address the hardware differently than BIOS I believe.
Don't want to drag this out but that may be an important consideration for someone else reading this thread.
Thanks
John


All times are GMT -5. The time now is 03:58 PM.