Windows update breaks GRUB on dual boot machines
It’s pretty widely known that major Windows updates may affect dual boot machines. This is what I’ve run into with my dual boot machine – Windows decided to install a major update and in doing that broke GRUB that managed my boot options.
Few google searches later I’ve run across many ways of addressing the GRUB issue, which seem to be stemming from various failures.
What I was greeted with was GRUB command line with the following message:
error: file ‘/grub/i386-pc/normal.mod’ not found
and the prompt:
grub rescue>
In short, the following is the sequence of steps I needed to take:
- First, run this command to see the list of disks and partitions:
ls
- You’ll get a list of devices and partitions in the form of: (hd0), (hd0,msdos1),etc.
- Most likely your GRUB root partition is on (hd0)
- You need to figure out which partition that is.
- Run the following command:
ls (hd0,msdos0)
- If you get “error: unknown filesystem”, then move onto the next partition –
ls (hd0,msdos1)
- If you get “Filesystem is ext2” then you found one of Linux partitions – you may have more than one on a single drive, obviously. Most likely your root partition is the one with the smallest index.
- Run the following command:
- Run the following commands to run GRUB (assuming your root partition is msdos1):
set boot=(hd0,msdos1) set prefix=(hd0,msdos1)/boot/grub insmod normal normal
- At this point you should see your GRUB screen, which allows you to pick the OS to boot.
However, this is not all. Following these steps you won’t “fix” the issue – you’ll just manually run GRUB. To permanently fix the issue and make sure you don’t have to follow these steps on every single boot. Assuming your root partition is on /dev/sda, run the following (note that it’s all about the device, not a partition on it):
sudo grub-install /dev/sda sudo update-grub
So, at this point your system should be back to normal.
One more comment – if you run into this while upgrading Windows to the next major version, it doesn’t make sense to finalize the fix until Windows is done with its reboots (it does it few times during the upgrade), as it may damage GRUB again.
Adding NEF preview to Linux Mint file manager Nemo
If you want to be able to preview NEF (Nikon raw) images in Linux Mint’s file manager Nemo, you need to do the following:
- Open Preferences window for Nemo file manager from Edit -> Preferences menu
- Switch to Preview tab within the Preferences window
- Set “Show Thumbnails” to Always if you want to show thumbnails on remote drives
- Set “Only for files smaller than” to 100 MB
- Install the following packages from Software Manager UI:
- gnome-raw-thumbnailer
- libopenraw1
- libopenrawgnome1
Note: Browsing remote/network directories will be sloooooooow if you enable thumbnails for remote drives.
Reconnecting a bluetooth mouse in Linux Mint upon reboot
I use a bluetooth mouse with my laptop (never could understand manufacturers pushing their proprietary USB wireless peripherals – why take up a USB port when all laptops have bluetooth built-in). When I installed Linux Mint (version 17.3) it has connected to my mouse just fine and I was able to use it with no issues. However the OS would never reconnect with the mouse upon reboot which is a hassle – you have to remove/add the device every time. Clearly not the way to go.
This is what I’ve done to get the OS remember the mouse and it’s settings.
- Put your mouse in a discoverable state (there is usually a button on the mouse somewhere for this)
- Open terminal and run the following command that should give you a MAC address for your mouse:
hcitool scan - Once you’ve obtained your mouse MAC address (should look like XX:XX:XX:XX:XX:XX), run the following in terminal:
bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX
bluez-test-device trusted XX:XX:XX:XX:XX:XX yes
bluez-test-input connect XX:XX:XX:XX:XX:XX
Now you should be good to go.