create partitions using parted command line interface

parted /dev/sda
print
(parted) mklabel msdos
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted) unit GB
(parted) mkpart primary ext4 0gb 35gb
(parted) mkpart primary linux-swap 35gb 37gb
(parted) mkpart primary ext4 37gb 250gb
(parted) set 1 boot on
(parted) print
Model: ATA WDC WD2500AAKS-0 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 0.00GB 35.0GB 35.0GB primary boot
2 35.0GB 37.0GB 2.00GB primary
3 37.0GB 250GB 213GB primary

(parted) quit
Information: You may need to update /etc/fstab.

Leave a Reply

Your email address will not be published. Required fields are marked *