[Parted-maintainers] Bug#380226: NTFS (partition) not recreated
correctly after resize: incorrect start sector
kurt at roeckx.be
Fri Dec 15 15:38:42 UTC 2006
I've been looking at this, and I'm not sure what the right thing to do
is at this time.
libparted/label/dos.c:_primary_start_constraint() has this comment:
/* This constraint is for partitions starting on the first cylinder. They
* must start on the 2nd head of the 1st cylinder.
So it needs to start at the second track, and would mean in most cases
be on sector 63 (63 sectors/track).
libparted/label/dos.c:_primary_constraint() even requires you to start
and stop on a cyclinder boundery, which would be normally be 63 sectors
* 255 heads, so 16065 sectors.
However, vista seems to create the first one at sector 2048, which is in
even in the middle of a track. I can't see a good reason why they did
this, other than trying to break things and waste more space.
I was first thinking that it should take the filesystem constraints into
account, and set it to 2048 if it's vista, but that's probably going to
fail since the contraints wouldn't match. It might also break other
things I'm currently not aware of.
So I currently have no good idea how to try and solve this.
More information about the Parted-maintainers