Formatting a drive in linux
Open the parted utility and then you will work inside (parted) that.
`sudo parted /dev/sdb`
Now you are in "parted"
Create a partition
- For MBR
`mklabel msdos`
- For GPT
`mklabel gpt`
The basic syntax for partition command
-`mkpart 'partition type' 'file system' start end`
If you want all space of the drive (one partition)
`mkpart primary ext4 1MiB 100%`
If you want more than one partition
`mkpart primary ext4 1MiB 2GB`
If you want to create another partition, use
`mkpart primary ext4 2GB 3GB`
To see the partitions
`print`
? Help?
`isblk`
No Comments