Format partisi via terminal

1. Check partisi yang hendak diformat atau diberi label.
$sudo fdisk -l

Contoh :

abrao@abrao:~$ sudo fdisk -l
[sudo] password for abrao:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a9590

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 58593279 29295616 83 Linux
/dev/sda2 58595326 976771071 459087873 5 Extended
/dev/sda5 58595328 66406399 3905536 82 Linux swap / Solaris
/dev/sda6 66408448 164063231 48827392 83 Linux
/dev/sda7 164065280 976771071 406352896 83 Linux

2. Pastikan partisi yang hendak diformat sudah umount, jika belum silakan ketikan perintah berikut:

$ sudo umount /dev/sda7

Note: sda7 adalah partisi yang akan diformat.

3. Melakukan format:
a. Format Fat32

$sudo mkfs.vfat -n 'DATA' /dev/sda7

b. Format ext4

$sudo mkfs.ext4 -n 'DATA' /dev/sda7

Note :
DATA adalah nama label partisi

This entry was posted in LINUX. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s