Device Names in Linux
来源:互联网 发布:郑州淘宝诈骗案破案没 编辑:程序博客网 时间:2024/05/30 23:49
Linux disks and partition names may be different from other operating systems. You need to know the names that Linux uses when you create and mount partitions. Here's the basic naming scheme:
The first floppy drive is named
/dev/fd0
.The second floppy drive is named
/dev/fd1
.The first SCSI disk (SCSI ID address-wise) is named
/dev/sda
.The second SCSI disk (address-wise) is named
/dev/sdb
, and so on.The first SCSI CD-ROM is named
/dev/scd0
, also known as/dev/sr0
.The master disk on IDE primary controller is named
/dev/hda
.The slave disk on IDE primary controller is named
/dev/hdb
.The master and slave disks of the secondary controller can be called
/dev/hdc
and/dev/hdd
, respectively. Newer IDE controllers can actually have two channels, effectively acting like two controllers.The first XT disk is named
/dev/xda
.The second XT disk is named
/dev/xdb
.
The partitions on each disk are represented by appending a decimal number to the disk name: sda1
and sda2
represent the first and second partitions of the first SCSI disk drive in your system.
Here is a real-life example. Let's assume you have a system with 2 SCSI disks, one at SCSI address 2 and the other at SCSI address 4. The first disk (at address 2) is then named sda
, and the second sdb
. If the sda
drive has 3 partitions on it, these will be named sda1
, sda2
, and sda3
. The same applies to the sdb
disk and its partitions.
Note that if you have two SCSI host bus adapters (i.e., controllers), the order of the drives can get confusing. The best solution in this case is to watch the boot messages, assuming you know the drive models and/or capacities.
Linux represents the primary partitions as the drive name, plus the numbers 1 through 4. For example, the first primary partition on the first IDE drive is /dev/hda1
. The logical partitions are numbered starting at 5, so the first logical partition on that same drive is /dev/hda5
. Remember that the extended partition, that is, the primary partition holding the logical partitions, is not usable by itself. This applies to SCSI disks as well as IDE disks.
- Device Names in Linux
- different device in linux
- Timer in Linux Device Driver
- Linux Kernel Threads in Device Drivers
- Linux Kernel Threads in Device Drivers
- NAPI In Linux Network Device Driver
- Linux Kernel Threads in Device Drivers
- How to reset usb device in linux
- How to Reset USB Device in Linux
- How Solaris disk device names work
- R语言 Error in match.names(clabs, names(xi)) :
- Writing device drivers in Linux: A brief tutorial
- Writing device drivers in Linux: A brief tutorial (1)
- How to programatically unplug & replug an USB device in linux?
- Writing device drivers in Linux: A brief tutorial(一)
- Writing device drivers in Linux: A brief tutorial(二)
- Writing device drivers in Linux: A brief tutorial(三)
- Writing device drivers in Linux: A brief tutorial(四)
- VMware+Windgb+Win7内核驱动调试
- 提供给IT外包公司的策略
- Android Bitmap和Canvas学习笔记
- A Real Time Radiosity Architecture
- 在Windows Mobile上隐藏你的应用程序
- Device Names in Linux
- Oracle数据库管理员工作内容
- 顺序表的基本操作
- 视频聊天网站的研究、发展以及趋势(转)
- KISS——如何做产品设计
- list转jsonArray
- DBD ASProtect 1.2X
- 揭秘全球最大网站Facebook背后的那些软件(转载)
- 在网页中使用Applet的标签详解