Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2002 21:07:49 -0600
From:      Sean Kelly <smkelly@zombie.org>
To:        kai ouyang <oykai@msn.com>
Cc:        Current@FreeBSD.org
Subject:   Re: Hi,a little question about DP2.
Message-ID:  <20021120030748.GA74581@edgemaster.zombie.org>
In-Reply-To: <F16FX2LIt1F3p8tAcG70000ee63@hotmail.com>
References:  <F16FX2LIt1F3p8tAcG70000ee63@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 20, 2002 at 10:29:16AM +0800, kai ouyang wrote:
> Hi, Everybody
>  In the 4.x version, I can use mknod to create a device, for example:
> "mknod raidctl c 201 0 root:operator".
>  But in 5.0, If I use the devfs(default), I do not know how to use some 
> command 

You can't `mknod` any device in /dev that isn't known to devfs. Devices are
name-based now:

edgemaster# ls -l cuaa0
crw-rw----  1 uucp  dialer   28, 128 Nov 18 14:13 cuaa0
edgemaster# mknod newdevice c 28 128
mknod: newdevice: No such file or directory

`mknod` is obsoleted for /dev when using devfs, as the device entries are
created and destroyed dynamically as devices are detected and removed from
the system.

If you accidentally delete a device and aren't sure what the major/minor of
it was to recreate it, try something like this:

edgemaster# rm cuaa0
edgemaster# ls -l cuaa0
ls: cuaa0: No such file or directory
edgemaster# devfs rule apply path cuaa0 unhide
edgemaster# ls -l cuaa0
crw-rw----  1 uucp  dialer   28, 128 Nov 18 14:13 cuaa0

> to create a device like 'mknod' doing in 4.x.
>  Another question:
>  In DP2: I found the disk partition 'd' will be used. I know it never be 
> used in 4.x, it means the total disk size, right? But in DP2, why it could 
> be used?

Actually it is the 'c' slice that is generally used to indicate the whole
disk. This is still the case in 5.0. However, I am unable to tell you what
'd' used to represent. I am also clueless on this particular detail.

Hope that helps.

-- 
Sean Kelly         | PGP KeyID: 77042C7B
smkelly@zombie.org | http://www.zombie.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021120030748.GA74581>