Monday, September 7, 2009

Disk Partitioning

To list the current partitions:
# fdisk -l

To list the partitions on a disk:
# fdisk -l /dev/sdb

To create partition on a disk:
# fdisk /dev/sdb
-> type n
-> type 'e' for extended or
'p' for primary partition
-> Enter the first cylinder number
-> Enter the last cylinder or size in KB,MB or GB
-> Enter 'p' to verify the partition table
-> Finally save the partition table by entering 'w'

Command used to inform the kernel of partition table changes:
# partprobe

No comments: