Add space for Ubuntu under vmvm

Source: Internet
Author: User
Since the virtual machine was installed with only 5g multi-point space allocated to it, the system occupied more than 2g space (some common packages were installed ). Next, I want to study uClinux in Ubuntu. After decompression, there will be more than 1 GB of space, which cannot be installed. I want to increase the space for Ubuntu. First, run the Ubuntu command to clear unnecessary software packages: sudoapt-getautoclean this command to clear the backup package sudoapt-getclean of the deleted software.

Since the virtual machine was installed with only 5g multi-point space allocated to it, the system occupied more than 2g space (some common packages were installed ). Next, I want to study uClinux in Ubuntu. After decompression, there will be more than 1 GB of space, which cannot be installed. I want to increase the space for Ubuntu.

First, run the Ubuntu command to clear unused software packages:

Sudo apt-get autoclean this command clears the backup package of the deleted Software

Sudo apt-get clean this command clears the backup packages of installed software

After using the above command, only more than 300 MB of space is released. No way, you have to add a hard disk under the VM.

It is easy to add a hard disk under the VM. This time I added 4 GB, it should be enough for a while. The problem is that there is no experience in partitioning in Ubuntu. Refer to the online description. The new hard disk is sdb by default. You can use sudo fdisk/dev/sdb to partition it.

However, when I run this command, there is no cylinder prompt, so I chose to use gparted. First install sudo apt-get install gparted, then you can find the partition editor in the system and run it to see the partition of the entire system. In the past, 5g space Ubuntu was automatically divided into two zones, one being the root partition, and the other being the SWAP partition (My SWAP partition is about 256 MB, and the VM allocates MB of memory, I remember someone said it was twice the memory size, but it was not changed ). In the upper-right corner, you can select sdb, which is newly added to the 4G hard disk. I set it as the primary partition in the format of EXT3. When running gparted, the first hard disk in my virtual machine is always reading and writing. I don't know why. (The first few times I performed the partition operation directly in the command line sudo gparted)

No special mounting is performed after the partition ends. You can click 4G volume in the graphic interface to easily mount the volume (under/media/sdb/by default ).

Now, the problem of insufficient space is solved.

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.