Linux磁盘格式化(1)_itchinareninfo的空间_百度空间

Linux磁盘格式化

1. 查看设备名称

[root@Linux ~]# fdisk -l

Disk /dev/sda: 4294 MB, 4294967296 bytes

255 heads, 63 sectors/track, 522 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id System

/dev/sda1   *           1          13      104391   83 Linux

/dev/sda2              14          78      522112+ 82 Linux swap

/dev/sda3              79         522     3566430   83 Linux

Disk /dev/sdb: 1073 MB, 1073741824 bytes

255 heads, 63 sectors/track, 130 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

[root@Linux ~]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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)

2. 创建主分区

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-130, default 1):      Enter

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): +500M

Command (m for help):

3. 创建扩展分区

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

e

Partition number (1-4): 2

First cylinder (63-130, default 63):       Enter

Using default value 63

Last cylinder or +size or +sizeM or +sizeK (63-130, default 130):       Enter

Using default value 130

4. 创建逻辑分区

Command (m for help): n

Command action

   l   logical (5 or over)

   p   primary partition (1-4)

l

First cylinder (63-130, default 63):       Enter

Using default value 63

Last cylinder or +size or +sizeM or +sizeK (63-130, default 130): +200M

Command (m for help): n

Command action

   l   logical (5 or over)

   p   primary partition (1-4)

l

First cylinder (88-130, default 88):       Enter

Using default value 88

Last cylinder or +size or +sizeM or +sizeK (88-130, default 130):       Enter

Using default value 130



郑重声明:资讯 【Linux磁盘格式化(1)_itchinareninfo的空间_百度空间】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——