免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 969 | 回复: 0
打印 上一主题 下一主题

『保持回忆』linux分区格式化命令使用方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-21 15:04 |只看该作者 |倒序浏览
[root@ecofe2 /]# fdisk -l
[root@ecofe2 /]# fdisk -l    \\显示/dev/××的设备,判断那个是你的阵列,从容量大小
[root@ecofe2 /]# fdisk /dev/hdd   \\ hdd是设备,不是分区,一般是/dev/hdd1 或/dev/sda1
The number of cylinders for this disk is set to 30401.
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                          编辑卷标(linux下使用的卷标bsd通用)
  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键  按过之后会出现
Command action                            命令动作      
  e  extended                          \\按e是建立扩展分区
  p  primary partition (1-4)           \\按p是建立主分区,主分区最多只能有4个

然后就是选择起始扇区,如果你想分一个区都按回车就行了。
最后按下w,保存退出皆可,分区结束。

磁盘格式化
[root@ecofe2 /]# mkfs.ext3 /dev/hdd1    \\ hdd1 分区名
[root@ecofe2 /]# mkfs.ext3 /dev/hdd2    \\ hdd2 分区名

磁盘修复命令
[root@ecofe2 /]# fsck.ext3 /设备名


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/81561/showart_1330958.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP