hda vs sda

來源:互聯網
上載者:User

前段時間編譯linux核心,網上資料都說編譯完後,修改lilo.config,其中有一段配置為:root=/dev/hda2,看我自己的lilo配置,彷彿應該為sda。從網上查了一下hda和sda的差別,把英文論壇上的解釋摘過來。

IDE hard disks (well, devices, actually) are hd<drive><partition>. SCSI devices (and kernel-level emulation of SCSI devices, like USB devices or, in some cases, CD-RW drives) are sd<drive><partition>.
The standard partitioning scheme nowadays is (assuming your drive is hda):

hda1 => bootloader and kernel(s)
hda2 => swap space
hda3 => root filesystem

 

the way linux asign names to disk drive is as follows:
HD/x/n - now lets break this down;
HD- denotes that the disk drive is IDE based. if the drive SCSI or SATA based it will be designated as SD.

x- denotes the position of the drive. If its installed in the IDE controllers as the Primary Master it will be designated as HDA. If as the Primary Slave it will be designated as HDB. If as the Secondary Master, HDC. HDD if the drive is installed as the Secondary Slave.

n- this denotes the partition number. For example the first partition of the Primary Master will be designated as HDA1. Usually the primary partitions are designated with the numbers 1-4. The logical drives are given the numbers 5-n (depends on how many logical partitions you have.

因為我是在VMWare下裝的linux系統,貌似VMWARE會把虛擬分區虛擬為SCSI裝置,所以覺得我的linux裝置應該為sda才對。

不過,一直搞不明白自己的root那到底該寫什麼才好,不管是用hda還是sda,不管是用hda或sda幾都不能正常啟動,提示為請輸入正確的root=什麼的,貌似是這裡的配置不對。很困惑……

另外,原lilo上的預設配置為:append="root=LABEL=/",模仿這個寫也不對,不知是不是自己編譯核心裡哪裡出現了問題。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.