[iyunv@1inux ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x6a09b062.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help):
然后输入 “ m ” 可以查看支持的选项:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition //删除分区
l list known partition types
m print this menu //查看帮助
n add a new partition //创建新分区
o create a new empty DOS partition table
p print the partition table //显示现有分区表;
q quit without saving changes //不保存退出
s create a new empty Sun disklabel
t change a partition's system id //修改分区文件系统类型
u change display/entry units
v verify the partition table //检验分区
w write table to disk and exit //保存更改并退出
x extra functionality (experts only)
输入“n” 然后回车新建分区
1
2
3
4
Command (m for help): n
Command action
e extended
p primary partition (1-4)
选择要创建的分区类型:e-创建扩展分区;p-创建主分区,在此我们选择创建主分区输入“p”
1
Partition number (1-4):
提示要输入要创建主分区的ID号,在1-4之间,在此我们输入1
1
2
Partition number (1-4): 1
First cylinder (1-10443, default 1):
设置分区起始的柱面,直接回车就行:然后如下:
1
2
First cylinder (1-10443, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-10443, default 10443):