Chinaunix首页 | 论坛 | 博客
  • 博客访问: 120943
  • 博文数量: 35
  • 博客积分: 1672
  • 博客等级: 上尉
  • 技术积分: 412
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-19 15:16
文章分类

全部博文(35)

文章存档

2012年(5)

2011年(9)

2010年(21)

我的朋友

分类: LINUX

2010-05-25 12:40:59

对一个8G优盘分区分格式为fat32文件系统:一个分区3G,一个分区5G
[root@localhost ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 30584.
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
   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)

Command (m for help): p

Disk /dev/sda: 8017 MB, 8017412096 bytes
16 heads, 32 sectors/track, 30584 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       30590     7831024    6  FAT16

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /dev/sda: 8017 MB, 8017412096 bytes
16 heads, 32 sectors/track, 30584 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-30584, default 1): 回车
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-30584, default 30584): +3072M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (14001-30584, default 14001): 回车
Using default value 14001
Last cylinder or +size or +sizeM or +sizeK (14001-30584, default 30584): 回车
Using default value 30584

Command (m for help): p

Disk /dev/sda: 8017 MB, 8017412096 bytes
16 heads, 32 sectors/track, 30584 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       14000     3583984   83  Linux
/dev/sda2           14001       30584     4245504   83  Linux

Command (m for help): a
Partition number (1-4): 2

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): b
Changed system type of partition 2 to b (W95 FAT32)

Command (m for help): p

Disk /dev/sda: 8017 MB, 8017412096 bytes
16 heads, 32 sectors/track, 30584 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       14000     3583984    b  W95 FAT32
/dev/sda2   *       14001       30584     4245504    b  W95 FAT32

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
[root@localhost ~]#

[root@localhost ~]# mkfs.vfat /dev/sda1
        (将分区一格式化为FAT32)
mkfs.vfat 2.11 (12 Mar 2005)
[root@localhost ~]# mkfs.vfat /dev/sda2
        (将分区二格式化为FAT32)
mkfs.vfat 2.11 (12 Mar 2005)
[root@localhost ~]#
阅读(675) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~