Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Annoying udev problem with 2 DVD-ROM drives [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sun Nov 26, 2006 9:00 pm    Post subject: Annoying udev problem with 2 DVD-ROM drives [SOLVED] Reply with quote

Hi all,

For some time udev has been messed up with respect to handling two dvd rom drives. Usually it's ok, but sometimes it misassigns names so that the dvd drive that was assigned 0 is now assigned 1 and vice versa. I know that the original device names (hdc and hdd) are ok and still correspond to the correct drives, but when the devices are made via udev, it can be screwed up sometime. Also, I just managed to temporarily fix the problem by typing in udevstart from root.

Anybody have an idea of how to permanently fix this annoyance?

Best,

Alex


Last edited by evoweiss on Sun Feb 04, 2007 8:43 pm; edited 3 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54856
Location: 56N 3W

PostPosted: Sun Nov 26, 2006 10:05 pm    Post subject: Reply with quote

evoweiss,

Use /dev/hdc and /dev/hdd in /etc/fstab or follow this guide to write some udev rules to fix the names based on the serial numbers or something unique to each drive.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sun Nov 26, 2006 11:17 pm    Post subject: Reply with quote

Hey NeddySeagoon,

Adding the following lines to /etc/udev/rules.d/50-udev.rules did the trick:

Code:
BUS=="ide",     KERNEL=="hdc",  SYMLINK+="cdrom",       GROUP="cdrom"
BUS=="ide",     KERNEL=="hdd",  SYMLINK+="cdrom1",      GROUP="cdrom"


Best,

Alex
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54856
Location: 56N 3W

PostPosted: Sun Nov 26, 2006 11:21 pm    Post subject: Reply with quote

evoweiss,

Don't do that, etc-update will want to replace that file every time udev is updated.
Make a new file that starts with a number less than 50, otherwise any name you like. Rules files are run in order, starting with 00 and you want your rules to be applied before the defualt 50-udev.rules.

Put your CDROM rules in your new file, then you won't be disappointed when you run etc-update.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sun Nov 26, 2006 11:26 pm    Post subject: Reply with quote

Hi again NeddySeagoon,

Done!

Alex
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sun Dec 03, 2006 4:15 pm    Post subject: Reply with quote

Hi again all,

Unfortunately, that didn't solve the problem as a reboot caused the drives to be misassigned again! However, I found out that typing in udevstart fixes the problem. So, in short, what the hell am I doing wrong? To fix this annoying problem with the HDDs time being out of sync I hadded a file .critical to the /etc/runlevels/boot/ directory. It contains the following:

Code:
clock checkroot modules checkfs localmount bootmisc


Anyway, if anybody knows how to get things working on a permanent basis, I'd appreciate it.

Best,

Alex
Back to top
View user's profile Send private message
chewbar
n00b
n00b


Joined: 03 Jan 2007
Posts: 2

PostPosted: Thu Jan 04, 2007 8:45 pm    Post subject: Reply with quote

Hi.

I have exactly the same situation with two dvd drives. My new rules work fine when if I run udevstart but I want the devices to be created at boot time.

Does anyone know whether this is the correct behaviour or not? Surely udev should be started at boot..

Thanks.
Back to top
View user's profile Send private message
gary
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jan 2004
Posts: 110
Location: Auburn, CA

PostPosted: Fri Jan 05, 2007 3:23 am    Post subject: Me too! Reply with quote

Same problem here.

I have a SCSI cdrw and an IDE cdrom.

UDEV now wants to link cdrom, cdrom1, cdrw, and cdrw1 all to sr0, which is my cdrw. It works like a champ, but my cdrom is not accessible.

Running udevstart reassigns cdrom and cdrom1 to hdb, which is correct. It also creates cdrom3, cdrw2 and cdrw3, which did not previously exist.

Strange.

Perhaps we do not have UDEV starting when or how it should at boot? How could we check?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Jan 05, 2007 9:35 am    Post subject: Re: Me too! Reply with quote

I'd just add custom rules to 10-local.rules, to force udev to use the right names the first time.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sat Jan 06, 2007 6:11 pm    Post subject: Re: Me too! Reply with quote

PaulBredbury wrote:
I'd just add custom rules to 10-local.rules, to force udev to use the right names the first time.


Already tried that, though used a different file name. I just changed that file name to 10-local.rules and it's still not working. Again, running udevstart fixes the problem, suggesting that my udev rules are in order, but udev is not being run at boot up. How can we figure out what's going on, and, more importantly, how to fix it?

Best,

Alex
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Jan 07, 2007 8:36 am    Post subject: Reply with quote

man udev mentions debug in /etc/udev/udev.conf
Back to top
View user's profile Send private message
holycow
n00b
n00b


Joined: 04 Jul 2005
Posts: 29

PostPosted: Mon Jan 08, 2007 4:44 am    Post subject: Reply with quote

I use 80-local.rules to tell udev to set the proper symlinks. This lets you override udev rules.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Jan 10, 2007 10:55 pm    Post subject: Reply with quote

PaulBredbury wrote:
man udev mentions debug in /etc/udev/udev.conf


Ok, I turned on logging in that. Unfortunately, I can't seem to find a log file.

Alex
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Jan 10, 2007 10:59 pm    Post subject: Reply with quote

evoweiss wrote:
Unfortunately, I can't seem to find a log file.

The normal default is /var/log/messages - you actually have to be running a logger :wink: emerge syslog-ng
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Jan 10, 2007 11:09 pm    Post subject: Reply with quote

Hi,

I've got a logger and here's what I see in my everything log file.

Code:
Jan 10 22:53:37 [udevd] add_to_rules: invalid KERNEL operation
Jan 10 22:53:37 [udevd] add_to_rules: invalid rule '/etc/udev/rules.d/30-svgalib.rules:1'


Not overly helpful. Looking at 30-svgalib.rules reveals...

Code:
KERNEL="svga*", NAME="%k", MODE="0660", GROUP="video"


Alex
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Jan 10, 2007 11:13 pm    Post subject: Reply with quote

evoweiss wrote:
KERNEL="svga*"

That should be "==", not a single equals sign. It's a comparison.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Jan 10, 2007 11:24 pm    Post subject: Reply with quote

Bump...
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Mon Jan 29, 2007 8:26 pm    Post subject: Reply with quote

Re-bump...
Back to top
View user's profile Send private message
branchcut
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2004
Posts: 115
Location: Montreal, Quebec

PostPosted: Wed Jan 31, 2007 1:34 am    Post subject: Reply with quote

I'm having issues in this area as well. I have a DVD-ROM drive for hdc and a DVD Writer for hdd. Unfortunately, the symlinks look like this:

cdrom -> hdd
cdrom1 -> hdd

Any ideas?

Desmond
_________________
Blessed Are They Who Go Around In Circles,
For They Shall Be Known As Wheels
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Sun Feb 04, 2007 8:43 pm    Post subject: Reply with quote

Hi all,

Upgrading to udev-104-r8 fixed it for me. If it seems to work for everybody else, let's mark this as solved.

Best,

Alex
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum