In some unfortunate situations, you may run into an issue where your system will not boot because of a corrupted filesystem. In this case, you have to fix your filesystem so your system boots properly. I will show you how you can corrupt a filesystem, and then I will show you how you can repair it.
An easy way to corrupt a filesystem is by writing random data to it.
The following command will surely corrupt your /dev/sdb1 filesystem:
root@ubuntu-linux:/games# dd if=/dev/urandom of=/dev/sdb1 count=10k
Your /dev/sdb1 filesystem is now corrupted! If you don't believe me, unmount it and then try to mount it back again:
root@ubuntu-linux:~# umount /dev/sdb1
OK, it unmounted successfully! Let's see if it will mount:
root@ubuntu-linux:~# mount /dev/sdb1 /games
mount: /games: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error.
As you can see, it fails to mount as it spits out an error message.
Congrats...