Subject: Re: /dev/[r]sd[5,6]* devices by default ?
To: Matthias Buelow <mkb@zook.informatik.uni-wuerzburg.de>
From: David Laight <David.Laight@btinternet.com>
List: port-sparc
Date: 01/09/2002 12:00:08
> >> I had to `sh ./MAKEDEV sd5`, as MAKEDEV all didn't work.

> 
> >I'd suggest either:
> >
> >1) writing a startup script that detects which disks (etc) are present
> >   and then making the correct /dev entries
> >
> >2) make /dev an overlay of a kernel generated dircetory structure under
> >   a file system one.  The device drivers would make calls to populate
> >   the lower layer with nodes that match the current configuration.
> 
> why complicate things so much?  if adding disks, you have to do various
> things manually anyways (disklabel, newfs), running MAKEDEV is probably
> not too time consuming.

One advantage of the kernel generated 'dev' directory (tree) is that it
doesn't require fixed major numbers.  Drivers can be allocated a major
number at install time (or system startup) without requiring any scripts
to know the assigned values.

The Linux 'device number table' is truly horrid!  A company I used to
work for shipped a suite of comms protocol stack code for Unix (Solaris
and Unixware), the whole lot required a significant number of major
device numbers - allocatable at driver install time on those systems.
Only a relatively small number of devices require fixed major numbers
that are creatable by a simple MAKEDEV script.


> I personally strongly dislike startup scripts searching for "new hardware",
> like on Windows or RedHat.

For disks, the device driver has already 'found' the disks, all the script
would be doing is creating the canonical entries to allow these to be
accessed.

Option 3:

Put the entries in /dev/sd/xx and make the disk driver mount a filesystem
than contains the names of the drivers and partitions (slices) that exist.

(I certainly hate the windows - I've found some hardware, you must want to
use it scheme...)

    David