LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Overlapping Partitions (https://www.linuxquestions.org/questions/linux-general-1/overlapping-partitions-829645/)

CincinnatiKid 08-31-2010 09:55 PM

Overlapping Partitions
 
Here is what I get if I run cfdisk:

Code:

FATAL ERROR: Bad primary partition 3: Partition ends in the final partial cylind
                          Press any key to exit cfdisk

Here is the output of fdisk -l:

Code:

root@slackware-laptop:/usr/local/src/udf-0.9.8# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x03d0eecd

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        262    2104483+  82  Linux swap
/dev/sda2  *        263      13317  104864287+  83  Linux
/dev/sda3          13318      26372  104864287+  83  Linux
/dev/sda4          26373      60802  276552704    5  Extended
/dev/sda5  *      26373      32747    51200000  83  Linux
/dev/sda6          32747      39121    51200000  83  Linux

As you can see it looks as if /dev/sda4 and /dev/sda5 both have the same number for Start, it appears they are overlapping, is this causing the error with cfdisk?

syg00 08-31-2010 10:09 PM

Code:

root@slackware-laptop:/usr/local/src/udf-0.9.8# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x03d0eecd

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        262    2104483+  82  Linux swap
/dev/sda2  *        263      13317  104864287+  83  Linux
/dev/sda3          13318      26372  104864287+  83  Linux
/dev/sda4          26373      60802  276552704    5  Extended
/dev/sda5  *      26373      32747    51200000  83  Linux
/dev/sda6          32747      39121    51200000  83  Linux

Nope, I'd say the bits I highlighted are the problem.
If it were me I'd delete the extended and reallocate it - allow it to default to end of disk. gparted from a livecd might also work.

exvor 08-31-2010 10:11 PM

No sda4 is an extended partition so its perfectly normal for sda5 which is a partition inside the extended partition to show on the same cylinder boundary.

CincinnatiKid 09-01-2010 07:43 AM

/sda5 and /sda6 are the root and home partitions of another Linux install, is there any way to fix this without breaking that install? If not I will just backup what I need and fix them.

syg00 09-01-2010 08:31 AM

Deleting the extended won't affect the logicals contained within. You have unallocated space in the (current) extended, so you should be safe to adjust the end by that small amount.
So long as you recreate it with the same start location you'll be o.k.

Backups are never a bad idea - see my sigline; your data, your choice.

CincinnatiKid 09-01-2010 10:15 AM

That did the trick. I was able to delete the extended, which deleted the logical partitions. Then I was able to re-create them with the correct constraints, and everything works perfectly. Thanks for your help.


All times are GMT -5. The time now is 08:58 PM.