#236113 Can not format partitions with bad geometry

#236113#5
Date:
2004-03-04 10:33:13 UTC
From:
To:
My hard disk is Maxtor 6Y120L0.  When I set in the BIOS access mode
"LBA" it has:

Capacity:     122 Gb
Sylinder:     14946
Head:         255
Precomp:      0
Landing Zone: 58852
Sector:       63

In this mode I don't observer any problems with parted.  However if I
set in the BIOS access mode "Auto" (or "CHS") then the disk has:

Capacity:     122 Gb
Sylinder:     58853
Head:         16
Precomp:      0
Landing Zone: 58852
Sector:       255

As far as I know the value of Sector may not be more than 63 so
probably there is a bug in my BIOS and/or hard disk.  In this mode I
can not install DOS on my computer (I haven't tried newer versions of
Windows).  Linux works seamlesly.  The contents of the file
/proc/ide/hda/geometry is the following:

physical     238216/16/63
logical      238216/16/63

You see that Linux has corrected the bug of my BIOS and reports only
63 sectors.

The problem I'd like to report is that parted can not create ext2 file
systems with some of the partition tables created in this sutuation on
my disk.  mkfs exits immediately without any message (the exception
handler is not triggered).  I don't remember, but I think the same
happened when I wanted to create swap space.

Anton Zinoviev

#236113#8
Date:
2004-11-04 23:44:54 UTC
From:
To:
Hello Anton,

Like the subject says, i believe this bug is fixed in later version of
parted/libparted, and was related to the infamous CHS geometry problems with
the 2.6 kernel.

Can you check the current sarge version and tell us if it fixes your problem.

Also, i have the impression that you need first to install DOS/windows, and
then use parted on it, since it will take the CHS information from existing
DOS/windows partitions.

Friendly,

Sven Luther

#236113#13
Date:
2004-11-08 16:48:27 UTC
From:
To:
I will try to retest it.  This is tricky because I can backup only the
partition table but not the 120Gb data on the disk. ;-)
I observed the problem with 2.4 kernel.

When I set in the BIOS "Auto" access method (instead of "LBA") I can not
install DOS/windows - I can install, but then it can not boot.

For me the worst part of this bug is that the exception handler was not
triggered and the user is not informed that the operation has failed.
Anyway I suppose that the recent CHS changes in parted will fix this in
most situations.  The only exception is the following rare situation:

  1. parted works under some broken operating system that reports wrong
disk geometry - 58853/16/255.
  2. the partition table is for the same wrong geometry

Anton Zinoviev

#236113#18
Date:
2004-11-08 16:29:47 UTC
From:
To:
I would say that the right fix would be to use LBA in this case, not ?

As said, the CHS fix was basically to look if there is a DOS/Windows
partition, and then use the geometry this partition believes it is. Not an
elegant solution, but i don't think there is an elegant solution to this
anyway.

Friendly,

Sven Luther

#236113#23
Date:
2004-11-08 17:30:33 UTC
From:
To:
For my case - yes, it is.

Ah, so this is what parted does...

No, without LBA I can not install Windows and this bug does not exist
when the BIOS sets LBA.

Anton Zinoviev

#236113#28
Date:
2004-11-08 16:52:50 UTC
From:
To:
So, the right fix is to set the BIOS to LBA, and document that fact.

Friendly,

Sven Luther