Hi All, Hope everyone wishing to celebrate the 4th had a good time!
[EMAIL PROTECTED] wrote: > On Fri, Jul 01, 2005 at 05:39:56PM -0500, Michael Reed wrote: >>Your fix is an improvement. I tried a length of -11 in creating the >>partition and it worked. I tried -1, again, and it still fails. > Off-by-one error. Fixed. > Please also note that -0 is not valid because sectors start to count from 0. What, no one's compliment math? :) >>If so, how do I create a partition at exactly the start/end that I want? > Use unit 'sector'. Locations get more exact as units get smaller. Comments below apply to the cvs stable branch of 07/06 around 09:30 CDT. With the removal of rounding from dvh code, it works exactly as I'd like to see it work. Volume header is now the size it's supposed to be. I can no longer resize the volume header to a single sector in length. This is good! When doing a mkpart on a freshly labeled disk, I'd sure like to see it suggest a starting location for the partition, i.e., first available valid value for the current unit. I don't know where the partition table ends and the first available sector lies for all the partition types. Some (0,-1) test case failures. The last two could likely be resolved by offering a suggestion for starting sector. (parted) mklabel gpt (parted) print Disk geometry for /dev/sdx: 0s - 71687371s Disk label type: gpt Number Start End Size File system Name Flags (parted) unit B (parted) mkpart Partition type? [primary]? File system type? [ext2]? Start? 0 End? -1 Error: The location -1 is outside of the device /dev/sdx. (parted) unit kB (parted) mkpart Partition type? [primary]? File system type? [ext2]? Start? 0 End? -1 Error: Unable to satisfy all constraints on the partition. (parted) unit s (parted) mkpart Partition type? [primary]? File system type? [ext2]? Start? 0 End? -1 Error: Unable to satisfy all constraints on the partition. Using units GB, mkpart works but wastes quite a bit of space at the end of the disk. Is this really the way you want it to work, leaving almost a GB of unused space at the end of the disk? I'd consider changing the semantics of "-1" to be "last available sector relative to the starting sector regardless of unit in effect". This means that if you're trying to fill a hole in the disk, all you have to do is get the starting location correct and -1 will find the end. Anyway, something to think about. (parted) unit GB (parted) mkpart Partition type? [primary]? File system type? [ext2]? Start? 0 End? -1 (parted) print Disk geometry for /dev/sdx: 0GB - 37GB Disk label type: gpt Number Start End Size File system Name Flags 1 0GB 36GB 36GB (parted) unit s (parted) print Disk geometry for /dev/sdx: 0s - 71687371s Disk label type: gpt Number Start End Size File system Name Flags 1 34s 69734247s 69734214s I'd still like to see resize of a partition with no filesystem. (Patch previously submitted to maintainer(s).) And, existent is still misspelled in various test scripts. (Patch previously submitted to maintainer(s).) In summary, I really like what I see. Thanks for the hard work. Mike _______________________________________________ Bug-parted mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-parted
