On a Windows 10 laptop, I installed Ubuntu 20.04.3 LTS (ubuntu-20.04.3-desktop-amd64.iso) on VirtualBox 6.1.28. I alloted 20GB to the virtual disk, but am running out of room. I followed this page to resize the virtual disk to 40GB.
I tried to follow the 3 pages below to extend the partition used by Ubuntu. They all refer to a swap partition.
Is there a dummy's process to extend my Ubuntu partition in the absence of a swap partition?
Here are the 3 pages I tried to follow...
(1) Use gparted
in a live running Ubuntu VM

I can't follow the procedure because I have no line item that corresponds to a swap partition (at least not that I recognize). I assume that sda5 is my main file system since it is 20GB and mostly used. I right-clicked it and chose "Resize/Move".

The new size "19965" seems suspiciously close to the original 20GB size, so I entered 2x that amount (39930). Unfortunately, it is not accepted. If I press Return
or Tab
, it reverts back to 19965. I can't simply click the "Resize" button because it is grayed out.
(2) Use fdisk -l
The result of df -h
is:
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 394M 1.3M 393M 1% /run
/dev/sda5 20G 15G 3.4G 82% /
tmpfs 2.0G 6.2M 2.0G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/loop0 128K 128K 0 100% /snap/bare/5
/dev/loop2 56M 56M 0 100% /snap/core18/2128
/dev/loop3 219M 219M 0 100% /snap/gnome-3-34-1804/72
/dev/loop1 56M 56M 0 100% /snap/core18/2246
/dev/loop4 66M 66M 0 100% /snap/gtk-common-themes/1519
/dev/loop5 51M 51M 0 100% /snap/snap-store/547
/dev/loop6 33M 33M 0 100% /snap/snapd/12704
/dev/loop7 33M 33M 0 100% /snap/snapd/13640
/dev/loop8 66M 66M 0 100% /snap/gtk-common-themes/1515
/dev/sda1 511M 4.0K 511M 1% /boot/efi
User.Name 476G 237G 240G 50% /media/sf_User.Name
tmpfs 394M 48K 394M 1% /run/user/1000
/dev/sr0 59M 59M 0 100% /media/lnxadmin/VBox_GAs_6.1.28
I didn't follow the subsequent fdisk -l
because it makes reference to a swap partition, which I don't have. Plus, it refers to VM Workstation, which I do not have.
(3) Use fdisk /dev/sda
After launching the fdisk
app using fdisk /dev/sda
, I entered p
to see the partitions:
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1052670 41940991 40888322 19.5G 5 Extended
/dev/sda5 1052672 41940991 40888320 19.5G 83 Linux
Again, I have no swap partition. Since the procedure refers to a swap partition, I abandoned this as well.