Problems with udev - Slackware

This is a discussion on Problems with udev - Slackware ; Mr. Usenet wrote: > Here is a summary of my final results in trying to make /dev/cdrom > always point to /dev/hdc. > > It looks like the only thing that will work for me is to change > the ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 24 of 24

Thread: Problems with udev

  1. Re: Final report was Re: Problems with udev

    Mr. Usenet wrote:
    > Here is a summary of my final results in trying to make /dev/cdrom
    > always point to /dev/hdc.
    >
    > It looks like the only thing that will work for me is to change
    > the lines in:
    >
    > /etc/udev/rules.d/75-optical-devices.rules
    >
    > from:
    >
    > ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-1:1",
    > SYMLINK +="cdrom"
    >
    > to
    >
    > ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-0:0",
    > SYMLINK +="cdrom"
    >
    > So I recommend setting the link first in /dev/
    >
    > %rm /dev/cdrom
    > %ln -sf /dev/hdc /dev/cdrom
    >
    > and then making the change above.
    >
    > Everything else I did as mentioned in the previous posts resulted in
    > it being
    > occasionally overwritten by udev on the next boot up to /dev/hdd.
    >
    > I still don't understand the behavior of udev or what the numbers
    > above mean,
    > but everything seems to work, so ...
    >
    > Anyway, thanks for all who replied so that I could solve this problem.




    One more follow-up to my last post. My handmade link to /dev/cdrom
    did not survive. It seems udev is re-doing the directory /dev/ on
    each boot up. So I have to add the rule:

    99-cdrom.rules

    in:

    /etc/udev/rules.d

    which contains the lines:

    -------------------------------

    #
    # I need this file to ensure that /dev/cdrom is
    # a symbolic link to /dev/hdc.
    #
    # /etc/udev/rules.d
    #

    KERNEL=="hdc", SYMLINK="cdrom"

    -------------------------------

  2. Re: Final report was Re: Problems with udev

    ["Followup-To:" header set to alt.os.linux.slackware.]
    On 2008-01-21, Mr. Usenet wrote:
    > Mr. Usenet wrote:
    >> Here is a summary of my final results in trying to make /dev/cdrom
    >> always point to /dev/hdc.
    >>
    >> It looks like the only thing that will work for me is to change
    >> the lines in:
    >>
    >> /etc/udev/rules.d/75-optical-devices.rules
    >>
    >> from:
    >>
    >> ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-1:1",
    >> SYMLINK +="cdrom"
    >>
    >> to
    >>
    >> ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-0:0",
    >> SYMLINK +="cdrom"
    >>
    >> SNIPPED

    >
    > One more follow-up to my last post. My handmade link to /dev/cdrom
    > did not survive. It seems udev is re-doing the directory /dev/ on
    > each boot up.



    You'll note that this is *exactly* what I told you.


    > So I have to add the rule:
    >
    > 99-cdrom.rules
    >
    > in:
    >
    > /etc/udev/rules.d
    >
    > which contains the lines:
    >
    > -------------------------------
    >
    > #
    > # I need this file to ensure that /dev/cdrom is
    > # a symbolic link to /dev/hdc.
    > #
    > # /etc/udev/rules.d
    > #
    >
    > KERNEL=="hdc", SYMLINK="cdrom"
    >
    > -------------------------------



    If you're truly on Slackware as you say you are, then the original
    75-optical-devices.rules file that I mentioned in my first reply
    will handle that.

    -RW

  3. Re: Final report was Re: Problems with udev

    On Tue, 22 Jan 2008 03:36:58, Robby Workman said:

    >You'll note that this is *exactly* what I told you.


    No argument here. And I thank you again for the advice.

    >> So I have to add the rule:
    >> 99-cdrom.rules
    >> in:
    >> /etc/udev/rules.d
    >> which contains the lines:


    >If you're truly on Slackware as you say you are, then the original
    >75-optical-devices.rules file that I mentioned in my first reply
    >will handle that.


    I'm on Slackware 12.0. I do have to take exception to
    using 75-optical-devices.rules to point to /dev/hdc though. On
    the line:

    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-0:0", SYMLINK
    +="cdrom"

    I'm guessing that the number to play with is ide-0:0, where I change
    it to
    ide-1:0, ide-2:0, ide-0:1, etc.. But I prefer my custom solution,
    where now
    "cdrom" points to nothing, and I use a custom rule to specifically set
    it to
    /dev/hdc. I try to limit changing numbers that I know very little
    about, since
    sometimes the configuration can be very sensitive to these types of
    changes.
    Plus, it's more intuitive to me to have a file where I explicitly set /
    dev/cdrom
    to hdc.

    Anyway, people searching google now can hopefully have a few options
    if they
    encounter this problem.


  4. Re: Final report was Re: Problems with udev

    One more report. Based on the post by jayjwa, I used the tool systool
    to
    see what numbers correspond to which devices in the file:

    /etc/udev/rules.d/75-optical-devices.rules

    So typing in:

    systool -b ide -v:

    gave me the result:

    Device = "1.0"
    Device path = "/sys/devices/pci0000:00/0000:00:1f.1/ide1/1.0"
    drivename = "hdc"
    media = "cdrom"
    modalias = "ide:m-cdrom"
    uevent =

    and I changed the line:

    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-0:0", SYMLINK
    +="cdrom"

    to

    ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-ide-1:0", SYMLINK
    +="cdrom"

    so things now work very well, and I can remove my custom rules. This
    solution is
    better since "ide-0:0" actually points to my first hard drive /dev/
    hda. So this
    is what I would recommend people do if they have a conflict of
    devices.


+ Reply to Thread
Page 2 of 2 FirstFirst 1 2