精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● UNIX>>[转载] 如何格式化硬碟

主题:[转载] 如何格式化硬碟
发信人: lanman()
整理人: helpus(2000-06-24 19:13:15), 站内信件
【 以下文字转载自 FreeBSD 讨论区 】
【 原文由
 lanman 所发表 】
發 信 人:Peter Fann               回信地址:[email protected]
信區名稱:cc_diary                 信件日期:Thu, 26 Jun 1997 17:22:32         
信件提要:document - format hdd                                            
原發信站:CHPI PowerBBS Original Station (中華工學院方城資訊站)
------------------------------------------------------------[703/704]---------
 
        格式化一顆硬碟在系統管理上是一個常會碰到的事,尤其是要 
加上一顆新的硬碟或是重灌系統時,都會用到,現在我大略說明一下過程。 
 
 
        首先要調硬碟的 id (SCSI HDD) 在一般的工作站上開機的硬碟 
id 都是" 0 ",cd-rom 則為 6 ,tape 磁帶機為 4 ..,但在 SUN 的機器就 
有點不一樣,開機的那顆 hdd id 要調在 3 ,機器在抓的時候會抓到 sd0 
那相對的 id 0 hdd 會變成 sd3 ,這是 sun 和別人不同的地方。 
 
        ok!! 我們開始吧,若我們把 id 設成0 裝上機器,進 root 用 
format 這個命令......系統會 search disk .. 
 
AVAILABLE DISK SELECTIONS: 
        0. sd3 at esp0 slave 0 
           sd3:  
Specify disk (enter it's number): 
 
        表示系統找到了個 hdd 不知是啥牌的要我們確定,ok 輸入 0 
 
AVAILABLE DRIVE TYPE: 
        0.Quantum ProDrive ... 
        有十多個廠牌可供選擇....若沒有你要的就選 other 好像是 
13 吧!!接下來會出現: 
        Enter number of date cylinders:2098      
                                      ^^^^^^ 
                原本應該是2100但要記得淢2, 2100 - 2 =2098 
        這兩個 cly 是系統留的,若不小心爆了還有 2 個 cyl 可以緩衝 
        (notice:cyl 2100 head 16 sec63) 
 
        Enter number of alternate cylinders [2]: 
        Enter number of physical cylinders [2100]: 
        Enter number of heads:16 
        Enter number of data sectors/track:63 
        Enter rpm of drive [3600]: 
        Enter disk type name (remember quoes):NEC-1.0G 
                                             ^^^^^^^^^^^ 
                                        隨便給個名字就可以了... 
 
FORMAT MENU: 
        disk    -select a disk 
        type    -select (define) a disk type  
        partition       -select (define) a partition table 
        current         -discribe the current disk 
        format          -format and analyze the disk 
        repair          -repair a defective sector  
        show            -translate a disk address 
        label           -write label to the disk 
        analyze         -surface analysis 
        defect          -defect list management 
        backup          -serach for backup labels 
        quot 
format> 
 
        這兒只說明必要的動作,其它的自己 man man 看吧!! 
 
format>partition  (切硬碟的partition) 
 
PARTITION MENU: 
        a       - change 'a' partition  
        b       - change 'b' partition 
         
        這也是有 8 個選項在這說明一下這些數字的意思: 
         
        整顆 hdd 的只要一個 partition 的話 ----> c 
        兩個 partition 的話 -----> f and g 
        四個 partition 的話 -----> a b d e  
 
        書上是這這麼寫的,我沒試過是不是一定要這樣切才可始 
若是選 f and g 到時就會有 sd3f 和 sd3g 兩個 partition 可用 
在這我試範 c 整個 hdd : 
 
partition>c 
 
        partition c -starting cyl       0, # blocks     0(0/0/0) 
 
Enter new starting cyl [0]: 
Enter new # blocks [0, 0/0/0]:2098/0/0 <-- 記得要淢 2 另兩個 0 就可以了

partition>print   <------ 把結果 print 出來看看對不對!!
Current partition table (unnamed):
partition a - starting cyl 0, # blocks 0 (0/0/0)
partition b - starting cyl 0, # blocks 0 (0/0/0)
partition c - starting cyl 0, # blocks 2114784 (2098/0/0)
.............

1MB 大約是 2 個 blocks..算算看是大約 1 G ok!! 正確..

partition> quit <---- 跳出
partition> label <---- 將剛剛的設定儲存
Ready to label disk, continue? Y <----- yes continue
format>quit <---- ok !! 完成了一半,我們再往下看看吧!!


接下來是要做 newfs





--
※ 来源:.网易 BBS bbs.netease.com.[FROM: 202.104.82.188]
--
※ 转载:.网易 BBS bbs.netease.com.[FROM: 202.104.82.188]

[关闭][返回]