bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: workaround for BIOS / CHS stuff


From: K . G .
Subject: Re: workaround for BIOS / CHS stuff
Date: Sun, 27 Jun 2004 21:17:15 +0200

> > > I'm uncomfortable with the concept of an inconsistent partition table.
> > 
> > So 
> >     1) you're uncomfortable with the concept of an inconsistent partition
> >        table.
> > 
> >     2) kernel can't get the needed logical CHS in a reliable way to fill
> >        the needed entries in the partition table
> > 
> > still parted rewrites the CHS in the partition table based on info from an
> > unreliable source and being uncomfortable what it means.
> > 
> > Does fdisk do this? No.
> > 
> > Do Microsoft's fixmbr, fixboot, Windows reinstall do this? No.
> 
> OK, here's a reason why I'm uncomfortable:
> 
> (1) Whenever we want to either move the start of a partition, or install
> a bootloader, or create a new windows partition, we need to get the
> CHS geometry right.
> 
> (2) If partition tables are our primary source of information about CHS
> information, then they are the primary data needed to do (1).
> 
> (3) If we systematically create partition tables that are inconsistent,
> then the data is "tainted".  One mistake can snowball.
> 
> So, the passive solution means we wouldn't have a "pure" CHS data source,
> only conflicting evidence.  The passive solution also gives no advice
> for creating new partitions, boot loaders, or resizing the start of
> partitions.
> 
> There is a third option: demand all users use LBA, and get good at
> picking up the absense of LBA.  Is this doable?

But is fixing broken partition tables the primary purpose of Parted ?
I mean, if an HD don't boot because of an incorrect geometry in the
partition table, I don't think this will shock anybody if the HD still
don't boot after resizing or creating a new partition on it. The contrary
might even looks like black magic to unaware people. That would be quite
like maybe "defrag" fixing a registry problem under windows, or a
strange near undetermist think like that. On the contrary if Parted try
to "fix" a good geometry because it thinks there is an error in it, but
there isn't, this would clearly be a bug.

So IMHO it would be a good idea to use the "current" geometry guessed using
the partition table, without even checking its consistency with the maybe
false BIOS geometry (because of the kernels issues). And if the "guessed"
by kernel BIOS geometry has so many problem, I think it would be a quite
good idea to completly stop using it. If you are scared by possible snowball
effect, there should be a tool (or a Parted option) to try to fix broken
maybe even using the possibly wrong guessed by kernel BIOS geometry info,
but anyway trying to do partitioning operations on a broken partition table
is not a thing that an average user will expect to work.

There is a problem when the geometry can't be guessed by reading the
partition table, either because there is inconsistencies in the partition
table itself, or because there is no partition table (or an empty partition
table, or a partition table with a partition that is to small). In the first
case I think parted should not even try to do anything without informing the
user about the current situation before. In the second case Parted could try
advandced detections, but should ask the user anyway. I don't know if it's 
possible right now, but the user should be able to force a geometry to
(imagine that a different PC recognize an unpartitioned HD with a different
geometry than the current PC, and that the user wants to partition the HD on
the current PC but use it on the first one, then letting the user specify the
geomtry would be the only solution). We should also consider that _maybe_
asking the geometry to the user will be the only 100 % safe solution in some
cases.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]