Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
prompt$ sudo fdisk -l /dev/sda
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe11595f6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 15298 122881153+ 7 HPFS/NTFS
/dev/sda2 15299 16700 11261565 12 Compaq diagnostics
/dev/sda3 16701 60801 354241282+ 5 Extended
/dev/sda5 52516 60801 66557295 7 HPFS/NTFS
/dev/sda6 16701 24602 63472752 83 Linux
/dev/sda7 24603 24845 1951866 83 Linux
/dev/sda8 24846 26061 9767488+ 83 Linux
/dev/sda9 44613 52514 63472783+ 83 Linux
/dev/sda10 26062 38809 102398278+ 83 Linux
/dev/sda11 38810 39307 4000153+ 82 Linux swap / Solaris
Partition table entries are not in disk order
prompt$
However, I get a fatal error when I try "cfdisk".
Code:
prompt$ sudo cfdisk /dev/sda
FATAL ERROR: Bad logical partition 6: enlarged logical partitions overlap
Press any key to exit cfdisk
prompt$
An alternate way of looking at the fdisk report might be:
(I edited the report by hand)
Code:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 15298 122881153+ 7 HPFS/NTFS
/dev/sda2 15299 16700 11261565 12 Compaq diagnostics
/dev/sda3 16701 60801 354241282+ 5 Extended
/dev/sda6 16701 24602 63472752 83 Linux
/dev/sda7 24603 24845 1951866 83 Linux
/dev/sda8 24846 26061 9767488+ 83 Linux
/dev/sda10 26062 38809 102398278+ 83 Linux
/dev/sda11 38810 39307 4000153+ 82 Linux swap
39308 -- 44612 not listed
/dev/sda9 44613 52514 63472783+ 83 Linux Solaris
/dev/sda5 52516 60801 66557295 7 HPFS/NTFS
prompt$
The various colors highlight groups of cylinders that were created together, out of order with their respective partitions numbers.
I don't see the problem that cfdisk complains about.
Help, please,
~~~ 0;-Dan
Last edited by SaintDanBert; 10-03-2010 at 03:51 PM.
sda3 and sda6 have start cylinders which are the same, in fact, sda6 is within sda3 which, er... you could say is the overlap seen by cfdisk. Maybe fdisk doesn't care as much?
However... I notice that sda9 is tagged as Linux/Solaris. A clue perhaps? Has this disk been partitioned on a Sun box? For reasons best known to Sun, disks partitioned and formatted on their systems have this strange third partition which is effectively "the whole disk" OK, so you've got a Compaq diagnostic partition hidden on the front which infers it belongs in a Compaq box and is not part of "The whole disk"...
sda3 and sda6 have start cylinders which are the same, in fact, sda6 is within sda3 which, er... you could say is the overlap seen by cfdisk.
Of course they overlap, because they have to! sda3 is an extended partition which contains of course other logical partitions, in this case all partitions from sda5 to sda11. This is not an error.
Quote:
However... I notice that sda9 is tagged as Linux/Solaris. A clue perhaps? Has this disk been partitioned on a Sun box?
First, it is sda11 that is tagged as Linux swap/Solaris. Second, I think this is normal.
In fact, I don't see any error in this partition table.
Have you tried other partitioning tools like GParted?
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673
Rep:
Rats! I read SaintDanBert's hand sorted partition list:
Quote:
/dev/sda9 44613 52514 63472783+ 83 Linux Solaris
which may have caused the confusion, I should have noted the partition ID; 83 = Linux, bf = Solaris.
So, is the extended partition normal on X86 systems? I've just checked my system and I don't have one. My Sun Ultra 2 DOES with the disk formatted under Solaris. Could it be that cfdisk doesn't like extended partitions?
Extract from "man cfdisk"
Quote:
cfdisk tries to read the current partition table from the disk
drive. If it is unable to figure out the partition table, an error is
displayed and the program will exit. This might also be caused by
incorrect geometry information, and can be overridden on the command
line. Another way around this problem is with the -z option. This
will ignore the partition table on the disk.
Nope. I couldn't find any references to extended partitions. Any Ideas?
This probably won't be all the helpful, but I used to get a similar error when I tried to use Cfdisk in a gentoo install as well. I ended up being forced to use fdisk instead. If the option is available, using a gparted live CD to cut up your drives instead is much easier.
Yes, extended partitions are normal on PC's. It's the only way to get more than 4 partitions on a disk.
There can only be 4 primary partitions on a disk (sdx1-4). One of these primary partitions can be flagged as extended partition.
There can be only 1 partition flagged as extended. The extended partition then can be divided in logical partitions (sdx5-sdx..).
Logical partitions will always start at sdx5 no matter how many primary partitions there are.
For the problems with cfdisk. I suspect that the strange order of logical partitions confuses cfdisk enough, so it will quit rather then hose the disk.
Quote:
If it is unable to figure out the partition table, an error is
displayed and the program will exit.
The only other possible problem I see is with the extended partition flag 5 Extended
instead of the more modern use of f W95 Ext'd (LBA)
You could try parted to see if that also gives errors.
...
sda3 and sda6 have start cylinders which are the same, in fact, sda6 is within sda3 which, er... you could say is the overlap seen by cfdisk. Maybe fdisk doesn't care as much?
SDA6 is a "logical partition". they must exist inside an "extended partition". SDA3 provides that extended partition. Does this mean that cfdisk cannot display drives with "extended" partitions or is it expecting some other partition type that what is going on here?
Quote:
Originally Posted by Soadyheid
However... I notice that sda9 is tagged as Linux/Solaris. A clue perhaps? Has this disk been partitioned on a Sun box?
That is how "swap space" gets reported. I don't know why.
Quote:
Originally Posted by Soadyheid
...
OK, so you've got a Compaq diagnostic partition hidden on the front which infers it belongs in a Compaq box and is not part of "The whole disk"...
Actually, the partition is loaded by Lenovo rather than Compaq. Yes it is their diags and recovery utils. It must be the second partition on the first drive or else it will not boot. It must be fat32 and is very VERY win-doze oriented.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.