- 论坛徽章:
- 0
|
在fdisk 命令下,有一个b选项,相当于FreeBSD的disklabel命令.
进入FreeBSD区域,进行分区:
- 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
复制代码
FreeBSD分区可用命令列表:
- 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
复制代码
看到这里,相信大家也会分区了吧,选择n(创建一个新分区),然后选择a,为根分区
创建根分区(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
复制代码
创建swap分区,如此类推,swap分区的类型是swap.
注意:
分区的扇区是首尾相连,一个分区的扇区结束,在下一个分区时,开始扇区是上一个分区结束扇区+1.
按照默认分区分割完毕后,进入格式化分区时,总会报出一个 i/o 错误,出错信息是xxxxxx个扇区里有错,这个扇区数比你分出的扇区少一,间接说明通常分区出来的FreeBSD分区是比要求的多了一个单位,要重新调节,减少一个单位.
[ 本帖最后由 抽烟斗的狗 于 2007-9-3 20:08 编辑 ] |
|