Ubuntu: Grub rescue fails with “Boot Repair” with error “unknown file system” [duplicate]



Question:

This question already has an answer here:

THE PROBLEM WAS IN FILESYSTEM, THIS IS NOT DUBLICATE TO GRUB RESCUE STANDARD TOPICS.

After laptop system crush (which was caused by hard restart), my ubuntu linux is not booting, it is showing now:

error: uknown filesystem grub rescue>

Solutions that I tried:

  • 1st solution: I've read a lot about similar problems and I've tried to work with grub rescue from console:

    grub rescue>ls (hd0) (hd0,msdos5) (hd0) (hd0,msdos1) grub rescue>ls (hd0,msdos5) error: uknown filesystem grub rescue>ls (hd0,msdos1) error: uknown filesystem

So, I can't list/find my linux filesystem ,,,

  • 2nd solution) After all, I decide to try Boot Repair, I've installed it on UBUNTU live USB, but there is no "Recommended repair" button and there is no "Advanced options". There is only one button which is "Create a BootInfo summary" - I've created one, the link is http://paste.ubuntu.com/5609223/. I tried BootRepair on latest UBUNTU and on Linux Secure Remix, they both are LIVE editions baked on USB - the same result, Boot Repair not working. Also OS-Uninstaller on Linux Secure Remix states that there is not found/installed OS.

This is the log from Boot Repair: http://paste.ubuntu.com/5609223/

I tried the same Linux Secure Remix on a different PC and at least there is button "Recommended repair". So I think the problem is in my HDD or MBR .. I don't know..

I am out of options... Please, HELP!

UPDATE 1:

Thank you guys for the reply:

I tried the solutions, they are pretty much the same but I cannot mount /dev/sda1. I do some research, but it seems that it is some kind of damage.

Here what I done:

  1. fdisk
  root@ubuntu:/home/ubuntu# sudo fdisk -l    Disk /dev/sda: 160.0 GB, 160041885696 bytes  255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes  Disk identifier: 0xebd671ce       Device Boot      Start         End      Blocks   Id  System  /dev/sda1   *        2048   302815231   151406592   83  Linux  /dev/sda2       302817278   312580095     4881409    5  Extended  /dev/sda5       302817280   312580095     4881408   82  Linux swap / Solaris    Disk /dev/sdb: 8021 MB, 8021606400 bytes  110 heads, 46 sectors/track, 3096 cylinders, total 15667200 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 512 bytes  I/O size (minimum/optimal): 512 bytes / 512 bytes  Disk identifier: 0x04030201       Device Boot      Start         End      Blocks   Id  System  /dev/sdb1   *       10392    15667199     7828404    b  W95 FAT32  
  1. mount
  root@ubuntu:/home/ubuntu# sudo mount /dev/sda1 /mnt  mount: you must specify the filesystem type  
  1. blkid
  root@ubuntu:/home/ubuntu# blkid  /dev/loop0: TYPE="squashfs"   /dev/sda5: UUID="ce99d1c7-16fd-4b60-b0af-af6a14b8bdbe" TYPE="swap"   /dev/sdb1: LABEL="DANAIL" UUID="4ED6-708D" TYPE="vfat"   
  1. So I tried different types: ext3, ext4, vfat and auto, but the result is same for all of types:
  root@ubuntu:/home/ubuntu# sudo mount -t ext4 /dev/sda1 /mnt  mount: wrong fs type, bad option, bad superblock on /dev/sda1,         missing codepage or helper program, or other error         In some cases useful info is found in syslog - try         dmesg | tail  or so    root@ubuntu:/home/ubuntu# sudo mount -t auto /dev/sda1 /mnt  mount: you must specify the filesystem type  root@ubuntu:/home/ubuntu# sudo mount -t ext2 /dev/sda1 /mnt  mount: wrong fs type, bad option, bad superblock on /dev/sda1,         missing codepage or helper program, or other error         In some cases useful info is found in syslog - try         dmesg | tail  or so    root@ubuntu:/home/ubuntu# sudo mount -t vfat /dev/sda1 /mnt  mount: wrong fs type, bad option, bad superblock on /dev/sda1,         missing codepage or helper program, or other error         In some cases useful info is found in syslog - try         dmesg | tail  or so    root@ubuntu:/home/ubuntu#   
  1. dmesg
  root@ubuntu:/home/ubuntu# dmesg | tail  [ 2424.052221] SQUASHFS error: Can't find a SQUASHFS superblock on sda1  [ 2620.531816] EXT4-fs (sda1): VFS: Can't find ext4 filesystem  [ 2626.204025] EXT3-fs (sda1): error: can't find ext3 filesystem on dev sda1.  [ 2626.208650] EXT4-fs (sda1): VFS: Can't find ext4 filesystem  [ 2626.208938] FAT-fs (sda1): bogus number of reserved sectors  [ 2626.208943] FAT-fs (sda1): Can't find a valid FAT filesystem  [ 2626.209377] SQUASHFS error: Can't find a SQUASHFS superblock on sda1  [ 2635.692959] EXT2-fs (sda1): error: can't find an ext2 filesystem on dev sda1.  [ 2644.614887] FAT-fs (sda1): bogus number of reserved sectors  [ 2644.614894] FAT-fs (sda1): Can't find a valid FAT filesystem  
  1. mount
  root@ubuntu:/home/ubuntu# mount  /cow on / type overlayfs (rw)  proc on /proc type proc (rw,noexec,nosuid,nodev)  sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)  udev on /dev type devtmpfs (rw,mode=0755)  devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)  tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)  /dev/sdb1 on /cdrom type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)  /dev/loop0 on /rofs type squashfs (ro,noatime)  none on /sys/fs/fuse/connections type fusectl (rw)  none on /sys/kernel/debug type debugfs (rw)  none on /sys/kernel/security type securityfs (rw)  tmpfs on /tmp type tmpfs (rw,nosuid,nodev)  none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)  none on /run/shm type tmpfs (rw,nosuid,nodev)  none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)  gvfsd-fuse on /run/user/ubuntu/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=ubuntu)  

Thank for your help.. Can't solve this for now..

UPDATE 2:

The solution is to run fsck on the broken /dev/sda1 system. The problem is in the filesystem, not in grub. That's why grub can't see the filesystem with LS. Thank you!


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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »