Originally Posted by d-mcclean
mint@mint ~ $ sudo fdisk /dev/sda -lu
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c9611
Device Boot Start End Blocks Id System
/dev/sda1 4095 312576704 156286305 5 Extended
/dev/sda2 * 123785216 195393535 35804160 83 Linux
/dev/sda3 195393536 230549503 17577984 83 Linux
/dev/sda5 4096 55459839 27727872 83 Linux
/dev/sda6 55461888 58058751 1298432 82 Linux swap / Solaris
/dev/sda7 58060800 123785215 32862208 83 Linux
/dev/sda8 230564943 255738734 12586896 83 Linux
/dev/sda9 255738798 262212929 3237066 82 Linux swap / Solaris
/dev/sda10 262212993 312576704 25181856 83 Linux
There is nothing wrong with partition 5. Partitions 5 and up are logical drives and can only
exist within an extended partition, which is your partition 1. While it is unusual to have partition 1 be an extended partition, there is nothing really wrong about that. And, having partition 2 marked as "active" is irrelevant. Only the standard DOS/Windows boot loader uses that flag. No Linux boot loader pays any attention to it. (Your BIOS might
require that some
partition be marked "active" in order to consider the drive a candidate for a boot device.)
What is very
wrong here is that partitions 2 and 3 are also using space within the extended partition. Primary partitions (partitions 1 through 4) should never
be allocated space within the bounds of an extended partition. None of your partitions are actually overlapping, which is why everything works, at least for now. If you ever try to change any of those logical partitions, though, you would have to be very careful not to step on partitions 2 and 3.
I can't come up with any straightforward method of cleaning up this mess other than saving all of the non-swap partitions to another drive (with clonezilla
or equiv.), repartitioning this drive from scratch, and then restoring everything and reinstalling the boot loaders.
One alternative might be to make sda1 end at sector 123785215 to include partitions 5, 6, and 7, and then make another
extended partition sda4 to include partitions 8, 9, and 10. (Having two extended partitions on a drive is actually OK in Linux. If you want to make it seem less weird, make the second one type 85, "Linux extended".) But, figuring out the right starting offset for sda4 might be a bit of a challenge. From the looks of your current sda1 and sda5, starting sda4 at sector 230564942 would work, but your tool might insist on more than a 1-sector offset before that start of sda8. Fortunately, you've got some space to work with there following the end of sda3 at sector 230549503.
Like I said, not very straightforward. And don't make any mistakes. Placing logical drives at the wrong location can overwrite data (unlike changing primary partitions, which can always be reversed).