Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 7748  / 3 Years ago, wed, july 7, 2021, 9:28:35

I have a strange problem with my VDI based drive in VirtualBox, which is that the drive does not expand and this has for some reason also resulted in my x not being able to load.



df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.3G 4.3G 0 100% /
udev 1.1G 4.1k 1.1G 1% /dev
tmpfs 421M 750k 420M 1% /run
none 5.3M 0 5.3M 0% /run/lock
none 1.1G 0 1.1G 0% /run/shm
none 105M 8.2k 105M 1% /run/user
overflow 1.1M 0 1.1M 0% /tmp


And the drive size:



enter image description here



Is there a way for Ubuntu to reallocate its actual space?



GParted:
enter image description here



Attempt to expand not possible:
enter image description here


More From » boot

 Answers
5

By using GParted i simply copied the partition i wanted to resize and pasted it into the unallocated partition and resized it. It started copying the partition over and problem was solved.



Since i have already done this i am unable to viualize by screenshots, but there is an copy and paste function when you right click on a partition, so the procedure is simply:




  1. Right click on the partition you wish to expand and click on Copy

  2. Right click on the unallocated partition and click Paste.

  3. A screen should popup where you can set the new size

  4. GParted will start copying the partition into the new resized partition

  5. Test the new partition before deleting the old one.



An image of the right click menu:



enter image description here



As you can see on the image above /dev/sda1 is the old partition that was too small. The new partition which i am booting from currently is /dev/sda3.



If you delete your old partition, you will need to install grub in the new one (no, it isn't copied together with your data). Boot with a live CD and run the following commands:



sudo mount /dev/sda3 /mnt  
sudo grub-install --root-directory=/mnt /dev/sda

[#32834] Friday, July 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enytidge

Total Points: 169
Total Questions: 105
Total Answers: 107

Location: Papua New Guinea
Member since Tue, Aug 24, 2021
3 Years ago
enytidge questions
Tue, Feb 28, 23, 15:26, 1 Year ago
Sun, Jan 1, 23, 19:36, 1 Year ago
Sun, Oct 24, 21, 07:30, 3 Years ago
Wed, Nov 9, 22, 22:02, 2 Years ago
;