Maroš Žilka wrote:
> I was reading The Linux System Administrator's Guide
> [http://www.tldp.org/LDP/sag/html/index.html] and there is stated that
> device files are creatied by /dev/MAKEDEV but in my debian stable
> instalation /dev/MAKEDEV is just symbolic link to /bin/true and i also
> find out that there is package makedev which provides that but it is
> not installed, so my question is what is default mechanism for debian
> to fill /dev/ and more specifically how are /dev/loop* files created.

That documentation is the classic legacy way.  It has since been
completely obsoleted.  The new way is with "udev".  The goal is to
create an event driven strategy to handle hotplugged devices such as
pcmcia and usb and any other hot plugged device.  Currently with udev
/dev is a tmpfs ram file system and udev creates devices there as
needed.  Being a ram file system it is created fresh with every
reboot.

  $ df -lhT /dev
  Filesystem    Type    Size  Used Avail Use% Mounted on
  udev         tmpfs    1.8G  244K  1.8G   1% /dev

The kernel will notice that a device appears.  It will notify udev.
udev will create a new device for it as it appears.  The device is
removed.  The kernel will notice it is gone and notify udev.  udev
will remove the device.  It is dynamic.

This means that /dev only contains things relevant to the current
system and does not need to have thousands of entries statically
created for all of the devices in the world when you will only have a
fraction of them on your system at any time.  This addresses the issue
that /dev was unwieldy large before with static entries.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to