Grub rescue fails with "Boot Repair" with error "unknown file system"

555

Solution 1

This is a possible solution, but it should not be used likely lest your root partition become further corrupted. Running the command: fsck -t ext4 /dev/sda1 This program attempts to search and repair errors on a corrupted filesystem. Replace ext4 with the actual filesystem, you have to know the file system or else the partition will be more corrupted. See this thread for more information.


Even though this question has an answer, there is an alternative way to fix the problem that worked for me. The steps are explained in this painful video: http://www.youtube.com/watch?v=ZcbTgMKpVHQ . In short, it will reinstall Grub2 altogether instead of repairing it.

Because this video is so painful to watch, I'll list the steps below (as I should regardless of how painful it is to watch the video)

  1. Launch a live session of Ubuntu. The video uses a live CD where as I used a live-usb. I made sure that the live-usb has the same version of Ubuntu that I had on my harddrive.
  2. Find where your root partition was mounted. In the video, the user uses nautilus to navigate through each drive that was mounted. It was mounted with a long string of numbers and characters. If this is the case, follow the following steps to remount the partition. Else, procede to step 5.
  3. Bring up the terminal with ctrl+alt+T and use the mount command to find the name of the partition.
  4. Mount the partition. Create a new folder in your media folder. sudo mkdir /media/ubuntu. Then simple mount your partition to that folder. sudo mount /dev/sdxx /media/ubuntu where xx of sdxx is determined in step 3.
  5. Bind the following directories from the root directory of your live cd/usb to that of your root directory on your version of Ubuntu. The directories are the dev proc and sys. Do so with the following commands:

    sudo mount --bind /dev /media/ubuntu/dev
    sudo mount --bind /sys /media/ubuntu/sys
    sudo mount --bind /proc /media/ubuntu/proc
    
  6. Change the root directory to the one on your ubuntu partition. sudo chroot /media/ubuntu/

  7. Having done the above, installing Grub2 again will install it to the root directory of your distribution of ubuntu and not that of the live cd/usb's. So go ahead and run sudo grub-install /dev/sdx

And that's how to fix grub using a live-cd/usb. This method was developed by youtube user crazytechzone.

Solution 2

Your parted -l output clearly says that your boot partition is /dev/sda1. This might not be recognized by some nice GUI application to fix grub.

Simplest solution is to reinstall grub via command line. Follow the commands given on this page, and you should be up and running in no time. Remember using /dev/sda1 wherever the page uses /dev/sdax.

Share:
555

Related videos on Youtube

Jordan Hochstetler
Author by

Jordan Hochstetler

Updated on September 18, 2022

Comments

  • Jordan Hochstetler
    Jordan Hochstetler over 1 year

    Currently with ListView's I've only found that you can create a template for cells, which makes each cell look exactly the same. You can't have multiple custom cells in the listview. There are work-arounds like hiding the content in the cell depending on the content, but this seems pretty hacky.

    The reason I want to use a listview over a tableview is because we plan on doing inserts, deletions, dynamically showing certain cells, and listview's can be binded to a data source.

    • Toni Petrina
      Toni Petrina about 9 years
      What you need is a DataTemplateSelector. You can build one yourself easily, there is a lot of documentation for Windows Phone 8 version which you can use as the base code for your implementation.
  • timer0x01
    timer0x01 about 11 years
    The problem now is that I can't mount /dev/sda1, because of uknown type. Please see UPDATE #1. Thank you!
  • timer0x01
    timer0x01 about 11 years
    In my case in step #2 there is no mounted partitions and mounting the new partition caused error as I explained in Update #1... Thanks, however the issue still exists.
  • Nil
    Nil about 11 years
    curious. Someone else had that problem here. Probably wont work, but did you try specifying file system to be auto? I doubt it will work since it's making you specify the file system but worth a shot.
  • Nil
    Nil about 11 years
    When you launch nautilus from your live session of ubuntu, is your Ubuntu partition accessible?
  • timer0x01
    timer0x01 about 11 years
    I tried all of them including auto as you can see in my log that I had pasted:root@ubuntu:/home/ubuntu# sudo mount -t auto /dev/sda1 /mnt mount: you must specify the filesystem type
  • timer0x01
    timer0x01 about 11 years
    No it is not accesible. My HDD ubuntu is not accesible. This is the BIG problem, because I just want to read the data, to make a backup ... Just to read my crushed ubuntu
  • Nil
    Nil about 11 years
    Sorry, didn't read your edits well, missed the part about using auto and I should have realized that it didn't mount at all by reading the output of mount. I'm stumped
  • Nil
    Nil about 11 years
    I doubt it'll tell you anything that the outputs you listed above did, but if you open gparted, does it list a file system for sda1? For me, my root partition is ext4 but when you specified that it didn't work.
  • timer0x01
    timer0x01 about 11 years
    Yes, when I open gparted I can see that /dev/sda1 is there, BUT the filesystem is UNKNOWN. Also "file -sL /dev/sda1" outputs "/dev/sda1 : data" which means that the filesystem is uknown to live cd according to this: computing.net/answers/linux/mounting-unknown-partition-type/‌​…
  • Nil
    Nil about 11 years
    Here's something I found. I've never used it nor have I read the manual so just take that caveat to heart before proceeding based on this comment. ubuntuforums.org/showthread.php?t=1103061 It says to use fsck to repair a damage filesystem. Says you have to specify the filesystem, if you guess wrong, it will be more corrupted...
  • Nil
    Nil almost 11 years
    o wow, I thought it was a long shot but why not. Google ftw!