[ 复制到剪切板 ]代码:
sles:~ # fdisk /dev/hda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
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)
Command (m for help): m
a 设置/取消 活动分区(1-4,任何一个主分区都可以设为活动分区,扩展除外)
d 删除分区
l / L 列出支持的分区类型
m 帮助
n 新建分区
p 打印分区(表)信息
q 退出且不保存已做的修改
t 设置分区的 id 也就是分区类型要和文件系统对应。
w 保存分区表并退出
最常用的就是这些
实例: