parted command (start and end meaning)
Solution 1
This is to define the size of your partition and where it starts/end. If you want to have only one big partition, give 0% for start and 100% for end. Then for multiple partitions you can play with percents or sectors.
For instance if you want to split your disk in 2 partitions
- 0% 50% for the first one
- 50% 100% for the 2nd
should make the job
Solution 2
From the users manual for GNU parted:
start and end are the offset from the beginning of the disk, that is, the “distance” from the start of the disk.
This is also implied if not outright explained when you print
the current partition table in the parted interface. Check the column heads in the table:
(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1075MB 1074MB primary ext4 boot
2 1075MB 53.7GB 52.6GB primary lvm
The start value indicates where you want the new partition to begin. It can be specified in several ways -- an absolute value for size/space, a percentage of the disk size, etc. -- and is measured from the beginning of the disk.
Related videos on Youtube
printf
Updated on September 18, 2022Comments
-
printf over 1 year
I am using the Linux
parted
command; I was using the 'mkpart' option which allows new partitions to be made, but I was confused when it asked me for the start and end.What does 'start' and 'end' mean when talking about disks?
What's the need and use for a start and end?
-
printf about 5 yearsok i see, so could you give me an example of how i could calculate the start and end for a partition of 2GB?
-
Sam Gwilym over 3 yearswhen i do 0% 50% - i see there is start at
1049kB
and free space bettween 17.4kB and 1049kB. Why it happens? -
walnut_salami over 2 yearsNote "0" and "0%" are not the same thing in parted. 0 and 100% gave me a warning about performance problems with partition size but 0% and 100% worked fine.