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.