解决VMware环境下linux虚拟机/dev/sda1设备100%的问题

转自:https://alexanderzeitler.com/articles/resizing-a-vmware-workstation-partition-using-gparted/



If the boot sequence is to fast, you can add this line to your VMs .vmx file:

bios.bootDelay = "2000"

This will delay the boot sequence for 2000 ms and show the options.

If you're running Ubuntu in your VM, it is likely that there might be a swap partition (/dev/sda5 here) between the main partition and the aforementioned created, unallocated new space and your partitions might look like this:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第1张图片

What we want to achieve now, is to merge the 10 GB unallocated space at the end of the list to the /dev/sda1 partition.

First, we'll select /dev/sda2 (NOT /dev/sda5!):

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第2张图片

Then, we click "Resize/Move":

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第3张图片

Next, we increase the size of /dev/sda2 to use all available space:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第4张图片

Now we select /dev/sda5 and click Resize/Move again:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第5张图片

In this step, we move /dev/sda5 inside /dev/sda2 to right end:解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第6张图片

Then again, we select /dev/sda2:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第7张图片

After clicking Resize/Move now we shrink /dev/sda2 to the size of /dev/sda5 by moving the left arrow to the right until it is blocked:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第8张图片

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第9张图片

Now we select /dev/sda1 again:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第10张图片

After clicking "Resize/Move" again, we finally can expand /dev/sda1 to the right:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第11张图片

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第12张图片

The final step is hitting the "Apply" button, confirm everything, cross fingers and wait for the operations to succeed.

As GParted already tells you in almost every step: Be careful with what you're doing and create a backup before you're trying to modify your partitions!


If the boot sequence is to fast, you can add this line to your VMs .vmx file:

bios.bootDelay = "2000"

This will delay the boot sequence for 2000 ms and show the options.

If you're running Ubuntu in your VM, it is likely that there might be a swap partition (/dev/sda5 here) between the main partition and the aforementioned created, unallocated new space and your partitions might look like this:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第13张图片

What we want to achieve now, is to merge the 10 GB unallocated space at the end of the list to the /dev/sda1 partition.

First, we'll select /dev/sda2 (NOT /dev/sda5!):

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第14张图片

Then, we click "Resize/Move":

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第15张图片

Next, we increase the size of /dev/sda2 to use all available space:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第16张图片

Now we select /dev/sda5 and click Resize/Move again:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第17张图片

In this step, we move /dev/sda5 inside /dev/sda2 to right end:解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第18张图片

Then again, we select /dev/sda2:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第19张图片

After clicking Resize/Move now we shrink /dev/sda2 to the size of /dev/sda5 by moving the left arrow to the right until it is blocked:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第20张图片

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第21张图片

Now we select /dev/sda1 again:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第22张图片

After clicking "Resize/Move" again, we finally can expand /dev/sda1 to the right:

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第23张图片

解决VMware环境下linux虚拟机/dev/sda1设备100%的问题_第24张图片

The final step is hitting the "Apply" button, confirm everything, cross fingers and wait for the operations to succeed.

As GParted already tells you in almost every step: Be careful with what you're doing and create a backup before you're trying to modify your partitions!

你可能感兴趣的:(解决VMware环境下linux虚拟机/dev/sda1设备100%的问题)