I have two disks on my computer: an SSD on which my windows is installed and a HDD which had my ubuntu. I recently deleted Ubuntu and now have the space left as unallocated space on my disk. I am unable to reallocate it owing to the presence of this EFI partition: I want to find out whether this partition is safe to be deleted. I believe it is some kind of remnant of my improperly removed Ubuntu installation. Can someone please let me know how I can be sure and how I can proceed safely to reclaim the unallocated volume?
You would need to find out the GPT partition UUID of the "problem" partition, and then verify that that UUID is not present in any UEFI boot entry you want to use.
I would recommend booting the system in UEFI mode using a Linux live media, and running
lsblk -o +partuuid to view the partition UUIDs of each partition. Then
sudo efibootmgr -v to view the UEFI boot variables, including the partition UUIDs they refer to. If the UUID of the problem partition is not present in the
efibootmgr -v output or the boot variable clearly refers to the already-removed Ubuntu, you can remove the partition... and you may want to use
efibootmgr to remove the boot variable too.
If you want to find out how to do that using Windows tools, that is off topic here in Unix & Linux StackExchange; please ask again in SuperUser StackExchange instead.
You could mount the EFI system partition, and double-check that it only has an
EFI/Ubuntu directory, and no
You could do this by booting a Ubuntu installer in "Try Ubuntu" mode, e.g. using the Disks app in Ubuntu.
Or, you could try using Windows. For example, you might be able to mount the EFI partition to a Windows drive letter, using the Disk Management app you have screenshot in your question. See Change a drive letter.
Finally, if you use
fdisk on the Ubuntu command line, you could:
- Write down the number, start sector, end sector, and type of the partition.
- Delete the partition.
- Reboot into Windows.
- If Windows breaks, you can use
fdiskto re-create the deleted partition. All the partition data will still be there. (Unless you created a new partition to overwrite it!)