手工格式化硬盘

手工格式化硬盘

# fdisk /dev/sda //进入分割硬盘模式

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): d //删除一个分区

Selected partition 1

Command (m for help): w //写入磁盘退出分区程序,按w这个分区就等于是删除了

The partition table has been altered!

Calling ioctl() to re-read partition table

fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy

重 启

# fdisk /dev/sda

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): n //添加一个新分区

Command action

e extended

p primary partition (1-4)

P //显示分区表

Partition number (1-4): 1

First cylinder (1-19457, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-19457, default 19457):

Using default value 19457

Command (m for help): w //按下w 保存退出皆可,分区工作结束 The partition table has been altered!

Calling ioctl() to re-read partition table

# umount /mnt/usb1 //卸载文件系统,/mnt/usb1是磁盘挂载目录

# mkfs.ext3 /dev/sda1 //格式化,其中/dev/sda1是硬盘分区名,而不是硬盘设备名 mke2fs 1.41.5 (23-Apr-2009)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

9773056 inodes, 39072080 blocks

1953604 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

1193 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

#

重 启动

fdisk -l /dev/sda ,观察硬盘之实体使用情形,可以查看磁盘格式化情况

附录:

按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)

手工格式化硬盘

# fdisk /dev/sda //进入分割硬盘模式

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): d //删除一个分区

Selected partition 1

Command (m for help): w //写入磁盘退出分区程序,按w这个分区就等于是删除了

The partition table has been altered!

Calling ioctl() to re-read partition table

fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy

重 启

# fdisk /dev/sda

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): n //添加一个新分区

Command action

e extended

p primary partition (1-4)

P //显示分区表

Partition number (1-4): 1

First cylinder (1-19457, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-19457, default 19457):

Using default value 19457

Command (m for help): w //按下w 保存退出皆可,分区工作结束 The partition table has been altered!

Calling ioctl() to re-read partition table

# umount /mnt/usb1 //卸载文件系统,/mnt/usb1是磁盘挂载目录

# mkfs.ext3 /dev/sda1 //格式化,其中/dev/sda1是硬盘分区名,而不是硬盘设备名 mke2fs 1.41.5 (23-Apr-2009)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

9773056 inodes, 39072080 blocks

1953604 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

1193 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

#

重 启动

fdisk -l /dev/sda ,观察硬盘之实体使用情形,可以查看磁盘格式化情况

附录:

按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)


相关文章

  • 电脑硬盘双击打不开怎么办
  • 电脑硬盘双击打不开怎么办? 曾经中过次病毒,双击打不开硬盘,只能通过搜索才能打开!家里的杀毒软件查不到,一气之下我把D,E,F盘给格了,C盘还原了,病毒没了,但是还是双击打不开. 双击无法打开硬盘分两种,一种双击无法打开后右键菜单打开就可以 ...查看


  • 会计电算化课程讲义
  • 克拉玛依市会计学会 2011年会计电算化课程培训讲义 第一章会计电算化概论 .......................................................................... 2 第二章电算 ...查看


  • 电算化会计
  • 四川农业大学网络教育专科考试 电算化会计 试卷 (课程代码 352075) 本试题一共六道大题,共6页,满分100分.考试时间90分钟. 注意:1.答案必须填写在答题纸上,题号不清或无题号的以零分计: 2.答题前,请在答题纸上准确.清楚地填 ...查看


  • 会计电算化模拟题
  • 1.会计电算化初级人才的培养目标是_B_____. A.会计电算化系统的维护和管理 B.掌握计算机基本操作技能和会计电算化的基本工作过程 C.进行会计软件分析设计 D.对会计核算信息进行简单地分析利用 2.不属于计算机与手工并行阶段的主要任 ...查看


  • 初级会计电算化历年真题 1
  • 初级会计电算化历年真题一 一.单选题. 1.组成报表的最小基本单位是( ) . A.组合单元 B.表体C.变动单元D.表单元 2. 设置会计科目编码时,必须是( ) . A.科目全编码 B.明细科目编码 C.一级科目编码 D.助记码 3.在 ...查看


  • 超实用,硬盘常见故障及排除详解
  • 超实用,硬盘常见故障及排除详解 大家都知道,硬盘是计算机的主要部件--它的地位当然是很重要了!往往由于系统故障.硬件毁坏.病毒.误操作或者由于不明原因造成您存储的关键性数据的硬盘无法访问.系统报告硬盘损坏,您会怎么办呢?是自认倒霉?还是追悔 ...查看


  • 2010安徽省会计职称理论考试试题及答案
  • 1.计算机系统是由(B)组成. A.程序和数据 B.硬件和软件 C.主机和外设 D.运算和控制 2.常见系统软件包括(A). A.操作系统.程序设计语言和数据管理系统. B.操作系统.文字处理软件. C.汇编语言.高级语言.机器语言. D. ...查看


  • 初级会计电算化历年真题
  • 初级会计电算化历年真题一 一.单选题. 1.组成报表的最小基本单位是( ) . A.组合单元 B.表体 C.变动单元 D.表单元 [答案]D 2. 设置会计科目编码时,必须是( ) . A.科目全编码 B.明细科目编码 C.一级科目编码 D ...查看


  • 杭州数据恢复原理
  • 恢复数据的原理和方法 发觉硬盘故障,需要恢复数据的时候,第一步所要做的就是检测,判断磁盘的故障原因和数据损坏程度 只有明确磁盘的损坏程度和故障原因,才能采取正确的步骤恢复数据: 硬盘内部故障,表现形式一般是CMOS不能识别硬盘,硬盘异响,那 ...查看


热门内容