When creating partitions with parted
, and when printing them back out, I was curious if the value for 'end' is inclusive or exclusive? Asked another way, is the second named in 'end' the last sector of the named partition or the first available sector for the next partition. Annoyingly, I could not find this information in the info
pages.
Asked
Active
Viewed 190 times
1

Huckle
- 1,005
1 Answers
2
They are inclusive. You should end partitions on (n mod 2048) - 1
.
Number Start End Size File system Name Flags
2 2048s 624482303s 624480256s ext2
1 624482304s 625098751s 616448s fat32
(parted) rm 2
(parted) mkpart ext2 2048s 624482304s
Warning: You requested a partition from 2048s to 624482304s (sectors 2048..624482304).
The closest location we can manage is 2048s to 624482303s (sectors 2048..624482303).
Is this still acceptable to you?
Yes/No? yes

Huckle
- 1,005