你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux下分区详解之--Fdisk

[日期:2012-05-06] 来源:Linux社区  作者:吴伟龙 [字体:大 中 小]

创建分区:

[root@ www.linuxidc.com ~]# fdisk /dev/sdb

 

The number of cylinders for this disk isset to 2610.

There is nothing wrong with that, but thisis larger than 1024,

and could in certain setups cause problemswith:

1) software that runs at boot time (e.g.,old versions of LILO)

2) booting and partitioning software fromother OSs

  (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): n            ---创建分区

Command action

  e   extended

  p   primary partition (1-4)      --指定分区类型为主分区

p

Partition number (1-4): 1           --指定其实分区号

First cylinder (1-2610, default 1): 1   --指定起始柱面号

Last cylinder or +size or +sizeM or +sizeK(1-2610, default 2610): 1024 ---指定终止柱面号

 

Command (m for help): w            ---保存分区配置信息

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

 

WARNING: Re-reading the partition tablefailed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the nextreboot.

Syncing disks.

增加分区:

[root@ www.linuxidc.com ~]# fdisk /dev/sdb      -----增加分区

 

The number of cylinders for this disk isset to 2610.

There is nothing wrong with that, but thisis larger than 1024,

and could in certain setups cause problemswith:

1) software that runs at boot time (e.g.,old versions of LILO)

2) booting and partitioning software fromother OSs

  (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): n       ---分区类型

Command action

  e   extended

  p   primary partition (1-4)    ---还是指定主分区

p

Partition number (1-4): 1          ---分区号,我指定1。

Partition 1is already defined.  Delete it beforere-adding it. 

–提示分区号1已经存在,删除后操作

Command (m for help): n          --我们重新创建分区

Command action

  e   extended

  p   primary partition (1-4)     --指定分区类型

p

Partition number (1-4): 2          ---因为分区1已经存在,所以我们指定分区2,可通过。

First cylinder (1025-2610, default 1025):       ---指定起始礠柱号,默认是上一分区后一号。

Using default value 1025

Last cylinder or +size or +sizeM or +sizeK(1025-2610, default 2610): 2000   --指定终止礠柱号。

 

Command (m for help): w                   ---保存分区配置

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

 

WARNING: Re-reading the partition tablefailed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the nextreboot.

Syncing disks.

[root@ www.linuxidc.com ~]#

linux
相关资讯       Linux入门教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款