Bug 113201

Summary: Partition table is inconsistent warnings
Product: [Fedora] Fedora Reporter: Mike McLean <mikem>
Component: partedAssignee: Jeremy Katz <katzj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ccradu, chabotc, d.bz-redhat, gczarcinski, jaaksimm, katzj, leonard-rh-bugzilla, marius.andreiana, mattdm, p.van.egdom, rdieter, t.matsuu
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:00:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike McLean 2004-01-09 17:32:13 UTC
* rawhide-20040109 (and others)
* kernel-2.6.0-1.30 (and others)

I am getting the "partition table is inconsistent" warning on lots of
installs.  Anaconda says "Often the reason is that Linux detected the
BIOS geometry incorrectly. However this does not appear to be the case
here."

Comment 2 Mike McLean 2004-01-20 22:25:31 UTC
This is still happening lots.  It interferes with automated testing so
any help would be appreciated. :)

Comment 3 Mike McLean 2004-01-28 18:32:14 UTC
Still happening regularly on a couple machines.

Comment 4 Jeremy Katz 2004-02-17 23:42:35 UTC
Hmmm, not happening with any of the boxes I have.  Can you get a box
that hits the consistently installed and let me log into it?

Comment 5 Gene Czarcinski 2004-02-29 14:25:41 UTC
I am also seeing this problem regularly on one system.  Unfortunately,
it would be impractical to configure things so that you could login.

However, I am willing to collect any information (try anything) that
would help.

What is really strange is that the system has two Maxtor 60GB drives
(ST060H6) as hda and hdb with a Seagate 20GB drive (ST320420A) as hdc.
 The hda and hdc drives use the wrong (non lba) parameters but the hdb
drive is fine.  This is during the FC2-T1 install.

Post install, running parted on hdb or hdc do not produce errors but
on hda I get "... incorrect partition table ... Ignore/Cancel?".

Running fdisk has no problem and shows lba values.

--------------------------------------------------------------------
Here is the output of parted for hda:

parted /dev/hda print
Warning: Unable to align partition properly.  This probably means that
another
partitioning tool generated an incorrect partition table, because it
didn't havethe correct BIOS geometry.  It is safe to ignore,but
ignoring may cause
(fixable) problems with some boot loaders.
Ignore/Cancel? I
Disk geometry for /dev/hda: 0.000-58644.140 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031  10001.403  primary   fat32       boot, lba
2      10001.404  11962.463  primary   linux-swap
3      11962.463  12942.993  primary   ext3
4      12942.993  58643.525  extended
5      12943.024  22489.431  logical   ext3
6      22489.462  32035.869  logical   ext3
7      32035.900  41582.307  logical   ext3
8      41582.338  51128.745  logical   ext3
9      51128.776  58643.525  logical   ext2
Information: Don't forget to update /etc/fstab, if necessary.
--------------------------------------------------------------------

and here is fdisk:
fdisk -l /dev/hda
 
Disk /dev/hda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1275    10241406    c  W95 FAT32 (LBA)
/dev/hda2            1276        1525     2008125   82  Linux swap
/dev/hda3            1526        1650     1004062+  83  Linux
/dev/hda4            1651        7476    46797345    5  Extended
/dev/hda5            1651        2867     9775521   83  Linux
/dev/hda6            2868        4084     9775521   83  Linux
/dev/hda7            4085        5301     9775521   83  Linux
/dev/hda8            5302        6518     9775521   83  Linux
/dev/hda9            6519        7476     7695103+  83  Linux
---------------------------------------------------------------------

Win2k was installed first into hda1.  Then hda2 and hda3 were created
as a small FC1 linux system (which saw everything OK as LBA).  The
remaining partitions were defined/allocated and initially formated
under that FC1 system.


Comment 6 Gene Czarcinski 2004-02-29 18:43:33 UTC
OK, I have taken the two versions of parted (1.6.3-31 and 1.6.3-33)
and built the packages on both a FC1 (2.4 kernel) and FC1-T1 (2.6 kernel).

On FC1 (2.4 kernel) both versions of parted produce the same results
(nor error messages).  On FC2-T1 (2.6 kernel), they both produce amn
error message about "Unable to align partition properly" for hda.  For
hdb, parted-1.6.3-31 produces the suggested geometry message but
parted-1.6.3-33 does not since it was commented out.

I am coming to the conclusion that this is a kernel problem and not
parted (although parted may be sensitive to something that fdisk is not).

Comment 11 Nick Blievers 2004-03-15 08:07:34 UTC
I am seeing exactly the same thing, however, I cannot boot into my 
WinXP partition since installing Fedora Core 2 test 1!! I can still
mount the partition from Linux, and the first sector looks valid (eg
Jump command, "NTFS    " etc). 

Comment 12 Jaak Simm 2004-03-16 13:44:01 UTC
Same here, the error occurs when installing FC2-test1. The installer 
reports the warning "Unable to align partition properly. This 
probably means that another partitioning tool generated an incorrect 
partition table...".
I have done 6-8 installation on my 80G Maxtor 6Y080 model, none 
successful. The machine does not boot after the installation (bios 
message that it is "missing operating system"). I have installed 
several ways:
- deleted all partitions and started from scratch.
- installed it in side with windows ntfs partition.

After installation the partition table was in a bad state. I used 
Partition Magic to check the situation. In some cases it tried fixing 
some partition values, in other cases, recommended to re-create all 
partitions, due to bad drive geometry.

Comment 13 Alan Cox 2004-03-28 17:18:13 UTC
This seems to be a bug in the FC2 tools. The Linux kernel no longer
does partition guessing (its a heuristic and policy at best), as a
result the  parted tools should be honouring existing partition table
claims when they are present. Failure to do so causes very bad things
to happen.

Previously these situations the kernel itself would report the
partition table or BIOS guess it made, now its firmly in userspace.


Comment 14 Jaak Simm 2004-03-29 17:47:58 UTC
Is this bug fixed (or addressed) in FC2 test2 ?

Comment 15 Gene Czarcinski 2004-03-29 18:31:26 UTC
I do not believe it is fixed.  This is a problem with parted and that
has not changed from what was/is in the development tree as of a
couple of days ago (which should be pretty much what is in Test2).

See the "Unable to align partition" discussion on the fedora-test-list
mailing list from yesterday (Mar 28 2004).

Comment 16 Mike McLean 2004-03-29 20:05:44 UTC
This problem still occurs, but *much* less often than it did.  When I
first filed it, nearly all my testmachines would hit it.  Now only a
couple of those machines ever hit the bug.

Comment 17 Gene Czarcinski 2004-03-29 20:14:23 UTC
I have a system which seems to hit it every time (dual boot with Win2k
installed in first partition on hda).

I will be installing FC2 Test2 on that system later this week.  We
will see.

Comment 18 Pete Bradbury 2004-04-01 13:45:46 UTC
Just de-partitioned my drive and the installation went ahead without 
a problem.

At first tried removing just the linux partition and leaving the vfat.

Only installed when all partitions removed.


Comment 19 Hervé Pagès 2004-04-02 21:47:30 UTC
System: Shuttle SN41G2 - Athlon 2400+
Motherboard: Shuttle FN41 (bios version is FN41S025)
Hard disk: Seagate 120 GB, model ST380021A with 8MB of cache

Depending on the "Access Mode" used, my BIOS detect the
following geometry for the HD:

 o "Access Mode" on "Auto"     o "Access Mode" on "LBA"
     Cylinder = 38309              Cylinder = 9729
     Head = 16                     Head = 255
     Sector = 255                  Sector = 63


1. BEFORE installing FC2test2, I boot in FC1 and I get the following :

   # hdparm -g /dev/hda
    geometry     = 9729/255/63

   # fdisk /dev/hda"
    255 heads, 63 sectors/track, 9729 cyl.

  NB : I get the same result whatever the "Access Mode" is ("Auto"
  or "LBA").


2. DURING install of FC2T2, I get the following warning :

   "Unable to align partition properly. This probably means that
    another partioning tool generated an incorrect partition table,
    because it didn't have the correct BIOS geometry. It is safe to
    ignore, but ignoring may cause (fixable) problems with some
    boot loaders".

  After that DiskDruid displays a strange partition tables containing
  some small free spaces (< 1 cyl. each) beetween my partitions.

  NB : This happens with both "Access Mode" on "Auto" and "Access
  Mode" on "LBA". But this doesn't happen when installing FC1 on
  the same HD, with the same partition table !


3. AFTER installing FC2T2, detected disk geometry is different :

  - If I boot in FC2T2 :
      # hdparm -g /dev/hda
       geometry     = 65535/16/63  (with "Access Mode" on "Auto"
                                    or "LBA")
      # parted /dev/hda print
       Warning: Unable to align partition properly...

  - If I boot in FC1 :
      # hdparm -g /dev/hda
       geometry     = 155061/16/63 (with "Access Mode" on "Auto")
       geometry     = 9729/255/63  (with "Access Mode" on "LBA")
      # parted /dev/hda print
       No warning.

  - With both FC1 and FC2test2, "fdisk /dev/hda" gives :
         16 heads, 63 sectors/track, 155061 cyl.

      And with "fdisk -H 255 /dev/hda", I get :
         255 heads, 63 sectors/track, 9729 cyl.
      But this time, if I print the partition table with "p", I get
      "Partition 1 does not end on cylinder boundary" and the same
      message for partitions 2, 3 and 4.


4. With "Access Mode" set to "Auto", Windows XP (/dev/hda1) doesn't
   boot anymore. (It did boot before installing FC2T2).
   With "Access Mode" set to "LBA", it does boot again.


Comment 20 Alan Cox 2004-04-02 23:52:35 UTC
Still broken in FC2T2 due to parted. fdisk gets it right. Parted needs
to trust the on disk partition data.


Comment 21 Michal Jaegermann 2004-04-17 18:17:36 UTC
This is not a dual boot with Windows  but I have on different
partitions of the same system RH9 and FC2.  Running 'parted'
from RH9 results in the following whine:

Error: The partition table on /dev/hdb is inconsistent.  There are
many reasons
why this might be the case.  However, the most likely reason is that Linux
detected the BIOS geometry for /dev/hdb incorrectly.  GNU Parted
suspects the
real geometry should be 39813/16/63 (not 2498/255/63).....

The one from FC2T2 is less informative:
Warning: Unable to align partition properly.  This probably means that
another
partitioning tool generated an incorrect partition table, because it
didn't havethe correct BIOS geometry.  It is safe to ignore,but
ignoring may cause
(fixable) problems with some boot loaders.
Ignore/Cancel?

Both versions of 'parted' print the same partition table for hda:

Disk geometry for /dev/hda: 0.000-19595.948 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031   1000.125  primary   ext3        boot
2       1000.125  19595.460  extended              
5       1000.156   7000.382  logical   ext3        
6       7000.414   9000.632  logical   linux-swap  
7       9000.664  16425.834  logical   ext3        
8      16425.866  19595.460  logical   ext3   

with 'fdisk' in both cases giving for the same disk:

Disk /dev/hda: 20.5 GB, 20547841536 bytes
16 heads, 63 sectors/track, 39813 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      2032   1024096+  83  Linux
/dev/hda2          2033     39813  19041624    5  Extended
/dev/hda5          2033     14223   6144232+  83  Linux
/dev/hda6         14224     18287   2048224+  82  Linux swap
/dev/hda7         18288     33374   7603375+  83  Linux
/dev/hda8         33374     39813   3245665+  83  Linux

Note this "geometry" which, according to parted from RH9, "should be".

During an installation anaconda, obviously, came up with some
dire warnings about partitioning I created, and which I totally
ignored, and everything was happy after that.


Comment 22 Jason Scott 2004-04-30 14:42:57 UTC
Issue still reproduces (for me) with Fedora Core 2 Test 3.

Existing Install of Windows 2000. Attempting to install Fedora onto
second partition. Installer Warns: 

Unable to Align Partition......(I truncated the error message for this
comment. The message appeared to be the same as the error message above)

Since I had to FDISK my machine to recover from this bug in FC2T2, I
am going to stop trying to test FC2T3. Is this an issue that people
hope to have fixed for FC2 GOLD? Is there some work around for people
that have an existing partition structure?

Comment 23 Jaak Simm 2004-05-02 19:39:56 UTC
Same here, I confirm the error (Unable to Align Partitions) still
occurs for me as well. I tried installing FC2-test3 aside Windows XP
ntfs partition.

Also the bug still destroyes the partition data, since I lost a
partition when trying to install test3. This bug should have high
priority.

Though the installer crashed on me.
For more details see the following bug:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=121798

Comment 24 Martin Gartner 2004-05-03 06:35:05 UTC
Same problem here! "Unable to align..." - also with FCore Test 3.

As a test: I started installation with older FC1 Release and created 
all partitions without problems.
Then restarted installation with FC2 - Test 3 and tried to hang in 
the previously created partitions - but same problem again.

Any fix or workaround for now?

Comment 25 shmuel siegel 2004-05-17 23:23:12 UTC
I guess another data point won't hurt.
I am also dual booting with win2k. Two disk drives Maxtor 40G and
Maxtor 80g. Slightly different results with test2 and test3. In both
cases I installed everything to an existing hda6, even boot. hda5 is
swap. Grub was allowed to write to the MBR on hda. For both tests I
got the cylinder alignment error.
For test2, i allowed anaconda to reformat hda6. something changed on
both disks that made partition magic complain that the lsb and chs (i
think) numbers were inconsistent and it was satified that it could fix
them.
For test3, partition magic complains that there is something
drastically  wrong with hdb and tells me not to touch its structure.
I have not had any disk related problems actually running either linux
or win2k with either release.
output from fdisk -l
 
Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          34      273073+  83  Linux
/dev/hda2              35        1309    10241437+   7  HPFS/NTFS
/dev/hda3   *        1310        2202     7173022+   c  W95 FAT32 (LBA)
/dev/hda4            2203        4982    22330350    f  W95 Ext'd (LBA)
/dev/hda5            2203        2304      819283+  82  Linux swap
/dev/hda6            2305        4089    14337981   83  Linux
/dev/hda7            4090        4982     7172991    b  W95 FAT32
 
Disk /dev/hdb: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1       40641    20482843+   7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/hdb2           40641       81282    20482875   83  Linux
/dev/hdb3           81282       97841     8345767+   7  HPFS/NTFS
/dev/hdb4           97841      158802    30724312+   f  W95 Ext'd (LBA)
/dev/hdb5           97841      158802    30724281    b  W95 FAT32


Comment 26 Radu Cornea 2004-05-19 05:56:36 UTC
I have the same partition problem after installing FC2. I added a
possible fix for it bug 115980 page:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=115980#c33

and more details on the fedora-list-devel:

http://www.redhat.com/archives/fedora-test-list/2004-May/msg02114.html


Comment 27 Radu Cornea 2004-05-19 16:35:26 UTC
Here is a much easier way to fix the partition problem, as suggested
by Alexandre Oliva on fedora-test-list:

sfdisk -d /dev/hda | sfdisk --no-reread -H240 /dev/hda

The 240 value worked for me, in other cases probably 255 is better.
Plus, if this helps finding the bug, the kernel still reports wrong
disk geometry in /proc/ide/hda/geometry, even after fixing the
partition table with the correct values. My machine is a IBM Thinkpad
600e laptop.
If I can do anything to help find the problem, please let me know.


Comment 28 Radu Cornea 2004-05-19 18:41:20 UTC
There is probably a problem with the geometry reported by the kernel.
On two machines I installed FC2, this is what /proc/ide/hda/geometry
reports:

First machine:
physical     16383/16/63
logical      19841/16/63

Second machine:
physical     16383/16/63
logical      16383/255/63

None of these seem sound (either the physical or logical is wrong as
the values do not hold between the two). Can anybody with FC2 confirm
this?

PS: On a FC1 machine with the 2.4 kernel the numbers are fine:
physical     155009/16/63
logical      9726/255/63

Comment 29 Andrew Yeomans 2004-05-24 12:06:42 UTC
One other possible variable - the MBR loader itself. There are several
versions of MBR code out there, which behave differently with respect
to C/H/S and LBA modes. I added to ms-sys
(http://ms-sys.sourceforge.net/) support to write various MBR code in
an easy way for exactly this reason - though I was looking at USB boot
at the time. ms-sys has been included in the System Rescue CD
(http://www.sysresccd.org/). Just try the different MBRs and maybe
change partition type to the LBA versions 0c, 0e, 0f. 

Comment 30 Takanori MATSUURA 2004-05-31 07:58:36 UTC
Now parted-1.6.11 is released. Is this version fixed this bug?

Comment 31 Jeremy Katz 2004-06-25 19:43:40 UTC

*** This bug has been marked as a duplicate of 115980 ***

Comment 32 Red Hat Bugzilla 2006-02-21 19:00:41 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.