1、 通过Fdisk查看系统分区详细信息:Fdisk –l 详解:[root@ www.linuxidc.com ~]# fdisk -lDisk /dev/sda: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280bytes注释:这个硬盘的大小是10.7GB,有255个磁面,63个扇区,1305磁柱(cylinders)每个cylinder(磁柱)的容量是 8225280 bytes=8225.280 K(约为)=8.225280M(约为); Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 1305 10377990 8e Linux LVM id和System 表示的是一个意思,id看起来不太直观,我们要在fdisk 一个分区时,通过指定id来确认分区类型;比如 7表示的就NTFS 分区;这个在fdisk 中要通过t功能来指定。下面的部分会提到; Disk /dev/sdb: 21.4 GB,21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280bytes Disk /dev/sdb doesn"t contain a validpartition table说明:硬盘分区的表示:在Linux 是通过hd*x 或 sd*x 表示的:其中* 表示的是a、b、c ... ... 另外x 表示的数字 1、2、3 ... ...hd大多是IDE硬盘;sd大多是SCSI或移动存储;引导(Boot):表示引导分区,在上面的例子中sda1 是引导分区;Start (开始):表示的一个分区从Xcylinder(磁柱)开始;End (结束):表示一个分区到 Ycylinder(磁柱)结束;
2、 学会使用fdisk帮助功能:[root@ www.linuxidc.com~]# fdisk /dev/sda Thenumber of cylinders for this disk is set to 1305.There isnothing wrong with that, but this is larger than 1024,and couldin certain setups cause problems with:1) softwarethat 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 ---输出帮助信息Commandaction 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 --创建一个新的空白DOS分区表 p print the partition table ---打印分区表 q quit without saving changes ---退出不保存设置 s
createa new empty Sun disklabel --- t
changea partition"s system id ---改变分区的ID u
changedisplay/entry units ---改变显示的单位 v
verifythe partition table ---检查验证分区表 w write table to disk and exit ---保存分区表 x extra functionality (experts only) Command (m for help):
在虚拟机上安装和使用Ubuntu日志Linux搭建PHP5开发环境相关资讯 Linux入门教程
- Linux入门教程:/var/spool/ (02月01日)
- Linux入门教程:如何使用终端安装 (09/16/2015 19:26:13)
- Linux入门教程:Ubuntu笔记本屏幕 (03/16/2015 21:39:15)
| - Linux操作系统入门教程 PDF (12/20/2015 15:38:25)
- Linux操作系统入门教程 (07/31/2015 06:59:53)
- Linux入门教程:如何检查Linux系统 (09/12/2014 11:57:54)
|
本文评论 查看全部评论 (0)