Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using ubuntu since tw year and so i am assuming that i am not a total newbie into it. The problem arose yesterday when I used some creepy command to check wether or not it works on my system, resulting in the damage of the file system(as what i thought), and when I restarted the laptop, I got nowhere but directly to the GRUB RESCUE
So what I did is made a live ubuntu 10.10 cd and booted from it and gone to terminal and tried to reinstall GRUB but I could not get past to even mount the root drive(/dev/sda2) is my root device. As it states:

mount: wrong fs, bad option, bad superblock on /dev/sda2, missing codepage or helper      program, or other error
In some cases useful info is found in syslog--try dmesg | tail or so

I used sudo lshw to check whether what file system is mounted, but /dev/sda2 just stated that it is a partition and it does not show any capabilities other than being a linux partitions. It even does not show the ext4 file system of it.
Now when i thought of the idea of checking the disk for the errors, I ran the command

fsck /dev/sda2

and tried to repair the corrupted file system. It took a long time and patience, but I only succeeded in viewing the partition and mounting it. I even could not access any file from it and could not re-install the Grub loader into it.
Please Help!!!
PS- I followed every method described here, for the problem looked quite similar to it, But no success for me.

share|improve this question
What makes you think Grub needs reinstalling? What were the commands that broke the file system? – mikewhatever May 6 '12 at 12:08
obviously grub is corrupted thats why grub2 rescue mode is called at boot. Now that could a reason for my root device (/dev/sda2) is broken(corrupted) and need to be remounted properly.But problem is that it is not mounting. Why? I do not want to loose any data on the root partitions as I have gone too far to make configs and all. – ashutosh May 6 '12 at 12:37
It's pretty clear that the root of the problem is not grub, but that whatever command you ran did something pretty terrible to your filesystem.I don't think anyone can help you beyond saying "reinstall" unless you state what command you ran in the first place that broke everything. – Jordan Uggla May 7 '12 at 6:06

It sounds to me that you installed Ubuntu using the Windows installer called wubi. In that case, you do not have an ext partition, only a Windows one, so the damage is to Windows not Ubuntu. You will need to use Windows methods and rescue software to re-install your MBR to Windows standards. This will not re-install grub, so getting into Ubuntu again may be difficult if not impossible. If you get to that point and get Windows working, maybe wubi can help

share|improve this answer
I have not installed ubuntu threw wubi. I just clean installed ubuntu threw USB ouside the window. I have done fixing mbr and I am operating windows right now. I just need to know why ubuntu is not detecting the root device and mounting it? – ashutosh May 6 '12 at 12:35
So - what do you get when you boot the live DVD and use gparted to view your partitions. Is /dev/sda2 formatted ext4 or what? Please be helpful and give gparted details of all partitions you are seeing. – barrydrake May 6 '12 at 13:45
even gparted failed to say something about the partition details.It just list put partition size and just give options to format and delete it. It only says that the partition is "linux" – ashutosh May 6 '12 at 13:56
Are you saying there is only one partition and it is Linux? That isn't how gparted reports. There is no such report - it might have 'linux-swap', ext4, NTFS or a number of other formats. Linux is not an option! Please come back with details of EVERY partition and if there is more than one drive, every partition on every drive. Information required for each partition: partition (ie /dev/sdxx) and size. If gparted doesn't report these, it must be a faulty version – barrydrake May 6 '12 at 15:31
Oh - it can also report 'unallocated' - it is important to note that as well. – barrydrake May 6 '12 at 15:36

The advanced options of Boot-Repair helped me to restore the correct grub configuration :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.