boot your system with LIVE CD or Pendrive open terminal and execute sudo fsck /dev/sda1 (sda1 is generally used, if you have a different drive on which ubuntu is installed then give that) It may prompt you several times asking "y or n", in that case keep pressing Y. after process is over , reboot the system and remove the pendrive