From owner-freebsd-questions Wed Sep 20 0:33: 4 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 25A4737B422 for ; Wed, 20 Sep 2000 00:33:00 -0700 (PDT) Received: from 149.211.6.64.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Wed, 20 Sep 2000 00:31:40 -0700 Received: (from cjc@localhost) by 149.211.6.64.reflexcom.com (8.11.0/8.11.0) id e8K7Wfv18816; Wed, 20 Sep 2000 00:32:41 -0700 (PDT) (envelope-from cjc) Date: Wed, 20 Sep 2000 00:32:41 -0700 From: "Crist J . Clark" To: Marius Bendiksen Cc: Marc Tardif , freebsd-questions@FreeBSD.ORG Subject: Re: device naming convention Message-ID: <20000920003241.U367@149.211.6.64.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from mbendiks@eunet.no on Wed, Sep 20, 2000 at 08:49:59AM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Sep 20, 2000 at 08:49:59AM +0200, Marius Bendiksen wrote: > [redirected] > > > Questions: > > 1. What are wd0[a-h] used for? > > These are interfaces to the partitions of the first FreeBSD slice. These are the legacy devices that were used until 3.x. Now, IDE drives are called, /dev/ad* For the generic ATA/ATAPI driver. > > 2. If wd0s1 is my first slice, why isn't it named wd0s0? > > Slice 0 is used for some special purpose. I cannot recall exactly which > right now, but ISTR it was either (1) a reference to the first FreeBSD > slice, regardless of which slot it is in, or (2) a reference to a > dedicated disk. There is no slice 0. Slices are purely for compatibility with MS-DOS partitions, and MS-DOS partitions are numbered 1 to 4. No reason to obfuscate things to renumber 0-3. (Don't ask me why sometimes it does seem like things are renumbered for no reason.) > > 3. If I format wd0s2 as any type (Xenix for example), > > will /dev now contain wd0s2[a-h]? > > No. You need to use the MAKEDEV script. > > > 4. If I want to use /dev/wd0s2 as a raw slice for reading > > and writing, what are the steps to follow? > > Use it as you would any file. s/file/block device/ > > 4a. Do I need to format the partition as any type? If so > > is there a recommended type (perhaps one which won't > > be recognised by the bootloader would be preferable)? > > A number of references to slice types can be found on the net. But was the original question about a slice or partition? > > 4b. Should I then be using /dev/rwd0s2 or /dev/rwd0s2a > > for reading and writing (of course, this is assuming > > block i/o of multiples of 512 bytes)? > > /dev/rwd0s2 Actually, note that, [219:~] ls -l /dev/wd0s2{,c} brw-r----- 1 root operator 0, 0x00030002 Aug 31 1999 /dev/wd0s2 brw-r----- 1 root operator 0, 0x00030002 Aug 31 1999 /dev/wd0s2c And also remeber these are legacy devices. The current release of FreeBSD, the 4-branch, uses the ad(4) device and there are no block devices, [221:~] ls -l /dev/{,r}ad1s1{,c} crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/ad1s1 crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/ad1s1c crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/rad1s1 crw-r----- 2 root operator 116, 0x0002000a Aug 6 22:05 /dev/rad1s1c -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message