C.4. Linux 裡的裝置名稱

Linux 磁碟以及分割區名稱可能和其它的作業系統有所不同。當您建立以及掛載分割區時,必須先知道 Linux 所使用的設備名稱。以下是基本的命名規則:

每個磁碟分割區的名字在磁碟名稱後面附加一個十進制數字: sda1 以及 sda2 表示系統裡第一個 SCSI 磁碟的第一個及第二個分割區。

這裡有個實際的例子。假設您有一個系統帶有兩個 SCSI 磁碟,一個 SCSI 位址是 2 而另外一個是 4。第一個磁碟(在 2 上)會被命名為 sda而第二個是 sdb。如果 sda 磁碟有 3 個分割區,它們將被命名為 sda1sda2,以及 sda3sdb 及其分割區亦是如此。

注意如果您有兩個 SCSI 主機匯流排適配器 (控制器),設備的順序可能會比較混亂。假設您知道磁碟模式以及/或者容量,最好的解決方案是觀察開機訊息。

Linux represents the primary partitions as the drive name, plus the numbers 1 through 4. For example, the first primary partition on the first drive is /dev/sda1. The logical partitions are numbered starting at 5, so the first logical partition on that same drive is /dev/sda5. Remember that the extended partition, that is, the primary partition holding the logical partitions, is not usable by itself.