Skip to content

Instantly share code, notes, and snippets.

@rpattabi
Created July 14, 2012 13:21
Show Gist options
  • Save rpattabi/3111268 to your computer and use it in GitHub Desktop.
Save rpattabi/3111268 to your computer and use it in GitHub Desktop.
Ubuntu/Linux - Useful Commands

Formatting considering bad sectors

mke2fs -c -c -t <fs_type e.g. ext4> -L <label e.g. home> <device e.g. /dev/sda1>

-c checks for readability of blocks. identifies bad blocks. mentioning twice checks writing as well. slower.

-c takes about 10 min per 50gb. -c -c takes about 2 hours per 50gb.

swap formatting

mkswap -c -c -L <label e.g. swap> <device e.g. /dev/sda4>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment