How can I know what the model of my cd which I need to fill in the cdrom symlink.

nadav vinik nadavlists at gmail.com
Mon Aug 7 15:28:39 PDT 2006


yes it is in the book:

udevtest /block/hdd

Look at the lines containing the output of various *_id programs.

but the problem is:
root:/# udevtest /block/hdd
main: unable to open '/block/hdd'


On 8/8/06, Dan Nicholson <dbn.lists at gmail.com> wrote:
> On 8/7/06, nadav vinik <nadavlists at gmail.com> wrote:
> >
> > Which model should I need to fill in ENV{ID_MODEL}=="SAMSUNG_CD-ROM_SC-148F"?
> >
> > Is there a list of available models?
>
> Try udevinfo. Assuming your drive is /dev/hdc, here's what it says on my system.
>
> $ udevinfo -q all -p /sys/block/hdc
> P: /block/hdc
> N: hdc
> S: cdrom
> S: cdrw
> S: disk/by-id/ata-PLEXTOR_CD-R_PX-W4824A_710150
> S: disk/by-path/pci-0000:00:07.1-ide-1:0
> E: ID_TYPE=cd
> E: ID_MODEL=PLEXTOR_CD-R_PX-W4824A
> E: ID_SERIAL=710150
> E: ID_REVISION=1.05
> E: ID_BUS=ata
> E: ID_PATH=pci-0000:00:07.1-ide-1:0
>
> The E: prefixed variables are referenced by ENV{ID_MODEL}, for
> example. This should probably be in the book. There's another example
> of using udevinfo at the bottom of the page. You can also get this
> from `udevinfo -q env ...'. man udevinfo.
>
> > I check in my ubuntu usev rules and there is:
> >
> > # Create /dev/cdrom* symlinks for CD-ROM devices
> > BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", ACTION=="add", \
> >         IMPORT{program}="cdrom_id --export $tempnode"
> > BUS=="scsi", KERNEL=="sr[0-9]*", ACTION=="add", \
> >         IMPORT{program}="cdrom_id --export $tempnode"
> > ENV{ID_CDROM}=="?*",                    SYMLINK+="cdrom"
> > ENV{ID_CDROM_CD_RW}=="?*",              SYMLINK+="cdrw"
> > ENV{ID_CDROM_DVD}=="?*",                SYMLINK+="dvd"
> > ENV{ID_CDROM_DVD_R}=="?*",              SYMLINK+="dvdrw"
>
> This could work, since you should have the cdrom_id program. It
> exports the ID_CDROM* variables, I think. I'd wait to hear from our
> local guru, Alexander Patrakov, because I think that method might have
> bugs.
>
> --
> Dan
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>



More information about the lfs-support mailing list