LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-20-2012, 03:37 AM   #1
riller
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Rep: Reputation: 0
cfdisk : FATAL ERROR: Bad logical partition 10: enlarged logical partitions overlap


I want to fix my partition without delete it. Is it possible? How? Seems I should run fdisk from live CD, what's the command sequence then?

I'm using Fedora 16. Recently I can't use cfdisk since every time it would give the below warning:

sudo cfdisk
FATAL ERROR: Bad logical partition 10: enlarged logical partitions overlap
Press any key to exit cfdisk

cfdisk works few monthes before.

I've done a lot of google, some thread suggest that maybe it's because of some bad windows partitioner. Partition Magic specified. But what I did use was the one built in Windows. I'm not sure if this is the cause.
http://www.linuxquestions.org/questi...verlap-400751/

fdisk and parted outputs belows:
$ sudo fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x959453bc

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 411647 204800 7 HPFS/NTFS/exFAT
/dev/sda2 411648 102811647 51200000 7 HPFS/NTFS/exFAT
/dev/sda3 102813694 976764927 436975617 f W95 Ext'd (LBA)
/dev/sda5 237658112 299098111 30720000 83 Linux
/dev/sda6 299100160 453814271 77357056 7 HPFS/NTFS/exFAT
/dev/sda7 * 453814335 481194944 13690305 83 Linux
/dev/sda8 481196032 484534271 1669120 7 HPFS/NTFS/exFAT
/dev/sda9 484540416 976764927 246112256 7 HPFS/NTFS/exFAT
/dev/sda10 102817792 184737791 40960000 83 Linux
/dev/sda11 184739840 228438015 21849088 83 Linux
/dev/sda12 228440064 237647871 4603904 82 Linux swap / Solaris

Partition table entries are not in disk order

$ sudo parted -l
Model: ATA ST9500420AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 211MB 210MB primary ntfs boot
2 211MB 52.6GB 52.4GB primary ntfs
3 52.6GB 500GB 447GB extended lba
10 52.6GB 94.6GB 41.9GB logical ext4
11 94.6GB 117GB 22.4GB logical ext4
12 117GB 122GB 4714MB logical linux-swap(v1)
5 122GB 153GB 31.5GB logical ext4
6 153GB 232GB 79.2GB logical ntfs
7 232GB 246GB 14.0GB logical ext4 boot
8 246GB 248GB 1709MB logical ntfs
9 248GB 500GB 252GB logical ntfs

Strange for I can't see any "partitions overlap"
 
Old 04-21-2012, 04:39 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Quote:
Originally Posted by riller View Post
But what I did use was the one built in Windows. I'm not sure if this is the cause.
I have used Windows partitioner a few times before, it always resulted in fdisk/Linux giving errors.
When partitioning, I recommend to always use a Linux tool, never any from Windows!

Now what to do:
1) Do you have a real problem, or does everything work just cfdisk won't?
*If everything works I suggest you take a backup of all data you need and then try to repartition using fdisk - if you can't run it from fedora then try a live-cd.
Start with deleting partitions 10-12, these are the "strange" ones, the ones not in disk order. If you're lucky that will be enough. Don't do this, read next post!
* If you have trouble accessing your data then we're up to a far mor difficult problem.
If this is the case report back with info about which partition(s) you have trouble accessing and don't use that computer until problem is fixed!!!

2) Also note: you have 2 active partitions!
This is not good, hope your system still boots - when I accidentally did that my poor BIOS got confused and 'puter hanged...
So remove the "active" flag on partition 7.

Last edited by pingu; 04-21-2012 at 05:14 AM. Reason: Bad first idea
 
Old 04-21-2012, 05:12 AM   #3
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Hmm I've done some more thinking, my previous suggestion (to remove partitions 10-12) is not good.
It will fix the disk order - but the unused space is still in the beginning of the extended partition, creating a new partition will give it number 10 in the same position as now.
The actual problem is that the first logical volume is placed after the first 110GB of the extended partition. Logical volumes are always created and numbered in sequence (primary partitions are not), so this is caused by first creating a bunch of logical volumes and then deleting the first ones.

So how to fix it?
Well, the safest is to delete the extended partition thus deleting all logical volumes and repartition.
There is another way, more tricky and might not work - your Fedora shouldn't be a problem but I don't dare think of what will happen with Windows!
In fdisk there is an option to fix the partition order.
What this does is simply renumber the partitions, so your /dev/sda10 will be /dev/sda5 and so on.
Best is to do it from a live-cd, so you can get everything done.
You do this in fdisk:
Code:
# fdisk /dev/sda
x (extra functionality (experts only))
f (fix partition order)
p (print the partition table)
w (write table to disk and exit)
enter.
Now you will have to edit grub (or whatever boot loader you're using) end /etc/fstab for your Fedora.
And Windows... well, I hope it boots up, hopefully you don't lose anything but who knows?

And as always when messing with partitons, be careful, take backup first, think before you act.
 
Old 04-22-2012, 10:18 AM   #4
riller
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Once, Windows partitioner delete my 6 ext4 / LVM partitions by mistake when I want to delete only one of them. And this time... Well I won't use that again.

No Real Problem: No, everything works but cfdisk. I wanna fix it so that I don't need to learn more about fdisk. But seems I need to if I wanna fix it. Get to learn anyway...

Active Partitions: I've installed grub into MBR, so active partition lable can be just ignored. sda1=Windows loader, sda7=LFS, sda10=Fedora. Grub can load them all.

Fix it: Windows loader is always in sda1 and seems trustworthy under controle of grub. Modifying /boot/grub2/grub.cfg is a piece of cake. Reinstall grub is done 2 times before. And I'll prepare for a reinstall for the 2 OS as well. I've download an Ubuntu Live CD. Once I've done the repartition, I'll post a reply here.

Thanks for your help

Last edited by riller; 04-22-2012 at 10:20 AM.
 
Old 04-22-2012, 11:23 AM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
You're right about Grub in mbr taking precedence, I forgot about that.

"Modifying /boot/grub2/grub.cfg is a piece of cake" - just don't forget to check /etc/fstab, you might have to edit that as well (depends on how partitions are mounted - using /dev/sda# , UUID, LABEL ...?)

And my worries about Windows is not only booting it but how it will react to the fact that partitions are renumbered. Shouldn't be an issue but I simply don't trust Windows!
Well, you'll soon know, hope it works fine!
 
Old 04-23-2012, 05:20 AM   #6
riller
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Original Poster
Rep: Reputation: 0
It's using UUID. Seems I don't need to change it. We will know, well, before the weekend I guess.
 
Old 05-08-2012, 12:02 PM   #7
riller
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Here's the progress. I've fix the partition order and the grub2. Now cfdisk is reporting the same error message with another partition.
Details are as belows. The partition used to be reported to be with error is now sda5, but cfdisk is now reporting a sda6 error.

$ sudo cfdisk /dev/sda

FATAL ERROR: Bad logical partition 6: enlarged logical partitions overlap
Press any key to exit cfdisk

$ sudo fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x959453bc

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 411647 204800 7 HPFS/NTFS/exFAT
/dev/sda2 411648 102811647 51200000 7 HPFS/NTFS/exFAT
/dev/sda3 102813694 976764927 436975617 f W95 Ext'd (LBA)
/dev/sda5 102817792 184737791 40960000 83 Linux
/dev/sda6 184739840 228438015 21849088 83 Linux
/dev/sda7 228440064 237647871 4603904 82 Linux swap / Solaris
/dev/sda8 237658112 299098111 30720000 83 Linux
/dev/sda9 299100160 453814271 77357056 7 HPFS/NTFS/exFAT
/dev/sda10 * 453814335 481194944 13690305 83 Linux
/dev/sda11 481196032 484534271 1669120 7 HPFS/NTFS/exFAT
/dev/sda12 484540416 976764927 246112256 7 HPFS/NTFS/exFAT

I also tried gparted. It returns the same info of fdisk's.

Things are going wired. I tend to believe it's a cfdisk by now. Or is there anything I can try here?
I'm going to delete sda6 and allocate a new one if there's no further suggestion. And I will post the result here again.
Next week, I guess.
 
Old 05-31-2012, 08:01 AM   #8
riller
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Original Poster
Rep: Reputation: 0
I've delete the sda6 and cfdisk now works well.
 
Old 05-31-2012, 08:17 AM   #9
riller
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Original Poster
Rep: Reputation: 0
No, not working well. Through it can display a partition list and that's better than before. Now the Fedora Disk Utility don't recognize the partition created by cfdisk.
I quit.
 
  


Reply

Tags
cfdisk


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cfdisk fatal error - bad primary partition ewsmith Slackware - Installation 8 10-31-2010 03:34 PM
Fatal Error, Logical Partitions Overlap zephyrus17 Linux - Newbie 2 10-31-2009 07:41 PM
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 06:55 PM
CFDISK Logical partitions ZeroCoolJr Slackware 7 02-23-2004 06:20 AM
Partition Magic & converting to logical partitions lawsonrc Linux - General 2 10-28-2003 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration