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 ~]# find /dev/sdb*
/dev/sdb
/dev/sdb1
/dev/sdb2
/dev/sdb5
mkfs.vfat: /dev/sdb1 contains a mounted file system.
[root@localhost ~]# mkfs.vfat /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
[root@localhost ~]# mkfs.vfat /dev/sdb5
mkfs.vfat 2.11 (12 Mar 2005)
[root@localhost ~]# cd /mnt
[root@localhost mnt]# mkdir sd1 sd5
[root@localhost mnt]# mount /dev/sdb1 sd1
[root@localhost mnt]# mount /dev/sdb5 sd5
----------------------------------------------------------
#一下是两个2G的分区合并成一个4G的,方法类似,不在累述。
[root@localhost ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 189513.
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/sdb: 4075 MB, 4075290624 bytes
7 heads, 6 sectors/track, 189513 cylinders
Units = cylinders of 42 * 512 = 21504 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 95239 2000016 c W95 FAT32 (LBA)
/dev/sdb2 95240 189513 1979754 f W95 Ext'd (LBA)
/dev/sdb5 95240 189513 1979751 c W95 FAT32 (LBA)
Command (m for help): d
Partition number (1-5): 1
Command (m for help): d
Partition number (1-5): 2
Command (m for help): d
No partition is defined yet!
Command (m for help): p
Disk /dev/sdb: 4075 MB, 4075290624 bytes
7 heads, 6 sectors/track, 189513 cylinders
Units = cylinders of 42 * 512 = 21504 bytes
Disk identifier: 0x00000000
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-189513, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-189513, default 189513):
Using default value 189513
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))
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.