In many cases, there is not enough space allocated when installing a linux system with vmware. Later, it was discovered that there was not enough space, but it was too troublesome to reinstall the system, so there is only a way to increase the space. But how to increase space and how to use it like the original system space is indeed a problem. The following is an example of your own experience:
1. log out of LINUX, select edit virtual machine settings on the vmware startup interface to add a disk, select add, select add hard disk, and click Next. Select create a new virtual disk, click Next and select scsi to continue. Select the size of the new disk and select Allocate all disk space now to Allocate space immediately. Next, select a directory on your hard disk to create the disk. Click Finish. In this way, a new space is created.
2. Go to the LINUX system. Su: password: Enter the root permission. Run the command fdisk-l to view the new disk. my options are/dev/sdb. Then, use the command fdisk/dev/sdb to partition the new space. I will not talk about the specific usage of fdisk. You can split it into partitions, save and exit. In the/dev/directory, a device/dev/sdb1 is added, which is a partition just separated. format it with the command mkfs. ext3/dev/sdb1. In this way, you can MOUNT the partition to the system by running the MOUNT command, but this is not complete. Use the ROOT permission to MOUNT the partition. Other users cannot operate the partition, in addition, this partition cannot run the program. So proceed.
3. Create a folder under your user directory with normal permissions, such as/home/kinghua/mymnt. MOUNT the new partition to this directory.
4. Use ROOT permission to lay down the/etc/fstab file. Adds an option. The specific fstab operation is not explained here. Add as follows:
/Dev/sdb1/home/kinghua/mymnt ext3 noauto, user, exec 0 0
The TAB key is used in the middle. Save. In this way, the MOUNT format of the new partition is set.
5. Now, let's set how to automatically MOUNT and UMOUNT the partition when the system starts. Go to your user directory, vi. bash_profile, and add a line of mount/home/kinghua/mymnt. Similarly, add a line of umount/home/kinghua/mymnt to vi. bash_logout. Save.
6. You have set up and restarted the system. Use df-h to view the disk status. Haha, the disk is automatically mounted. In addition, normal users have all the permissions and can execute files in it, which is as easy as the original system partition. OK.