Format
Format USB flashdisk / USB harddisk / harddisk dapat menggunakan
mkfs
Catatan penggunaan:
Usage: mkfs [options] [-t type fs-options] device [size] Options: -t, --type=TYPE file system type, when undefined ext2 is used fs-options parameters to real file system builder device path to a device size number of blocks on the device -V, --verbose explain what is done defining -V more than once will cause a dry-run -V, --version output version information and exit -V as version must be only option -h, --help display this help and exit
For more information see mkfs(8).
atau
Usage: mkfs.ext3 [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options] [-G flex-group-size] [-N number-of-inodes] [-m reserved-blocks-percentage] [-o creator-os] [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory] [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]] [-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]
Yang sederhana, misalnya.
mkfs.ext3 -J size=10000 -L repo /dev/sdb1
Cek Bad Blocks
WARNING: Proses ini akan memakan waktu lama sekali. Mungkin semalam-an
Memformat sambil cek bed blocks
mkfs -L data -c /dev/sdb1
Menggunakan badblocks
WARNING: Proses ini akan memakan waktu lama sekali. Mungkin semalam-an
Sebelum mkfs kita dapat menjalankan badblocks
badblocks -wsv /dev/<drive>
[...] done Pass completed, 527405 bad blocks found. (0/0/527405 errors)
Atau output di simpan ke sebuah file
badblocks -wsv -o /root/<badblocks.txt> /dev/<device>
Checking for bad blocks in read-write mode From block 0 to 488386583 Testing with pattern 0xaa: done Reading and comparing: 6.36% done, 0:51 elapsed. (0/0/14713 errors) [...] Testing with pattern 0x00: done Reading and comparing: done Pass completed, 527405 bad blocks found. (0/0/527405 errors)
file tersebut digunakan saat format
# mkfs.<filesystem-type> -l /root/<badblocks.txt> /dev/<device>
Catatan: Note: 0/0/527405 errors adalah <number of read errors>/<number of write errors>/<number of corruption errors>.