My Hardware Platform:
- System Model: DELL Latitude E6420
- Processor: Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz, 2801 Mhz, 2 Core(s),
- 4 Logical Processor(s)
- Installed Physical Memory (RAM): 16.0 GB
- System Type: x64-based PC
My Software Platform:
- Microsoft Windows 10 Professional (10.0.18362) as Host
- Oracle VM VirtualBox (6.1) as a Virtual Machine Container
- Ubuntu Linux (20.04) as a Virtual Machine (VM)
- VDI Dynamic Hard Disk with 20 GB upgraded to 100 GB as the solution
- Android Studio (Artic Fox | 2020.3.1)
Gradle (7.0.2 and 7.2)
My Similar Issue:
I experienced booting to a black screen with a blinking or frozen cursor just after downloading and then attempting to install software, in my case two versions of Gradle (7.0.2 and 7.2) for Android Studio (Artic Fox | 2020.3.1) running Ubuntu Linux (20.04) in VirtualBox (6.1) as a Virtual Machine within Microsoft Windows 10 Professional (10.0.18362). I had last downloaded two container files, 'gradle-7.0.2-all.zip' and 'gradle-7.2-all.zip' from the Gradle distribution website. I used a terminal screen to unzip and install these two distributions.
My initial impression was that my VM was ready for the recycle bin. I learned a good lesson here in that setting up snaphots or VM directory backup periodically is very important. I focused on my immediate last actions which had to do with installing software and having low disk space available. My focus remained on disk space limitations as the real problem which turned out to be correct path to solve the problem.
My Comments / Side Notes: I had earlier downloaded and installed the same Gradle versions on the Windows Host OS. It was not clear to me whether the Gradle distributions, zip file containers, were platform specific or not. I downloaded these also to my Windows Host which I believe can also be used on the Ubuntu 20.04 VM. I copied one of the Gradle zip files from the Host to the VM to save downloading data. Gradle was new to me, so I was very concerned about installation issues. As I understand it, it turns out that the same files can be installed on either platform. I originally thought this problem issue might have been tied to my black screen problem by possibly having the wrong binaries loaded.*
1.) I discovered that Ubuntu 20.04 had a boot-up recovery mode. This allowed me to get to the VHD and delete the Gradle directories I had just installed to gain and recover disk space.
2.) I rebooted my computer and the black screen with the hanging cursor was eliminated. I was very happy at this point. Note: This would be a good point to make a snapshot of your VM, like a restore point in Windows.
3.) I reviewed the information about my dynamic virtual hard disk (*.vdi) by going to Oracle VirtualBox 6.1 | Settings | Storage | Controller: SATA. I found information about the "Virtual Size" limit and the "Actual Size" consumed by my VM.
4.) I found that VirtualBox 6.1 | Virtual Media Manager allows the user to graphically increase the "Virtual Size" limit of the virtual drive, like buying a new higher capacity hard drive which I modified when the Ubuntu VM was off, not running. Optionally, there is a command line option to increase the "Virtual Size" of the drive.
Important Notes: Setting the Virtual Size to 100 GB in the GUI will be equivalent to setting the 102400 MB in the Terminal mode. Shrinking the size of a drive is not currently permitting or supported. You will receive an error if you accidently try to shrink the size of the virtual drive. So, you can go up; but you cannot go down. So, you should consider that when increasing the "Virtual Size" of the virtual hard disk. This work alone does not solve the virtual hard disk space problem.
Comments: Consider the Windows Host box and physical drives where you have a physical drive of a certain size or capacity and partitions within that drive, like Primary Partitions, or creating an Extended Partition to a particular Primary Partition containing possible Logical Partitions within it; the collective/aggregate size of all the Partitions cannot exceed the maximum size or capacity of the drive, in our case the capacity of a Virtual Drive. So, you have to increase the "Virtual Size" of the drive first, like buying a new higher capacity hard drive at the store where you could clone the old drive to the new one of higher capacity and then stretch the "Actual Size" of the existing partition up to the maximum size or capacity ("Virtual Size") of the new Virtual Drive. "Virtual Size" limit represents the maximum size or capacity of the virtual drive or hard disk. So, additional work remains to be done.
I then downloaded the GNOME Partition Editor, an ISO file. There is a 32-bit and 64-bit ISO file version available.
I mounted the ISO from VirtualBox and Windows 10 when the VM is not running.
I Backed up my VirtualBox folder in Windows 10. IMPORTANT
Required: This process requires that all VM snapshots be deleted before enlarging the "Actual Size" (partition) of the virtual drive to increase and likely match the virtual size capacity ("Virtual Size"), of the new drive.
Using the mounted ISO file, I booted into GNOME Partition Editor.
I successfully increased the size of the old partition to match the new capacity and "Virtual Size" of the drive set earlier in the GUI of VirtualBox.
I performed a normal shutdown of the VM.
I dismounted the ISO boot file for the GNOME Partition Editor.
I restarted the Ubuntu 20.04 virtual VM and the solution to my problem was complete.
I then reloaded the two versions of Gradle. I then performed software updates to my computer for Ubuntu 20.04.
1.) VDI: Oracle's Default Disk Format Used by Virtual Box
2.) How to Boot to Recovery Mode (Safe Mode) in Ubuntu Important
3.) Partitioning Hard Drives
4.) GNOME Partition Editor Important
5.) How to Increase Disk Size of Your Existing Virtual Machines in VirtualBox
Important Notes: This shows the GUI approach and the Terminal Command Line approach to increasing the "Virtual Size" of the drive.