LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-28-2007, 09:11 PM   #1
baloon
LQ Newbie
 
Registered: Jan 2007
Posts: 20

Rep: Reputation: 0
Exclamation which module creates device files


Hello

I am having some difficulty with the cdrom device. I like to know during installation which module / script will be creating /dev/* entries. I am more interested about /dev/cdrom and /dev/scd[0-9] etc.

Any pointers will be appreciated.

Thanks
-B
 
Old 03-28-2007, 10:38 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
If you are using a recent 2.6 kernel, I believe (not sure) that these entries are created dynamically at run time instead of at installation time. Do an internet search on udev if you want to look up info on this.
 
Old 03-28-2007, 10:40 PM   #3
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
If you are using a 2.4 kernel, hotplug (a/ script(s)) typically deals with the device nodes in /dev.
With 2.6 kernels, hotplug is replaced by the UDEV system (a program and script(s).

I think this is pretty universal, but some distributions may have slight variations on each thing.

What exactly are you trying to do? And with what distribution? During boot, you mean, or actually during installation? During installation of a system, I don't know if any device nodes are specifically created, or if they would be created for the first time upon the first reboot when installation is done.
And as stated by the above person, /dev nodes are re-created dynamically after each boot.

Last edited by GrapefruiTgirl; 03-28-2007 at 10:41 PM.
 
Old 03-29-2007, 12:29 AM   #4
baloon
LQ Newbie
 
Registered: Jan 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Hello


Thanks for the replies. I am trying to install RHEL AS3 U8. In this cdrom drive will be emulated as scsi drive by setting a boot parameter as hdc=ide-scsi. But for the device to be emulated as scsi, the device node to be used has to be /dev/scd0 where as in AS3 U8 /dev/cdrom is a symlink to /dev/hdc. ( I checked in U6 and it is being created correctly. /dev/cdrom ->/dev/scd0 ) so if it is set like this, I cannot mount cdrom drive. If I change the link /dev/cdrom to point to /dev/scd0, cdrom can be mounted. So got a kind of confused on why it got changed in U8, and how it can be rectified.

As you said udev is creating this, I also got this hint some times back .. but I didn't get much idea on what how it is done and how udev works in RHEL AS3. Any pointers to that .. ??

When you say it will be dynamically created, will it be at boot time or even during run time it will be changed. I guess it is during boot time ???

I want to see why does udev create a link pointing to /dev/hdc instead of /dev/scd0.

Thanks
-B
 
Old 03-29-2007, 01:04 AM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
RE: "How UDEV works in RHEL AS3"..... I suppose it works the same way as in any distribution. I can't be specific to RH as I use Slackware, but I am assuming that UDEV is UDEV, regardless of the Linux version. To be vague and simplistic the computer saves the /dev directorys contents at shutdown, so that any special or weird human-made nodes are preserved, and upon reboots, the machine detects all the hardware, drives, devices, etc, and creates the needed nodes for them, plus any human-made or weirdo nodes.
UDEV also uses (depending on the system) a RULES file (or several of them) and ALIASES to create special device links.
As for why exactly RH is creating a dev-link to hdc instead of scd0, I have no idea, but the CDROM device is *probably* not an actual scsi device, but in your case, you are needing direct native-scsi functionality to get the drive to do what you want it to do. ATA/ATAPI and most similar optical drives use the scsi command set internally anyways; it's just 'wrapped' with something newer (ATAPI) unless the drive is very old or very rare.
In any case, just delete the sym-link you don't want, and make a new one and it should remain in place across reboots and you'll forget all about it! The man page for the ln command gives details, but in case you don't know, you'll want something like:
ln -s /dev/new-link /dev/scd0
 
Old 03-29-2007, 11:26 AM   #6
baloon
LQ Newbie
 
Registered: Jan 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Hello

thanks a lot for the detailed reply. I changed the link and it works well now. But thought of doing some more research - that is why dig into depth.

I am a bit confused about the scsi emulation. At what circumstances we kernel for for scsi emulation for cdrom drive - any idea ? Is it mandatory for all the cdrom drives ( I don't think so ) or is it required for some of the drives ( I think yes !! ) .. what parameter decides that scsi emulation is required for this cdrom .. ??? any pointers ..

-B
 
Old 03-29-2007, 12:17 PM   #7
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I personally cannot answer that question--- I would try Google, and searching for related threads on LQ here.
Also, try the man pages for lilo, mount, fstab, lilo.conf.
I don't know what reason(S) *exactly* make it necessary to use hdx=ide-scsi|ide-cdrom or similar parameters. You are right it is not mandatory most of the time, but is probably absolutely necessary for a few devices..
Best of luck If you find conclusive/concise info, please do post it.
 
Old 03-29-2007, 02:45 PM   #8
baloon
LQ Newbie
 
Registered: Jan 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for the help .. I will try to find some pointers and put it here if I find any useful stuff ..
 
Old 03-29-2007, 03:00 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
On 2.4 kernels you need that entry in boot, but for recent 2.6 kernels, emulating a scsi device isn't necessary. It may have to do with the version of cdrecord that you have. If it is a recent version then I doubt whether you still need to do it. I haven't had to for the last couple years at least.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Piracy creates jobs, FOSS creates opportunities LXer Syndicated Linux News 0 11-02-2006 11:33 AM
Slax 5.06: configsave creates incorrect mo-files simplix Linux - Newbie 0 07-30-2005 02:57 AM
Mplayer creates .png files. No video. mooreted Linux - Software 4 10-10-2004 07:42 PM
Printing from Mozilla creates 200Mb files in /var/spool/cups mikeyt_333 Linux - Software 3 05-23-2004 12:47 PM
Linux creates buggy folders/files on fat32 chily Linux - General 4 03-14-2004 09:43 PM


All times are GMT -5. The time now is 10:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration