LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boot: Windows not showing up on Grub menu (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-windows-not-showing-up-on-grub-menu-4175500996/)

Steve W 04-08-2014 11:10 AM

Dual boot: Windows not showing up on Grub menu
 
I have installed Linux Mint 14 xcfe on a friend's desktop machine, previously running Windows XP. They wanted to do it dual-boot, so they still had access to their files stored on the Windows partition, and could still go into XP if they needed to.

However, even though I installed as dual-boot, no Windows option appear in Grub upon boot-up. So they can't go into Windows at all.

I checked grub.cfg and there is no Windows XP entry in there at all. The files are still accessible on the Windows partition; just that it won't boot into Windows anymore.

How can I correct this, without using the original Windows installation disc to fix the boot sector (and render Linux inoperable)? I do not know the text to enter into grub.cfg (or /etc/default/grub) to make a valid XP entry in the file...

We are both rather panicky at the moment, as I appear to have rendered her Windows installation on the machine inoperable, despite my assurances that this wouldn't happen! (She has several programs that only run in Windows, which is why she still needs XP, for the moment, so running Linux only is not an option).

Thank you for any help you can give.

custangro 04-08-2014 03:08 PM

Not sure if this is the same in Mint; but I had a similar problem in Fedora.

All I did was add this script...

Code:

# cat /etc/grub.d/31_windows-probe
#!/bin/sh -e
#
cat << EOF
menuentry "Microsoft Windows 7" {
  set root=(hd0,1)
  chainloader +1
}
EOF
#

Where set root=(hd0,1) is where Windows lives.

Then I ran

Code:

grub2-mkconfig
Please backup your file/system before trying this.

--C

Steve W 04-08-2014 05:45 PM

So do I add this script into /etc/grub.d, with the other scripts, calling it "31_windows-probe"?

syg00 04-08-2014 08:02 PM

Just run "sudo update-grub" first to be sure - os-prober should find XP ok. Why not Mint 16 (petra) ?.

custangro 04-09-2014 10:26 AM

Quote:

Originally Posted by Steve W (Post 5149040)
So do I add this script into /etc/grub.d, with the other scripts, calling it "31_windows-probe"?

Yes and make sure you make it executable with chmod.


Also I would do what syg00 says

--C

TroN-0074 04-09-2014 12:25 PM

Another vote here for "sudo update-grub"
If that doesnt do it you could install and run the grub repair tool

Here is the link https://help.ubuntu.com/community/Boot-Repair

Steve W 04-10-2014 03:41 AM

Success. I did "sudo update-grub2" as suggested, then rebooted. Windows XP then appeared as an OS at the bottom of the menu.

Other people with the same problem who may find this thread: please note it was "grub2" at the end, not "grub". I don't know whether "grub" would have worked as well, but as I understand it, grub2 is used more on distros these days.

syg00: "Why not Mint 16 (petra)?"

Version 14 was just what I had on a memory stick from a previous install. Although I wonder how supported it is still, since when I ran the updates most of them came up as "Fail" and "Not found".

Anyway, thank you all for the assistance.

yancek 04-10-2014 09:23 AM

Quote:

Version 14 was just what I had on a memory stick from a previous install. Although I wonder how supported it is still, since when I ran the updates most of them came up as "Fail" and "Not found".
According to the Mint site, support for 14 ends this month.

http://www.linuxmint.com/oldreleases.php

rokytnji 04-10-2014 09:30 AM

Quote:

Version 14 was just what I had on a memory stick from a previous install. Although I wonder how supported it is still, since when I ran the updates most of them came up as "Fail" and "Not found".
Quote:

According to the Mint site, support for 14 ends this month.

http://www.linuxmint.com/oldreleases.php
There is your answer. From a guy running

Code:

$ cat /etc/issue
Linux Mint 14 Nadia \n \l

I will run this unsupported version till next month and then install

http://blog.linuxmint.com/?p=2594

I like using the Mate Iso. I run all kinds of gear with all kinds of different Linux installs.
It depends on my gear on what I run.


All times are GMT -5. The time now is 06:57 PM.