fsck why/when is it run?

  • usually on boot, particularly if you’ve crashed the server
  • runs on boot after a number of remounts set in the superblock
  • how do you set/change this number? mkfs, tunefs
  • can be manually run
  • how do you skip it on bootup?
    • flag file e.g. .fastboot or .autofsck
    • what can break?
  • how do you fsck when your root partition is dead?
    • boot from non-local medium e.g. PXE or CD
  • how do you recover from a bad superblock?
    • use alternate superblock
    • how do you find that?
      • mkfs -n (or equivalent “no-write” flag)