Grub messes up Windows 7 boot screen, but boots okay

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
littlenoodles
Level 1
Level 1
Posts: 36
Joined: Sun Jan 20, 2013 8:08 pm

Grub messes up Windows 7 boot screen, but boots okay

Post by littlenoodles » Wed Jul 23, 2014 3:12 pm

I just installed Mint 17 KDE on a Dell Lattitude E5440 laptop (Intel core i5 + Intel HD graphics). The machine was issued by my company and was imaged with MBR partitioning and legacy boot, so I booted Mint from USB in legacy mode, and it installed grub in the MBR. Grub works, but when I boot into Windows 7 from it, the graphics mode is messed up, and I either get a black screen or a completely garbled (and 'frozen') one when the Windows 7 startup animation is supposed to be displayed. At first I thought I had corrupted Windows, but if I wait long enough, the screen switches modes and the boot finishes. I guess Windows normally switches modes from its splash animation when it brings up the real GDI. Anyway, from that point on, it seems okay. Anybody know if this a known issue with grub?

On my desktop system at home, I don't get the Windows boot animation at all - but I figured that was because I have my monitor plugged into the 2nd DVI port (the only one my short DVI cable will reach). But now that I'm seeing this problem at work, I'm wondering if grub leaves the video system in a state that's incompatible with whatever Windows needs to run its splash animation...

Graphics work fine in Mint during its boot animation and normal operation.

Any work-arounds?

User avatar
Derek_S
Level 6
Level 6
Posts: 1272
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by Derek_S » Wed Jul 23, 2014 6:10 pm

Hello littlenoodles - It could be due to grub using a screen resolution that is not used by Windows. You could try this, but I cannot give you any guarantee that it will work. Every system is different. Right click on the desktop in Windows, select "Screen Resolution", then make a list of all the resolutions that are available in Windows. Close this, then reboot into Linux Mint. Open the terminal, and enter "sudo gedit /etc/default/grub". Find the section:

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

Remove the # symbol from the last line, then edit the resolution and enter one that's on your list from Windows. Start with the lowest resolution. After doing this, go up and hit "File", then "Save". After doing this, hit "File" again, then "Quit". Then in the terminal, enter "sudo update-grub". After doing this, close the terminal and reboot into Windows. See if it solves the problem. If not, try a different resolution from the list. If you can't get any of them to work, go back into /etc/default/grub and put the # symbol at the beginning of the line, enter the default 640x480 as the resolution, Save then Quit, and run "sudo update-grub". This puts grub back to it's original condition.

Edit: If you do some creative Googling, you might find the screen resolution used by Windows on the splash screen.
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh

littlenoodles
Level 1
Level 1
Posts: 36
Joined: Sun Jan 20, 2013 8:08 pm

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by littlenoodles » Wed Jul 23, 2014 7:27 pm

Interesting. It looks like the grub menu is running at the native 1366x768 maximum resolution, and you're probably right that the Dell boot screen and Windows splash screen probably operate at a lower res. /etc/default/grub doesn't have the code you listed though. I guess I could add it, but I'm wondering whether grub actually looks at this file at boot time - isn't grub limited to stuff in /boot/grub? Or does this info just get read by the grub installer. In other words, do I need to reinstall grub after making changes to /etc/default/grub, or will they just take?

By the way, there doesn't seem to be a grub tool in Mint by default. There is a kde-grub thing that I loaded and used to change the boot default and timeout. The Appearance tab on there has a Resolutions section with entries for GRUB (set at 640x480) and Linux Kernel (set at Unspecified). It sure doesn't look like I'm running the grub menu in 640x480 mode - the text is tiny.

Well, anyway, I went ahead and changed the GRUB resolution to 800x600 in this tool, and yay!!!, it worked. The grub menu text is bigger now, and the Windows splash screen works. Thanks for the tip.

littlenoodles
Level 1
Level 1
Posts: 36
Joined: Sun Jan 20, 2013 8:08 pm

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by littlenoodles » Wed Jul 23, 2014 7:33 pm

One more thing. After having made the change, /etc/default/grub now does have a resolution entry.
Okay, two more things. It seemed to work at 800x600, but the second time I tried it, it didn't work - though the screen wasn't completely garbled this time. I could still read "Starting Windows" on part of it. I guess I'll try forcing 640x480 next. Anyway, nice to know it has something to do with screen resolution, and doesn't really seem to affect anything but the Windows splash screen...

littlenoodles
Level 1
Level 1
Posts: 36
Joined: Sun Jan 20, 2013 8:08 pm

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by littlenoodles » Wed Jul 23, 2014 7:41 pm

Well, 640x480 worked the first time too. But then it failed the same way 800x600 did the second time. It looks like a timing thing - like maybe grub does something to the video settings before handing off control to the Windows boot loader, and that hasn't finished before the WBL throws up its splash screen. Who knows. I saw some kind of menu delay option in the grub tool - maybe that inserts some delay before launching the selected item... Ever heard of this?

User avatar
Derek_S
Level 6
Level 6
Posts: 1272
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by Derek_S » Wed Jul 23, 2014 8:25 pm

Hello littlenoodles - Two things I want to be clear on:

1.) After you edit /etc/default/grub, please be sure to "save" before you "quit", otherwise your changes to the file aren't saved.

2.) After doing the above, you must enter "sudo update-grub" in the terminal. This takes the changes from /etc/default/grub and applies them to /boot/grub/grub.cfg .
Note: You should never edit /boot/grub/grub.cfg directly. The very first line contains "DO NOT EDIT THIS FILE". If you make an error, it could be fatal, you might never be able to boot the system again!

I find it interesting that you cannot find that particular section in etc/default/grub. After all, it's the default.

Like I stated in the beginning, this is something to try, I cannot guarantee it will work. I can only say it might work. It could be that a screen resolution you have not tried yet is the one that works. It's also possible that it's more of a problem related to Windows and has nothing to do with grub.
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh

littlenoodles
Level 1
Level 1
Posts: 36
Joined: Sun Jan 20, 2013 8:08 pm

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by littlenoodles » Thu Jul 24, 2014 10:20 am

Interestingly, my desktop machine at home has the default 640x480 entry, commented out like you noted. My home machine is set up for EFI booting vs MBR booting on the work laptop. I guess the two versions of grub get configured differently. Anyway, now that I know this is just a video mode problem, I guess I don't care that much about not seeing the Windows animation. I'm pretty satisfied that I haven't corrupted Windows. Thanks for your help.

MessedUp
Level 1
Level 1
Posts: 3
Joined: Tue Jul 28, 2015 7:55 am

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by MessedUp » Tue Jul 28, 2015 8:01 am

Hi there,
a beginner with Linux I just did as yourself but used 17.2 alongside Windows 7.I have a new HP i5 laptop with lots of RAM. Same problem with the boot screen for windows 7. OS works fine as before. Just irritating!!


Did anyone found a solution?

PS I used downloaded and used the "grub customizer" to set windows 7 as number one in the boot options list as I am allergic to messing with cfg files directly.

User avatar
Derek_S
Level 6
Level 6
Posts: 1272
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by Derek_S » Wed Jul 29, 2015 11:35 pm

Hello MessedUp - I was a little surprised to see this thread resurrected after a year. I guess it shows that while most machines have no issues with this, it's still a problem for some. Here's what I suggest trying:

Boot your machine, and when you get to the grub boot menu, press "c" to open a grub command prompt. Then enter "vbeinfo", and you will find a list of all the screen resolutions used by the Vesa Bios Extension video driver. This driver is only used during boot, after that the installed system's video driver takes over. I suggest you create a list of all the available VBE resolutions for later reference. Also note at the very bottom, there is "Preferred Mode=", which should show your display's "native" screen resolution - which is the maximum resolution available. Take note of this also. Then exit the grub prompt by entering "reboot".

Now boot into Windows 7, right click an open portion of the Desktop, and select "Screen Resolution". Then click the tab marked "Resolution" and take note of all the available screen resolutions in Windows. Then compare the two lists and see which resolutions are common to both the VBE video driver list and to Windows. Also note if the maximum screen resolution used in Windows(Recommended) matches the "Preferred Mode=" resolution used by VBE. You might find there's a mis-match here and that could be the cause of your problems.

Now boot into Linux Mint and open the Terminal. Enter "sudo gedit /etc/default/grub", then find the line #GRUB_GFXMODE="640x480". Remove the comment symbol(#) from the beginning of the line, and if the two resolutions I've described above match (Windows Recommended & Preferred Mode), then enter that resolution to replace 640x480. However, if you find that these two resolutions do not match, then try entering the highest resolution that is common to both the VBE video driver list and one of the higher screen resolutions available in Windows.

After making the changes to this file, go up and click "File" and "Save" to save your changes. Then click "File" and "Quit" to close the file. This will bring you back to the open Terminal. Now enter "sudo update-grub" to generate a new /boot/grub/grub.cfg file. After that, you can close the Terminal and reboot. See if the problem persists or if the garbled mess you're used to seeing is gone. Be aware that I make no guarantees here - finding a resolution that works may take several tries by substituting different resolutions in /etc/default/grub. Just remember to run "sudo update-grub" after each time you edit /etc/default/grub and try a different resolution.
"When you rise in the morning, give thanks for the light, for your life, for your strength. Give thanks for your food and for the joy of living. If you see no reason to give thanks, the fault lies in yourself." - Tecumseh

MessedUp
Level 1
Level 1
Posts: 3
Joined: Tue Jul 28, 2015 7:55 am

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by MessedUp » Mon Oct 05, 2015 10:16 am

Hi Derek,
thanks for your msg. I finally tried this out (and set the resolution in the file to 1366x768 but to no avail. I have multiple boot win 10 and mint 17.2.
When I select win 10 the first few seconds the screen is still messed up. Maybe it is a problem that has to be resolved in a similar boot loader file in windows 10?

Kind regards,
M

User avatar
Garvan
Level 4
Level 4
Posts: 295
Joined: Sun May 29, 2011 3:26 am
Location: Thailand
Contact:

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by Garvan » Wed Oct 07, 2015 7:03 am

I have the same problem dual booting Windows 10, but I assumed it was a hardware issue so I did not look for a solution here. This is not normally a problem, but window updates or installs which require interaction can fail because you cant see the display.

Following Derek_S's directions above, I see that both both Windows and VBE are set to the same resolution (1366x768x32) by default.

I wonder what hardware MessedUp is using. I have the problem on a HP laptop.

Garvan
Notebook: HP 14 Notebook PC 14-r003TX, i5-4210U @ 1.7 GHz, 8GB RAM, Linux Mint 17.2 (Dual boot with Win 10)
Notebook: DELL latitude E5520, i5-2520M @ 2.50 GHz, 4GB RAM, Linux Mint 17.2

MessedUp
Level 1
Level 1
Posts: 3
Joined: Tue Jul 28, 2015 7:55 am

Re: Grub messes up Windows 7 boot screen, but boots okay

Post by MessedUp » Fri Oct 16, 2015 5:03 pm

Hi Garvan,
HP Laptop 640G1 with SSD only. Still no idea on how to fix this silly thing...

Post Reply

Return to “Installation & Boot”