1 在Vmware中关闭Ubuntu虚拟机,在设置中,添加新的硬件设备,选择Hard Disk。(这里如果不关闭ubuntu系统就不能增加新的硬件设备) 之后点击下一步,选择硬盘类型,可以选择IDE,或是SCSI,这里我们选择SCSI,下一步,选择虚拟新硬盘的位置,我们将之命名为Ubuntu2.vmdk,下一步,设定硬盘大小,我这里设定为5G,并选择Allocate all disk space now,不选这项,刚开始,硬盘比较小,但是随着硬盘读写访问,虚拟硬盘文件会越来越大。选择该项后,虚拟硬盘就固定为所选的5G空间,不会再增大了。之后,点击 Finish,开始创建新硬盘。
2 启动Ubuntu,root用户登录。
在终端输入:fdisk -l ,可以看到
----------------------------------------------------------------------------
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000af383
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1244 9992398+ 83 Linux
/dev/sda2 1245 1305 489982+ 5 Extended
/dev/sda5 1245 1305 489951 82 Linux swap / Solaris
Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table
----------------------------------------------------------------------------