- 論壇徽章:
- 0
|
在fdisk 命令下,有一個(gè)b選項(xiàng),相當(dāng)于FreeBSD的disklabel命令.
進(jìn)入FreeBSD區(qū)域,進(jìn)行分區(qū):
- Command (m for help): b
- Reading disklabel of /dev/hda1 at sector 64.
- /dev/hda1 contains no disklabel.
- Do you want to create a disklabel? (y/n) y
- # /dev/hda1 :
- type: ST506
- disk:
- label:
- flags:
- bytes/sector: 512
- sectors/track: 63
- tracks/cylinder: 16
- sectors/cylinder: 1008
- cylinders: 77545
- rpm: 3600
- interleave: 1
- trackskew: 0
- cylinderskew: 0
- headswitch: 0 # milliseconds
- track-to-track seek: 0 # milliseconds
- drivedata: 0
- 4 partitions:
- # start end size fstype [fsize bsize cpg]
- c: 1* 15502 15501* unused 0 0
- d: 1 77545 77545 unused 0 0
復(fù)制代碼
FreeBSD分區(qū)可用命令列表:
- BSD disklabel command (m for help): m
- Command action
- d delete a BSD partition
- e edit drive data
- i install bootstrap
- l list known filesystem types
- m print this menu
- n add a new BSD partition
- p print BSD partition table
- q quit without saving changes
- r return to main menu
- s show complete disklabel
- t change a partition's filesystem id
- u change units (cylinders/sectors)
- w write disklabel to disk
- x link BSD partition to non-BSD partition
復(fù)制代碼
看到這里,相信大家也會(huì)分區(qū)了吧,選擇n(創(chuàng)建一個(gè)新分區(qū)),然后選擇a,為根分區(qū)
創(chuàng)建根分區(qū)(100m):
- BSD disklabel command (m for help): n
- Partition (a-p): a
- First cylinder (1-15502, default 1):
- Using default value 1
- Last cylinder or +size or +sizeM or +sizeK (1-15502, default 15502): +100M
- BSD disklabel command (m for help): p
- 4 partitions:
- # start end size fstype [fsize bsize cpg]
- a: 1 195 195 unused 0 0
- c: 1* 15502 15501* unused 0 0
- d: 1 77545 77545 unused 0 0
- BSD disklabel command (m for help): t
- Partition (a-d): a
- Hex code (type L to list codes): L
- 0 unused 5 4.1BSD 9 4.4LFS d boot
- 1 swap 6 Eighth Edition a unknown e ADOS
- 2 Version 6 7 4.2BSD b HPFS f HFS
- 3 Version 7 8 MS-DOS c ISO-9660 10 AdvFS
- 4 System V
- Hex code (type L to list codes): 7
- BSD disklabel command (m for help): p
- 4 partitions:
- # start end size fstype [fsize bsize cpg]
- a: 1 195 195 4.2BSD 0 0 0
- c: 1* 15502 15501* unused 0 0
- d: 1 77545 77545 unused 0 0
復(fù)制代碼
創(chuàng)建swap分區(qū),如此類推,swap分區(qū)的類型是swap.
注意:
分區(qū)的扇區(qū)是首尾相連,一個(gè)分區(qū)的扇區(qū)結(jié)束,在下一個(gè)分區(qū)時(shí),開始扇區(qū)是上一個(gè)分區(qū)結(jié)束扇區(qū)+1.
按照默認(rèn)分區(qū)分割完畢后,進(jìn)入格式化分區(qū)時(shí),總會(huì)報(bào)出一個(gè) i/o 錯(cuò)誤,出錯(cuò)信息是xxxxxx個(gè)扇區(qū)里有錯(cuò),這個(gè)扇區(qū)數(shù)比你分出的扇區(qū)少一,間接說明通常分區(qū)出來的FreeBSD分區(qū)是比要求的多了一個(gè)單位,要重新調(diào)節(jié),減少一個(gè)單位.
[ 本帖最后由 抽煙斗的狗 于 2007-9-3 20:08 編輯 ] |
|