LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How Do I Add Windows 8.1 To The GNU Grub Loader (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-add-windows-8-1-to-the-gnu-grub-loader-4175499117/)

tlcmd 03-22-2014 12:59 PM

How Do I Add Windows 8.1 To The GNU Grub Loader
 
I have an HP Envy 700-216 and have finally successfully installed Linux Mint Debain Edition onto it alongside Windows 8.1.However, when I boot it up, the GUN Bootloader page does not show the Windows OS.

My question: How do I add the Windows OS to the Linux GNU Bootloader?

Thank you,
tlcmd

redd9 03-22-2014 01:44 PM

Try making a file called /etc/grub.d/30_windows that contains this:

Code:

#! /bin/bash
cat << EOF
menuentry "Windows 8" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt1)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
EOF

Then run sudo update-grub and reboot.
Source: http://askubuntu.com/questions/21091...fter-dual-boot

tlcmd 03-22-2014 05:26 PM

Redd9,
Thank you for your reply. But please remember that I am a noobie and actually do not know
1) How to create a file called /etc/grub.d/30_windows
2) Whether to create it in a Linux terminal or a windows command line.

Would you walk me through this step by step. I am really quite Linux semi-literate and need it explained step by step, please.

Thanks,
tlcmd

redd9 03-22-2014 05:37 PM

I'm sorry, I should have been more clear. In the Linux command prompt, type:
Code:

sudo nano /etc/grub.d/30_windows
Then paste the code in with ctrl-shift-v. By the code I , mean what I put on the first post. After you do that, press ctrl-x, y, and enter. Then type
Code:

sudo update-grub
I am not an expert on this topic, so please let me know if you run into any problems or errors.

tlcmd 03-22-2014 06:41 PM

Redd9
Here's how it went:
I have to boot into Linux Mint Debian Edition with the Supergrub disk 2, but once thre, it works fine. SO I endered:
sudo nano /etc/grub.d/30_windows and hit enter. That asked me for my password, which i entered and then I got this:

#! /bin/bash
cat << EOF
menuentry "Windows 8" {
insmod part_gpt
insmod chain
set root='(hd0,gpt1)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
EOF#! /bin/bash
cat << EOF
menuentry "Windows 8" {
insmod part_gpt
insmod chain
set root='(hd0,gpt1)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
EOF


[ Read 17 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

So I never got to enter those commands as per your instructions
I then pressed control X and got:

sudo nano /etc/grub.d/30_windows





File Name to Write: /etc/grub.d/30_windows
^G Get Help M-D DOS Format M-A Append M-B Backup File
^C Cancel M-M Mac Format M-P Prepend

I could never press Y or perform the last step (sudo update-grub)

Where did I screw up.
tlcmd

tommcd 03-22-2014 11:54 PM

So your computer came with Wimdows 8, and you installed Mint alongside Windows. Is that correct? Are you sure your Linux install did not overwrite Windows?
You could try using a bootinfo script and posting the results here. This will provide detailed info on what OSs are on your computer and what boot loader is doing what. This should provide enough info for people to give you a more informed answer to solve your problem.:
http://sourceforge.net/projects/bootinfoscript/


You can also try the Boot Repair CD to try to fix this problem:
https://help.ubuntu.com/community/Boot-Repair

gold_finger 03-23-2014 01:00 AM

Not familiar with LMDE, but sounds like you probably have a mixed-mode installation. Win 8 was most likely installed in UEFI-mode. In order to do proper duel-boot, you need to install LMDE in same mode, but sounds like it may have installed in BIOS/Legacy-mode.

Boot into your installed LMDE and run this command to see if drive is using GPT or MBR partitions:
Code:

sudo parted -l
If it shows GPT partitioning, then you have 64-bit Win 8 installed in UEFI-mode. You need to use 64-bit LMDE and make sure the install DVD/USB is booted using UEFI-mode. (There should be two mode choices in UEFI Boot Menu.) First, confirm whether or not that was the problem with your install. Run this command to see the mode LMDE is running in:
Code:

[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
If it shows Legacy boot, then there is a chance that you can use Boot-Repair utility to convert the install to UEFI-mode. You need to have Boot-Repair use the ESP (EFI System Partition) for grub. That will normally be a small (200-550MB) FAT32 formatted partition near beginning of disk. (Open GParted to find out which one it is.) Try that first. If it works, great! If not, you might be best re-installing and making sure to boot the install DVD in the proper mode.

Converting Ubuntu into EFI or Legacy mode


Other useful info on UEFI installs:
http://www.rodsbooks.com/linux-uefi/
https://help.ubuntu.com/community/UEFI

If you end up re-installing, be sure to:
* Have backups of anything important
* Have Win 8 recovery DVD's made
* Disable Secure Boot
* Disable Fast Startup
* Make sure Win 8 is fully shut down. (Think it is normally just in some kind of hibernated state. It needs to be a full shutdown.)
* Boot LMDE install disk in UEFI-mode
* Point grub bootloader installation to the ESP, not the MBR of the disk.

tlcmd 03-23-2014 09:20 AM

Tommed:
To answer your questions:
1) WHen I set my BIOS to the default settings, my computer boots into Windows 8.1
2) When I use the Supergrub 2 disk with the BIOS in the Lagecy mode, I have a choice of Linux Mint Debian 64 or Windows 8.1 and can boot into the Linux Mint Debian Edition.
So both are on my HDD and in separate partitions.
And, per Gold_Finger's post, probably installed in different modes.
I'll answer his post shortly.

Thanks for the help.

tlcmd

tlcmd 03-23-2014 09:30 AM

Gold_Finger
entering "sudo parted -l" resulted in "command not found"
Entering the second command "[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD""
gave me "Legacy boot and HDD" below that command line.
Now I'm going to try
Disable Secure Boot
* Disable Fast Startup

As a semi-computer literate person, I hope I can figure out how to do this. I probably will be back for some more help.Unfortunately, I believe you are assuming that I have a greater knowledge than I actually have.
Pointing grub bootloader installation to the ESP, not the MBR of the disk is beyond my comprehension, but maybe the install will make a difference.
Thanks,
tlcmd
.
linuxubuntu gold_finger is offline Add to gold_finger's Reputation Report This Post

tlcmd 03-23-2014 09:39 AM

Well, "boot repair did not install; I suppose that is because LMDE is not Ubuntu but Debian based. I'll try re-installing LMDE via UEFI and see what happens.

gold_finger 03-23-2014 12:11 PM

Quote:

Originally Posted by tlcmd (Post 5139783)
Well, "boot repair did not install; I suppose that is because LMDE is not Ubuntu but Debian based. I'll try re-installing LMDE via UEFI and see what happens.

I had a feeling that might happen, but didn't know for sure.


Re: sudo parted -l
That's a lowercase "L" at the end, not number 1.

ESP = EFI System Partition (Read links I listed above for more info.)


Here are a few more that may help:

Basic UEFI Information:

What You Need to Know About Using UEFI Instead of the BIOS

HTG Explains: Learn How UEFI Will Replace Your PC’s BIOS

Unified Extensible Firmware Interface


Creating Windows 8 Recovery Disk:

Create a USB recovery drive


Disabling Secure Boot:

Disabling Secure Boot

How to Enable or Disable Secure Boot in UEFI


Disabling Fast Startup:

How to Turn "Fast Startup" On or Off for a Hybrid Boot in Windows 8 and 8.1

tlcmd 03-23-2014 03:01 PM

IT IS DONE. A member of our local Guilford County Linux Users Group (GCLUG) by the name of Mike McCollough came over and spent a couple hours with me and this computer. I cannopttell you how hge did it, but I now can dual boot through GRUB into either LMDE or windows 8.1 on a HP Envy 700-216 computer. If you need his email address, please contact me and I'll send it to you.
tlcmd


All times are GMT -5. The time now is 05:35 PM.