This is a Q&A that I recently have figured out, so I have posted the answer below.
After installing Windows 10, every time I get a kernel update or I run the update-grub2
it always shows Windows 7
or Windows Recovery Environment
instead of Windows 10
. How do I fix this permanently?
Update: I just performed a clean install of Xubuntu 14.04 and the entries to the file that is listed below were already there. Looks like the GRUB Team has now included the update. I will leave this here for anyone that might stumble across this without the update on their system yet.
Update #2: If you create an Ubuntu 14.04 LiveUSB with at least a 1GB Persistent file on it, this file location is the same and the persistent file will allow the changes that are made to stay. This file should only be modified after booting the system to the USB drive in
Try Ubuntu
boot.The reason why it still shows
Windows 7
orWindows Recovery Environment
instead ofWindows 10
is that the file/usr/lib/os-probes/mounted/20microsoft
does not contain the label forWindows 10
, so during theos-prober
detection of the OS it falls back toWindows 7
orWindows Recovery Environment
.To correct this, you need to make the following changes to the following file (I am going to put gedit as the editor, but use what you want):
NOTE: You should always make a backup of a file before modifying it!
the changes above are changing the line
if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
toelif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
, and addingif grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then
andlong="Windows 10 (loader)"
above that line and saving it.Once saved, then running
os-prober
now looks like this:then running
update-grub2
it will now make the updates to your/boot/grub/grub.cfg
permanent anytime you get a kernel update so it will show the correct version of Windows now (example below):Hope this helps!