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

Linux下如何用fdisk新建分区

[日期:2013-03-14] 来源:51cto  作者:lfgwqc [字体:大 中 小]
有扩展分区和主分区,逻辑分区在扩展分区中建立。注意到括号中的1-4,最多只能建四个主分区(包括扩展分区)。先建一个主分区:
 
Command (m for help): n
 Command action
    e  extended
    p  primary partition (1-4)
 p #建主分区
 Partition number (1-4): 1 #分区号为1
 First cylinder (1-2610, default 1): #直接回车默认从第一个柱面开始划分
 Using default value 1
 Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610): +2G #加空间大小,这里有很多种选择:+后面单位可以接M,G,K(记得要大写)表示划分你所加的空间,也可以是柱面数。不管怎样都不能超过该磁盘剩余的空间否则无效。
 
Command (m for help): p #分好后查看分区信息,刚所做的所有一目了然。
 
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
 255 heads, 63 sectors/track, 2610 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0xfaa2aa49
 
  Device Boot      Start        End      Blocks  Id  System
 /dev/sdb1              1        262    2104483+  83  Linux
 
同上所述建立扩展分区:
 
Command (m for help): n
 Command action
    e  extended
    p  primary partition (1-4)
 e #建立扩展分区
 Partition number (1-4): 4
 First cylinder (263-2610, default 263):
Using default value 263
 Last cylinder, +cylinders or +size{K,M,G} (263-2610, default 2610): +4G
 
Command (m for help): p
 
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
 255 heads, 63 sectors/track, 2610 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0xfaa2aa49
 
  Device Boot      Start        End      Blocks  Id  System
 /dev/sdb1              1        262    2104483+  83  Linux
 /dev/sdb4            263        785    4200997+  5  Extended
 
扩展分区建好我们就可以在扩展分区建立逻辑分区了
 
Command (m for help): n
 Command action
    l  logical (5 or over)
    p  primary partition (1-4)
 l #建逻辑分区
 First cylinder (263-785, default 263):
Using default value 263
 Last cylinder, +cylinders or +size{K,M,G} (263-785, default 785): +2G
 
Command (m for help): p
 
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
 255 heads, 63 sectors/track, 2610 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0xfaa2aa49
 
  Device Boot      Start        End      Blocks  Id  System
 /dev/sdb1              1        262    2104483+  83  Linux
 /dev/sdb4            263        785    4200997+  5  Extended
 /dev/sdb5            263        524    2104483+  83  Linuxlinux
相关资讯       fdisk  Linux fdisk分区  linux新建分区  fdisk分区 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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