Skip to main content
9 events
when toggle format what by license comment
Oct 6, 2020 at 5:29 comment added user313992 "consistency" that's totally inconsistent. cfdisk, sfdisk (and probably all other programs) will not add an extra sector, and the +/-size syntax and the option of using units suggests that it's a size, not an offset wrt. to the end of the first sector. This is clearly a quirk / POLA violation.
Oct 6, 2020 at 5:04 comment added icarus @localuser the prompt is asking for the last sector, not the address of the following sector. The + input format adds that number of sectors to the start sector to give the end sector. So if you specify a start and end of 2048 you get something that is 1 sector long. If you specify a start of 2048 and an end of +0 you get an end of 2048+0 or 2048, and you get something that that is 1 sector long. You can reasonably assert that it would be more convenient if the + format subtracted one sector, but consistency has a lot of merit as well.
Oct 6, 2020 at 4:54 answer added Stephen Kitt timeline score: 2
Oct 6, 2020 at 4:11 comment added user313992 @icarus And a simple test will show you that you're trying to create a partition of +1K (1024 bytes), fdisk will create and report having created a partition of size 1.5 KiB (3 instead of 2 sectors).
Oct 6, 2020 at 4:00 comment added user313992 @icarus Besides being patronizing, you make no sense whatsoever. Go read (just in the fdisk quoted in the OP's question) what the +size means. I guess that the partition appears as one extra sector larger in that GUI because it also counts the extra bootrecord/header which all the logical partitions have in the PC disk format.
Oct 6, 2020 at 3:38 comment added mmttato I know that sectors start at 0 but keep in mind I'm not specifying the last sector, just how big the partition needs to be (30million sectors), and my understanding was that the end sector would have been 30.002.047.
Oct 6, 2020 at 3:04 comment added icarus To expand on what @IporSircer said, if a partition started at 2048 and ended at 2048, would it be 0 or 1 sector long? If it started at 2048 and ended at 2049 (one more) would it be 1 or 2 sectors long?
Oct 6, 2020 at 2:40 review First posts
Oct 6, 2020 at 9:39
Oct 6, 2020 at 2:39 history asked mmttato CC BY-SA 4.0