[Parted-maintainers] Bug#380226: libparted does not resize NTFS
Frans Pop
elendil at planet.nl
Tue Jan 23 23:42:42 GMT 2007
On Monday 22 January 2007 23:14, David Cantrell wrote:
> Apologies for it taking so long. The GNU parted team has shifted
> around a bit in the past year or so.
That happens :-(
> When resizing a Vista NTFS partition, be sure to start at sector 2048.
> In the parted(8) interactive program, this can be done by specifying
> 1049kB as the starting location.
Sure, but as I explained, we do not use parted, but our own program
partman, which only makes use of _lib_parted.
What we actually do in parted_server is to call the libparted function
ped_disk_set_partition_geom with:
- disk: correct PedDisk
- part: correct PedPartition
- constraint: ped_file_system_get_resize_constraint(fs)
- start: 2048
- end: 29298922 (for example)
> Now, I have made a patch for parted-1.8.2 that will preserve the
> starting sector of 2048 on Vista partitions when you are creating the
> DOS disklabel. That should be added to the parted package in Debian
> for this to work.
Do you mean the patch "parted-print-name.dpatch" that Otavio already
applied in Debian's parted last week? I tested with that patch, but that
actually caused a serious regression.
It no longer changes the starting sector to 63, but also does not fix the
problem (i.e. leaving the starting sector at 2048); instead the starting
sector is now being changed to 16065, which I suspect is the end of the
first cylinder or the start of the second! See [1].
This probably is worse than the old behavior and I've therefore suggested
to Otavio to revert that patch.
From my reading of the relevant code (libparted/labels/dos.c) in libparted
[2], I think that your change is in the right area, but that the current
fix is doing something wrong.
Cheers,
FJP
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380226;msg=210
[2] I'm not a C programmer, but I've seen enough languages to be able to
make some sense of most.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-maintainers/attachments/20070124/f73199fa/attachment.pgp
More information about the Parted-maintainers
mailing list