I have a dual boot laptop, Ubuntu 10.10 which I use the most of the time, rails and C++, and Windows 7, the one that I live most to develop in .NET. It happened twice with me, and I still don’t know why, sometimes I just turn my computer on and Ubuntu cannot be mounted! Grub seems to be working correctly, so is Windows, although Ubuntu does not work with neither of my kernel versions…
It keeps sending me a message:
Pretty weird, right?
Well, so I found over the internet a simple way to fix it, and since I did it, my computer is working swell, both OS.
So, the first thing you will need is a live Ubuntu bootable, it can be a USB drive or a CD. In my case I always have a live CD with me, in case that this kind of trouble shows up.
First step you got to do is boot you Ubuntu via live CD or USB drive.
When your Ubuntu is running, open you terminal and type:
And then you should get something like:
Well, now you already know which partition cannot be mounted. In my case, it’s the /dev/sda7 one.
You can also use the command below to check the UUID that has not being mounted:
And get something like:
It means I have 2 NTFS partitions, one is where my Windows 7 is installed, the second one I use for saving data, and then 3 partitions where my Ubuntu lives, swap, home and root.
Very important: Here you can see that the UUID matches with the one that gave you the error before.
Now that we know everything we need to fix the problem, here it goes the magic. There’s just one command you need to run to fix the partition and make it bootable again.
PS. If you are the one that like to know everything, you can check the documentation of ‘fsck’ here.
It will ask you a few times to confirm, and that will fix your partition. After that, reboot your computer normally, take the Ubuntu live CD or USB drive out and start your Ubuntu from your HD.
That should fix the problem. Well, that’s it! Pretty simple, huh? Also very important to get you out of this unconfortable situation.