Format Flashdisk via Terminal Linux
Pada tutorial kali ini kita akan belajar bagaimana cara memformat storage device (harddisk/flashdisk) via terminal Linux. Berikut ini langkah-langkahnya:
Cek Partisi
1 | sudo fdisk -l |
Hasil perintah diatas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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: 0x000cceb6 Device Boot Start End Blocks Id System /dev/sda1 2048 2099199 1048576 82 Linux swap / Solaris /dev/sda2 * 2099200 3147775 524288 83 Linux /dev/sda3 3147776 108003327 52427776 83 Linux /dev/sda4 108005374 488396799 190195713 5 Extended /dev/sda5 108005376 488396799 190195712 83 Linux Disk /dev/sdb: 8010 MB, 8010194944 bytes 255 heads, 63 sectors/track, 973 cylinders, total 15644912 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: 0x4abd0fad Device Boot Start End Blocks Id System /dev/sdb1 * 63 15644911 7822424+ c W95 FAT32 (LBA) |
Umount terlebih dahulu partisi yang ingin diformat. Saya ingin memformat flashdisk yaitu partisi /dev/sdb1
Cek mount point /dev/sdb1
1 | mount /dev/sdb1 |
Hasilnya
1 | mount: according to mtab, /dev/sdb1 is already mounted on /media/B5CC-D670 |
Umount /dev/sdb1, mount point berada di /media/B5CC-D670
1 | sudo umount /media/B5CC-D670 |
Format flashdisk dengan partisi FAT32
1 | sudo mkfs.vfat /dev/sdb1 |
Format flashdisk telah selesai, selanjutnya membaca/mount flashdisk
1 2 | sudo mkdir /media/fd sudo mount /dev/sdb1 /media/fd |
Cek isi flashdisk
1 | ls /media/fd |
Format filesystem yang lain
1 2 | mkfs.cramfs mkfs.ext3 mkfs.ext4dev mkfs.msdos mkfs.vfat mkfs.bfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.ntfs mkfs.xfs |
selamat mencoba 🙂
om,,saya mau install ubuntu lewat flashk, saya buat bootable dr terminal.. semua file yg didalam flashdisk terkunci/protec..saya ngga bisa install
gmn cara atasi nya? apakah saya format dulu fsldk-nya..