fdisk command operation can be done through script (or) in a command line method. fdisk accepts commands through stdin. Below appropriate command can used with fdisk
- fdisk to clear a partition (if exists) and create a new partition which is entire disk
- fdisk to create a partition of 200MB size