1.4. Device Naming

All operating systems offer raw access to storage devices in some way, but the actual conventions vary widely. The following table tries to provide a reference.

Table 1.1. Device Name Examples

SystemFloppy DriveIDE Hard DisksIDE CD-ROMsSCSI Hard DisksSCSI CD-ROMsPartition SuffixesNotes
Linux (traditional)
/dev/fd0
/dev/fd1
/dev/hda
/dev/hdb
/dev/hdc
(fixed by location on bus)
/dev/sda
/dev/sdb
/dev/sdc
/dev/scd0
/dev/scd1
/dev/scd2
1
2
3
 
Mac OS X / Darwin
/dev/rdisk0
/dev/rdisk1
/dev/rdisk2
s1
s2
s3
 
FreeBSD
/dev/fd0
/dev/fd1
/dev/ad0
/dev/ad1
/dev/ad2
/dev/acd0
/dev/acd1
/dev/acd2
/dev/da0
/dev/da1
/dev/da2
/dev/cd0
/dev/cd1
/dev/cd2
s1a
s2b
s3e
s4f
(DOS style)(disklabel)
a)
Cygwin (Windows names)
\\.\A:
\\.\B:
\\.\PHYSICALDRIVE0
\\.\PHYSICALDRIVE1
\\.\PHYSICALDRIVE2
\\.\E:
(corresponding drive letter)
\\.\PHYSICALDRIVE0
\\.\PHYSICALDRIVE1
\\.\PHYSICALDRIVE2
\\.\E:
(corresponding drive letter)
(use drive letters)b)
Cygwin (POSIX names)
/dev/fd0
/dev/fd1
/dev/sda
/dev/sdb
/dev/sdc
/dev/scd0
/dev/scd1
/dev/scd2
/dev/sda
/dev/sdb
/dev/sdc
/dev/scd0
/dev/scd1
/dev/scd2
1
2
3
b)

Notes:

a) On FreeBSD, a BSD disklabel may be contained in a DOS partition. In this case, the corresponding suffixes are combined. For example, the swap partition in a BSD disklabel on the first DOS partition would be /dev/ad0s1b.

b) Cygwin does not distinguish IDE and SCSI drives; such details are already taken care of by the Windows kernel. The backslashes must be quoted when entered at a shell prompt, e.g. disktype '\\.\C:'. For more information on raw device access in Cygwin, see http://sources.redhat.com/cygwin/cygwin-ug-net/using-specialnames.html.