i think it depends. some are softlinks in /dev/ some are created by udev after udevd read the configuration file, many scenario involved (just search for "util_create_path" inside udev source codes and u can what are all the situation).<div>
<br></div><div>but for harddisk (whose partition is also the rootfs) /dev/sda is created during kernel booting up (inside the initrd file, just gunzip and extract out the cpio file, eg, view the file scripts/local and u can see it make the /dev/sdXXXX nodes based on /sys/block/XXXX information, which in turn depends on the kernel calling xxxx_device_register() functions (there a few variations of them - organized hierarchically)). </div>
<div><br></div><div>on the other hand, if /dev/sda is not the rootfs, but just a normal harddisk listed in /etc/fstab, then likely it is mounted by udev, detecting it, and then calling (indirectly from userspace to kernel) sd_probe_async(), which will then printk() out the "Write Protect is off" message in your dmesg output - anytime u plug in the harddisk u can see this.<br>
<div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Feb 6, 2013 at 1:26 AM, horseriver <span dir="ltr"><<a href="mailto:horserivers@gmail.com" target="_blank">horserivers@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi:)<br>
<br>
During booting period .every device will have a node at /dev/ folder.<br>
what is the detail of ths procedure?<br>
<br>
thanks!<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Peter Teoh
</div>