現在磁碟切割工具已經非常方便了,所以不會再需要換算磁柱來算切割區的大小,不過寫下來當作是紀念吧。

  我們輸入 fdisk /dev/磁碟代號 會看到磁碟有以下資訊 (依照版本略有不同,不過差異不大):
Disk /dev/sda: 255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

首先列一下空間單位的基本概念:
1GBytes = 1024MBytes
1MBytes = 1024KBytes
1KBytes = 1024Bytes
1Byte = 8bits

電腦以1024切換單位

1. 計算每一磁柱大小:
255 (heads) x 63 (sectors) x 512 = 8225280 Bytes (cylinder size)
2. 計算總容量
(電腦算法 - 容量/ 1024)
8225280 (cylinder size) x 4462 = 36701199360 (bytes)
36701199360 / 1024 = 35841015 Kbytes
35841015 /1024 = 35000.99 MBytes
3500.99 / 1024 = 34.18 GBytes

(硬碟廠商算法 - 容量 / 1000)
36701199360 / 1000 = 36701199.360 Kbytes
36701199.360 / 1000 = 36701.11 MBytes
36701.11 / 1000 = 36.7 GBytes

PS:所以買36.7GB的硬碟,回家安裝之後,作業系統看到的是34.18GB

3.依照大小計算切割的磁柱:
如果要新增一個大小為512MB的磁區,個人是先將 cylinder 容量轉換為 MB:
8225280 / 1024 (轉Kbytes) / 1024 (轉Mbytes) = 7.844 MB / 每Cylinder
512 / 7.844 = 65.2

所以第一磁區為起始磁柱為 0,結束磁柱為 66 。

Posted by 椰子殼

2006/04/21 18:45 2006/04/21 18:45
Response
No Trackback , 2 Comments
RSS :
http://www.homeweb.idv.tw/rss/response/260

Trackback URL : 無法向此文章發送引用

Comments List

  1. wchild 2010/02/24 18:54 # M/D Reply Permalink

    正在上課剛好想查相關資料,
    感謝大大的保存資料~

    1. 椰子殼 2010/02/26 11:19 # M/D Permalink

      不客氣

Leave a comment
« Previous : 1 : ... 258 : 259 : 260 : 261 : 262 : 263 : 264 : 265 : 266 : ... 470 : Next »

블로그 이미지

椰子殼網誌。 紀錄生活

- 椰子殼

Notices

Authors

  1. 椰子殼

Archives

Calendar

«   2010/07   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Site Stats

Total hits:
412595
Today:
78
Yesterday:
139