The conversion from dynamic to basic left your partition table in weird layout. I guess because you had more than 4 partition so it converted all of them into logical except the System Reserved which needs to be primary in any case.
In your place, I would use fixparts from ubuntu live mode, print the table it can detect, and very carefully convert HP_Tools and C: into primary partitions. Leave the D: as logical.
Then, when the layout in fixparts looks OK to you, write the new table. It doesn't do anything until you use 'w' to write the table.
fixparts has a very easy option to convert primary to logical partitions, and vice versa.
Converting HP_Tools and C: into primary, would leave three primary partitions (System Reserved is already primary), and one logical (the D: partition). It will probably leave the unallocated space next to D: as outside the extended partition but when you install ubuntu it will take care of that and join D: and the ubuntu partitions in one extended because they will all be logical partitions. I hope that made sense.
Read the fixparts tutorial first. There is a .deb you can install in live mode. Just don't forget that if you restart the program is not kept in live mode and you have to install it again.
www.rodsbooks.com/fixparts/
Bookmarks