I am following the instructions here: https://help.ubuntu.com/community/InstallingANewHardDrive
It says:
4) Create one partition occupying all the space on the drive:
(parted) mkpart primary 0 0
5) Check that the results are correct:
(parted) print
However when I do this I get:
$sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(parted) unit GB
(parted) mkpart primary 0 0
(parted) print
Model: ATA Some SSD (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 0.00GB 0.00GB 0.00GB primary
The Start and End of 0GB and Size of 0GB is making me think this isn't correct. I would have thought the size should have been 240GB (or close to it). Are these instructions correct? If not, what is the correct way to make a single partition that covers the entire disk?
Using 0% for the start causes parted to automatically align the sectors for best performance:
(parted) mkpart primary 0% 100%
Credits to comments in article at https://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/
PS: u could also specify the filesystem type in same command, e.g for xfs:
(parted) mkpart primary xfs 0% 100%
Your mkpart line is wrong. The parameters are: partition-name, start-position and size.
In parted, run
to remove the old, wrong, partition and recreate a new that spans the whole disk.