Here's the source of your problem, from your parted
output:
Error: Can't have overlapping partitions.
Your disk's one primary partition (/dev/sda1
) resides entirely within your extended partition (/dev/sda2
). This is illegal. This invalid layout was probably created by the Windows partitioning tools, which often do this sort of thing with disks that have extended and logical partitions.
Chances are my FixPart utility, which comes with Ubuntu, can fix the problem; however, you must be careful about how you go about doing this repair. Specifically:
- Windows normally insists on booting from a primary partition. Thus, you must ensure that whatever partition Windows uses for this purpose becomes a primary partition when FixParts has done its thing.
- In order to create new partition(s) for Ubuntu, you must have at least one logical partition, and it must be positioned in such a way that the future Ubuntu partition(s) will be adjacent to the logical partition(s). (This point assumes that all your existing NTFS partitions contain Windows data. If you intend to convert one of them entirely to Ubuntu use, you might remain under the four-primary-partition limit of MBR.)
- Unless I've missed something, you'll need to resize at least one partition to make room for more. FixParts can't do this. Resizing the partition in Windows is normally advisable; however, as I've already noted, the standard Windows tools tend to make a mess of things when logical partitions are present, so you may want to use a third-party tool or the Ubuntu installer to do this job. (I don't recall offhand how good the Ubuntu installer is at resizing partitions. GParted should be able to do it -- but be sure to fix the overlapping partition problem before you try!)
- Do not create new partitions for Ubuntu using the Windows tools; they're likely to convert to a Logical Disk Manager (LDM) layout (aka a dynamic disk setup), which will be a new set of problems for Ubuntu installation. If you use Windows tools to shrink existing partition(s), leave the resulting space unallocated and let the Ubuntu installer create new partition(s) in that space itself.
- There's always a chance that something will go badly wrong when repartitioning the disk. This is doubly true when your disk is already damaged, as yours is. I therefore recommend doing a full backup, or at least backing up your user files, before you do anything else.
Also, although you note that UEFI boot is specified in your firmware, your disk layout clearly indicates a BIOS-mode installation of Windows. When dual-booting, it's almost always best to ensure that both OSes boot in the same mode, so you should install Ubuntu in BIOS mode. Note that the boot mode (BIOS/CSM/legacy vs. EFI/UEFI) specified in the firmware is often interpreted as more of a suggestion than a command, which is why you can have a BIOS-mode boot even when you've set EFI-mode booting in the firmware.
As an alternative to some of this, you might consider converting Windows to boot in EFI mode, as described in this blog post. With Windows booting in EFI mode from a GPT disk, you needn't be concerned with primary/extended/logical partition issues, since GPT doesn't recognize that distinction. It's usually easier to ensure a consistent EFI-mode boot in a dual-boot configuration than to set up both OSes in BIOS mode, too. (See this page of mine for more on this subject.) If you go this route, it's probably safest to fix the current disk setup with FixParts as a first step; however, if you put off resizing partitions until after the MBR-to-GPT configuration, FixParts will become unnecessary.
Best Answer
You cannot change just one partition - you have to change the whole drive. The whole drive is either a Dynamic Disk or Basic Disk.
To convert a Dynamic Disk to Basic you will need to use Windows. It cannot be done in Linux, because Linux can not access Dynamic Disks. See Converting dynamic to basic disk and MS Technet: Change a Dynamic Disk Back to a Basic Disk and this answer on Super User. For detailed instructions with different tools see this tutorial.