PDA

View Full Version : Grub reinstall failed - error: unknown filesystem.



74corvette
July 22nd, 2017, 07:08 PM
Hi I recently installed a second version of Ubuntu long side my main installation of Ubuntu 16.04 for testing purposes. Once I was done with the second install I deleted that partition and tried to reinstall grub. I have tried everything I can find to reinstall grub. But no matter what I do I always get the error:

Reinstall the GRUB of sda5 into the MBR of sda
Installing for i386-pc platform.
grub-install: error: unknown filesystem.
grub-install /dev/sda: exit code of grub-install /dev/sda:1

This is my log from my latest attempt using boot-repair disc/tool.

http://paste.ubuntu.com/25147073/

I can boot into my ubuntu install if I use the supergrub2 boot disc and select the latest Linux kernel. so my install is still good but grub refuses to install.

Any help and ideas would be appreciated.

Thanks

yancek
July 23rd, 2017, 03:05 AM
You have Grub correctly installed to the MBR and the core.img file is present. However there are no boot files shown in the output. Can you mount sda5 from another device (flash drive, DVD) and check to see if you have a boot directory and see if there is a grub directory in it with the proper file as boot repair could not find it. Various method of re-installing Grub are explained at the official Ubuntu documentation site below.

https://help.ubuntu.com/community/Grub2/Installing

74corvette
July 23rd, 2017, 04:05 PM
I have purged and reinstalled grub many times and always get the same message when it is doing the os probing after install "grub-install: error: unknown filesystem"

In my Linux partition sda5 the boot directories are there /boot, /etc/grub.d & /etc/default/grub. All directories but /etc/default/grub have files in them. /etc/default/grub is empty. The date modified on those dates corresponds to to last time I installed grub so grub must be accessing the partition, but it always ends in unknown filesystem.

I will try it once again in case I missing something and let you know. Thanks

oldfred
July 23rd, 2017, 04:46 PM
I do not know why Boot-Repair has all the references to mdadm?
Did you turn on RAID in BIOS?
Was drive every configured for RAID?
Grub desktop usually does not install to RAID drives.

If RAID was turned on try this, never run on a RAID system:
sudo dmraid -E -r /dev/sda

And maybe run fsck on sda5:

To see all the ext4 partitions
sudo parted -l
#From liveDVD/Flash so everything is unmounted,swap off if necessary, change example shown with partition sda5 to your partition(s)
#e2fsck is used to check the ext2/ext3/ext4 family of file systems. -p trys fixes where response not required
sudo e2fsck -C0 -p -f -v /dev/sda5
#if errors: -y auto answers yes for fixes needing response, also see man e2fsck
sudo e2fsck -f -y -v /dev/sda5

74corvette
July 24th, 2017, 02:46 AM
Thanks for the suggestions, my computer is a older laptop with one hard drive and I have never installed a raid array. I tried all of your suggestions but I keep on getting the same result at the end of the install "grub-install: error: unknown filesystem" . I have tried installing grub with boot-repair disc plus going through all the steps manually using the ubuntu live disc both give the same result. Which makes sense as the commands look the same to me.

For some reason I keep getting a unknown filesystem error but when I boot into my ubuntu install with the supergrub disc everything works prefect. Except grub won't install.