LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2014, 01:59 PM   #1
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Rep: Reputation: 16
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
 
Old 03-22-2014, 02:44 PM   #2
redd9
Member
 
Registered: Nov 2013
Location: Canada
Distribution: Ubuntu
Posts: 80
Blog Entries: 4

Rep: Reputation: 42
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
 
Old 03-22-2014, 06:26 PM   #3
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Original Poster
Rep: Reputation: 16
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
 
Old 03-22-2014, 06:37 PM   #4
redd9
Member
 
Registered: Nov 2013
Location: Canada
Distribution: Ubuntu
Posts: 80
Blog Entries: 4

Rep: Reputation: 42
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.

Last edited by redd9; 03-22-2014 at 06:40 PM.
 
Old 03-22-2014, 07:41 PM   #5
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Original Poster
Rep: Reputation: 16
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
 
Old 03-23-2014, 12:54 AM   #6
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
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

Last edited by tommcd; 03-23-2014 at 12:58 AM.
 
Old 03-23-2014, 02:00 AM   #7
gold_finger
Member
 
Registered: Jan 2014
Distribution: Mint Xfce, Voyager, SolydK
Posts: 50

Rep: Reputation: 12
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.
 
1 members found this post helpful.
Old 03-23-2014, 10:20 AM   #8
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Original Poster
Rep: Reputation: 16
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
 
Old 03-23-2014, 10:30 AM   #9
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Original Poster
Rep: Reputation: 16
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
 
Old 03-23-2014, 10:39 AM   #10
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Original Poster
Rep: Reputation: 16
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.
 
Old 03-23-2014, 01:11 PM   #11
gold_finger
Member
 
Registered: Jan 2014
Distribution: Mint Xfce, Voyager, SolydK
Posts: 50

Rep: Reputation: 12
Quote:
Originally Posted by tlcmd View Post
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 PCs 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
 
Old 03-23-2014, 04:01 PM   #12
tlcmd
Member
 
Registered: Jul 2007
Posts: 59

Original Poster
Rep: Reputation: 16
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to add Windows 7 boot option to Debian Grub boot loader VRich Linux - Newbie 3 03-05-2012 09:44 AM
How do I add Windows XP to Grub boot loader? LUB997 Linux - Software 29 10-17-2009 12:11 PM
[SOLVED] How to add slackware in grub boot loader? cola Slackware 14 09-15-2009 05:55 AM
Boot loader (GNU grub 0.97) problems vin0914 SUSE / openSUSE 2 11-29-2006 02:58 AM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 03:22 AM


All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration