Re: How to fix FATAL ERROR: Bad primary partition 1: Partition ends in the final part
Please post the "sudo fdisk -lu" output that coffeecat suggests for a full diagnosis. My suspicion is that there's no real problem; you're just using an old utility that's reporting as a "FATAL ERROR" (in scary all-caps, no less) something that's neither fatal nor an error. Specifically, 20+ years ago hard disks were designed so that three numbers were used to identify sectors on a disk: a cylinder, a head, and a sector ("CHS addressing"). This method mutated to the point where it became a convenient fiction and then an inconvenient fiction and is now a worse-than-useless legacy of years gone by. Modern disks and disk utilities rely on logical block addressing (LBA) rather than CHS addressing. In LBA, just one (bigger) number is used to identify disk addresses. One issue is that most disks have a number of sectors that's not an even multiple of the number of cylinders, as measured in the obsolete CHS scheme. Many modern partitioning tools are willing to place partitions so that they use up to the very last sector on the disk, which means that the partition ends in the "partial cylinder" at the end of the disk, as measured in CHS terms. This isn't an error for modern tools, but very old OSes and utilities (like DOS from the 1980s or possibly the 1990s) might flake out on such a disk. Such an old OS or utilty can't handle disks over about 8 GB, though, so if your disk is bigger than that, compatibility with such an old OS isn't an issue anyhow.
So, to wrap up this explanation, my suspicion at this point is that your version of cfdisk is enforcing partition rules that are almost old enough to make disco balls look cutting-edge. If I'm right, you should either upgrade cfdisk or just plain not use it. The cfdisk program is part of the util-linux package, but if you've been keeping up with updates for your version of Ubuntu, you might need to manually uninstall it and install it from a source tarball or in some other unofficial way to get an update. I'm not sure when (or even if) cfdisk stopped enforcing these old CHS partitioning rules, so I don't know what version of util-linux you should seek out.
If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.