Grub error grub_file_filters after update to LM20

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
spontex
Level 1
Level 1
Posts: 22
Joined: Sat Jun 23, 2012 12:46 pm

Grub error grub_file_filters after update to LM20

Post by spontex »

Hi,
I had a dual boot LM19.3 + Windows 10.
I upgraded using https://blog.linuxmint.com/?p=3946
After the first reboot I got the error:

Code: Select all

error: symbol 'grub_file_filters' not found. 
Entering rescue mode... 
grub rescue>
I used a bootable USB key with boot-repair, after reading this.
Using the default repair, it restored the boot to Windows 10.
But I cannot boot Linux anymore.
The advanced options only show the MBR options; the GRUB tabs are disabled. Even pointing the MBR to Linux boots to Windows.

Before reinstalling completely LM20, is there any way to repair my Grub installation?
Here is the log from boot-repair: https://paste.ubuntu.com/p/RHNYRPb7w8/

Thanks
User avatar
Kadaitcha Man
Level 16
Level 16
Posts: 6106
Joined: Mon Aug 27, 2012 10:17 pm

Re: Grub error grub_file_filters after update to LM20

Post by Kadaitcha Man »

spontex wrote:
Fri Jul 10, 2020 7:42 am
I used a bootable USB key with boot-repair, after reading this.
It's always wise to read the whole thread before proceeding with the very first suggestion you come across.
I couldn't get boot-repair (or boot-repair-disk) working, but managed to fix this by booting from a live Ubuntu 19.10 USB, mounting the old disk, entering chroot, and running grub-install and update-grub.

There is a launchpad bug here, which recommends the chroot fix as described here.
[*] All kadaitcha men are liars
spontex
Level 1
Level 1
Posts: 22
Joined: Sat Jun 23, 2012 12:46 pm

Re: Grub error grub_file_filters after update to LM20

Post by spontex »

Hi,
I saw that, but it seemed quite complicated, so before trying that, I wanted to know if a simpler solution exists. Also, I do not have a LM20 Live CD yet, since I used the upgrade instructions. Do I have to download the LM20 ISO? Or can I use the boot-repair Live USB key I already have?
Thanks
Regards
User avatar
Kadaitcha Man
Level 16
Level 16
Posts: 6106
Joined: Mon Aug 27, 2012 10:17 pm

Re: Grub error grub_file_filters after update to LM20

Post by Kadaitcha Man »

spontex wrote:
Fri Jul 10, 2020 7:53 am
Or can I use the boot-repair Live USB key I already have?
I don't see how you could use a boot-repair media to install LM20. Download LM20 and create a new live media, perhaps, yes, but that will depend on the tools you've got on the live media or it will depend on being able to install them first.

The best course of action is to take the advice in the upgrade instructions. Restore from your Timeshift snapshot.

After that, I would recommend waiting a week before jumping into an upgrade. A clean install should always be preferred so there's that.
[*] All kadaitcha men are liars
spontex
Level 1
Level 1
Posts: 22
Joined: Sat Jun 23, 2012 12:46 pm

Re: Grub error grub_file_filters after update to LM20

Post by spontex »

Hello,
If you read again the whole thread (as you adviced!), I had initially no boot. I used a bootable USB key with boot-repair, after reading this. Using the default repair, it restored the boot to Windows 10.

My question is: can I use the same USB key again (with the boot-repair ISO) and its integrated terminal to perform the chroot fix?
If this does not work I will try this fix with a LM20 USB key, or perform a clean install...
Thanks
User avatar
Kadaitcha Man
Level 16
Level 16
Posts: 6106
Joined: Mon Aug 27, 2012 10:17 pm

Re: Grub error grub_file_filters after update to LM20

Post by Kadaitcha Man »

spontex wrote:
Fri Jul 10, 2020 8:17 am
Hello,
If you read again the whole thread (as you adviced!)
Tut! Tut! Tut!

Normally I would just wish you good luck and leave you to it. You might want to buy a lottery ticket.
My question is: can I use the same USB key again (with the boot-repair ISO) and its integrated terminal to perform the chroot fix?
If it has a terminal and you can chroot from it, yes. However you don't need to follow those long, scary instructions. Do you know if you are running your OS in UEFI or BIOS mode? If not, drop to the terminal with your rescue media and post the output of lsblk. Failing that, post the output of ls /sys/firmware/efi. Enclose the output in code tags. You'll see the code tags icon </> when you reply.

Based on what you can tell me, I will give you simpler instructions.
[*] All kadaitcha men are liars
User avatar
Kadaitcha Man
Level 16
Level 16
Posts: 6106
Joined: Mon Aug 27, 2012 10:17 pm

Re: Grub error grub_file_filters after update to LM20

Post by Kadaitcha Man »

spontex wrote:
Fri Jul 10, 2020 8:17 am
If this does not work I will try this fix with a LM20 USB key, or perform a clean install...
Oddly enough, I have to go. It's very late where I am.

If you are certain that you are booting in BIOS mode, replace sdXN with the drive designation and partition number that you want to install grub to (N would usually be 1 in BIOS mode but you must verify that), and replace sdX with just the drive designation, no partition number:

Code: Select all

sudo mount /dev/sdXN /mnt
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdX
update-grub
exit
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt
If you are certain that you are booting in UEFI mode, replace sdXN with the drive designation and partition number that you want to install grub to (N may be 1 or 2 or some other number), replace /dev/sdXP (same as for N but it will be a different number) to N with the EFI drive and partition number, and replace sdX with just the drive designation, no partition number:

Code: Select all

sudo mount /dev/sdXN /mnt
sudo mount /dev/sdXP /mnt/boot/efi
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdX
update-grub
exit
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
sudo umount /mnt/boot/efi
sudo umount /mnt 
[*] All kadaitcha men are liars
spontex
Level 1
Level 1
Posts: 22
Joined: Sat Jun 23, 2012 12:46 pm

Re: Grub error grub_file_filters after update to LM20

Post by spontex »

Hello,
Thank you for your help :-)
This is quite an old system, and I am in BIOS mode.
With lsblk I could see that my SSD is on /dev/sdc (sdc1 for Linux and sdc2 for Windows).
So I typed: sudo mount /dev/sdc1 /mnt
And I got this error messsage:

Code: Select all

mount: /mnt: can't read superblock on /dev/sdc1
I think I am going to install LM20 from scratch, this may be cleaner, don't you think.
Regards
MaximS
Level 1
Level 1
Posts: 5
Joined: Sat Jul 11, 2020 4:50 am

Re: Grub error grub_file_filters after update to LM20

Post by MaximS »

Same here.

Dual boot system with Win7 on different drive.
"mintupgrade" from 19.3
Solved using boot-repair tool from the USB key.

Actually it's very inconvenient. Why an upgrade should break grub? If it's not so rare situation, may be mintupgrade should take care?
spontex
Level 1
Level 1
Posts: 22
Joined: Sat Jun 23, 2012 12:46 pm

Re: Grub error grub_file_filters after update to LM20

Post by spontex »

Solved by doing a fresh install, it was faster than trying to fix it (my /home is on a separate partition and I only have my fstab to restore).
Post Reply