Windows update causes grub error

When using a dual boot system with a Linux distribution and Windows, there is the possibility that a new Windows update messes with the partitioning table and grub has a hard time bringing up the systems. As a result the message “error: unknown filesystem. Entering rescue mode...” is shown. A recent Windows 10 update for example introduced a new hidden partition and changed the table accordingly. The Problem is that the grub loader which was previously set to boot from (hd0,msdos1) has not been told to change that.
1 answer

Windows update causes grub error

Luckily the error message is shown within a terminal window which gives you the possibility to type in some commands. First of all have a look at the available partitions typing “ls”. Use the provided labels to look for the desired partition. Keep typing in the command “ls partition/grub2” (e.g. ls (hd0,msdos2)/grub2, ls (hd0,msdos3)/grub2), ...) until you don’t get the message “error: unknown filesystem.” any more. Let's assume that you have found the partition (hd0,msdos2). Type in the following commands:
set root=(hd0,msdos2)
set prefix=(hd0,msdos2)/grub2
insmod normal
normal

After that the system should reboot normally. To tell grub that it should remember this setup and avoid the unpleasant situation that you have to type in these lines every time, execute the next commands within your linux shell where /dev/sda is the drive where grub shall be installed.
sudo update-grub
sudo grub-install /dev/sda