How to expand the Ubuntu root partition size in VMware

Source: Internet
Author: User
Tags gparted

How to expand the Ubuntu root partition size in VMware

I am worried that the hard disk capacity of the created virtual machine will be too large to occupy the real hard disk space, and the hard disk capacity will be set to a small value. However, after installing the system for the virtual machine, I will install other software, hard disk capacity is insufficient. This requires a way to expand the Ubuntu root partition. I will introduce this method below.

1. Modify the hard disk size

In the wmwareinstallation directory, there is an executable file named vmware-vdiskmanager.exe. Open the console in windows and enter the WMware installation directory, and run the following command (assume that my VM file is in E: \ VMware \ Ubuntu. vmdk ):

Vmware-vdiskmanager.exe-x 16 Gb e: \ VMware \ Ubuntu. vmdk

Among them:-x 16 Gb means to expand the hard disk to 16 Gb, followed by e: \ VMware \ Ubuntu. vmdk is a virtual machine file.

After this process is completed, turn on vmware again and run the VM. The size of the hard disk displayed on the VM has changed.

The following information is displayed when the operation is correct:

Note:

1. If space exists in the path, enclose the path with double quotation marks.

2. the above process is performed on the windows console.

3. the above process must be completed when vmware is disabled.

2. Hard Disk partitioning

Run the fdisk-l command to view the hard disk:

At this time, the hard disk size has changed to 16 GB (17.2 GB), because the new hard disk is not partitioned, so it does not appear below, the following sda1, sda2, sda5 is a usable hard disk, the total volume is still the original 6 GB. Now we need to partition the new hard disk. There is a software called gparted, can operate Linux partition like partitionmagic in Windows, on the official website we can download to the gparted-live-0.8.0-5.iso (http://nchc.dl.sourceforge.net/project/gparted/gparted-live-stable/0.8.0-5/gparted-live-0.8.0-5.iso) this file, then load in VMware's optical drive and restart the virtual machine, when the VM is enabled, Press ESC to enable the BIOS of the VM from the optical drive, for example:

Select GParted Live (Default settings) in the following interface and click Enter:

Then go to the following interface to partition:

Finally, partition the hard disk. We want to expand the size of the Ubuntu root partition, so we can increase sda1. However, if the swap partition is behind sda1 and sda1 cannot be adjusted, you can delete the swap first, increase sda1, and leave the swap as much space as the memory, then convert the space into a swap partition. Click restart to restart the application. Run the fdisk-l command to see that the Ubuntu root partition has become larger:

For details about GParted, click here
GParted: click here

Merge partitions with GParted in Ubuntu

Use GParted and acronis For lossless adjustment of Linux partitions and NTFS partitions

GParted: First aid your hard disk data

Ubuntu 10.04 compiles the latest GParted 0.8.0, and supports hard disks with sectors> bytes!

Use GParted-LiveCD to adjust the Ubuntu partition size

The easy-to-use partition tool GParted in Ubuntu [graphic]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.