Re: how to recovry /dev/null



Matt <matt@xxxxxxxxxxxxxxxxxxxxx> writes:

Joe Pfeiffer wrote:

The Documentation/devices.txt

Where is that?

Sorry -- .../Documentation/ is a directory in the kernel source tree.
Where exactly it is depends on your distribution (and whether you've
even downloaded the source tree); on my debian testing system, the
most recent source tree I've got is for 2.6.15, so the full path to
the file I mentioned is
/usr/src/linux-source-2.6.15/Documentation/devices.txt
YMMV (a lot)

and what I've got on my system agree
with Måns (i.e. 1 3), not with what you found on the web. 2 2 should
be a psdeudo-tty.

Where is the documentation regarding major and minor device numbers?

Describing major and minor numbers is easier than trying to find the
documentation: under unix-derived systems, including Linux, to a
first approximation devices can be divided into "character" devices
and "block" devices. The essential differences between the two are
whether the system is free to reorder writes to the devices, and
whether they can have filesystems on them (character devices can't,
block devices can). Within the two basic types of device, the major
number gives the type of device, and the minor device gives which
device of that type it is.

The list of what devices have been assigned various major and minor
numbers is in the file I described above.
.