2010年(16)
分类: LINUX
2010-04-13 11:21:28
[root@localhost ~]#fdisk –l //查看所有的磁盘情况
Disk /dev/hda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/hda2 5100 10198 40957717+ 83 Linux
/dev/hda3 1019 10453 2048287+ 82 Linux swap /Solaris
/dev/hda4 10454 36483 209085975 5 Extended
/dev/hda5 10454 16827 51199123+ 83 Linux
[root@localhost ~]#
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
Partition number (1-5): 3
Command (m for help): d
Partition number (1-5): 4
Command (m for help): d
No partition is defined yet!
Command (m for help): n //建立新分区
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-36483, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-36483, default 36483): +100G
Command (m for help): w
……
Command (m for help): q //退出
[root@localhost ~]#
二.格式化: mkfs.ext3 /dev/hda1;(也可以是 ext2,lustre,vfat,iso9660等等)
三.挂载:mkdir /mnt/hda
mount /dev/hda1 /mnt/hda
一些小经验:
多模式切换: Ctrl+Alt+F*;.新打开一个终端:Ctrl+Shift+n,在一个终端中新开一个窗口:Ctrl+Shift+t;在命令行模式下翻页:
Shift+ PAGE UP。