LinuxQuestions.org
Review your favorite Linux distribution.
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 02-24-2017, 07:56 PM   #1
kwa71
LQ Newbie
 
Registered: Feb 2017
Posts: 8

Rep: Reputation: Disabled
Question Dual boot Windows 10 and CentOS 7


Hi All,

I am having trouble Dual booting Windows 10 and CentOS 7 on a UEFI machine: /boot/efi/EFI/centos/grub.cfg. I get two errors.
1. error: not an assignment
2. error: Invalid EFI file path.

I don't' know if this has to do with my installation itself of CentOS 7 or my partition scheme. My Windows 10 partition is /dev/sda4. I have edited my /etc/grub.d/40_custom file as follows:

menuentry "WIndows 10" {
set root = (hd0,4)
}

Then I ran grub2-mkcofnig -o /boot/efi/EFI/centos/grub.cfg

I don't know what else to do.

Thanks,
kwa71
 
Old 02-24-2017, 08:16 PM   #2
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, arch, ubuntu, others
Posts: 3,440

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
To chainload windows in efi system the entry has to be something like this

Code:
insmod part_gpt
	insmod fat
	set root='hd0,gpt1'
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
The set root needs to point to the efi partition

Last edited by colorpurple21859; 02-24-2017 at 08:18 PM.
 
Old 02-24-2017, 08:35 PM   #3
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
I have Centos7 dual-booting with Windows 10 in secure boot mode on a Dell machine. I didn't have to edit or mess with any config files. The installation steps I used:

* Log in to windows, use disk management to shrink the existing ntfs windows partition, leaving the new free space unallocated.
* Boot the centos usb installation media in UEFI mode.
* Install centos7
* Reboot and choose centos from the grub menu (or windows, both choices are present).

The only problem I have is I have to sit and watch windows updates so I can catch the reboots and choose to boot windows instead of the default centos. But if you miss an auto reboot, next time you boot into windows the updates will complete.
 
Old 02-25-2017, 08:28 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by Doug G View Post
The only problem I have is I have to sit and watch windows updates so I can catch the reboots and choose to boot windows instead of the default centos. But if you miss an auto reboot, next time you boot into windows the updates will complete.
Just set the GRUB_DEFAULT to 'saved' and include the GRUB_SAVEDFAULT option in each of the boot sections. The machine will default to the last OS you ran.
 
Old 02-25-2017, 06:53 PM   #5
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Just set the GRUB_DEFAULT to 'saved' and include the GRUB_SAVEDFAULT option in each of the boot sections. The machine will default to the last OS you ran.
Thanks

I am aware of this, but for myself I don't want to change the default OS, after a power outage or whatever I want CentOS to be running on the machine. Tweaking the default startup is surely an option, but I know there would be the one time I forgot to change back to centos, I'd be out of my office, the juice would go out and none of my centos services would be available until I got back home. Of course, not dual-booting would also work, but the W10 came with the computer, I occasionally use it, and don't want to just erase W10.
 
Old 02-25-2017, 07:02 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,298

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by Doug G View Post
Thanks

I am aware of this, but for myself I don't want to change the default OS, after a power outage or whatever I want CentOS to be running on the machine. Tweaking the default startup is surely an option, but I know there would be the one time I forgot to change back to centos, I'd be out of my office, the juice would go out and none of my centos services would be available until I got back home.
If CentOS had been running when the power went out, then that's what was last booted and what the default would have been set to, so that's what would come back up when the power came back on. Were you somehow planning on leaving Windows running, but expecting CentOS to come up should there happen to be a power interruption???
 
Old 02-25-2017, 10:46 PM   #7
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
Were you somehow planning on leaving Windows running, but expecting CentOS to come up should there happen to be a power interruption???
That's exactly what I need, and that's why I use grub2-set-default to manually set the grub default boot on my systems. Unlike many here at these, I use and like using windows as well as linux, and I do have windows running on the computer fairly often. And yes, I want the system to always reboot into centos unless I manually choose a different boot option, which is why I baby-sit windows updates to complete them.
 
Old 02-27-2017, 12:38 PM   #8
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,113

Rep: Reputation: 421Reputation: 421Reputation: 421Reputation: 421Reputation: 421
Quote:
Originally Posted by Doug G View Post
That's exactly what I need, and that's why I use grub2-set-default to manually set the grub default boot on my systems. Unlike many here at these, I use and like using windows as well as linux, and I do have windows running on the computer fairly often. And yes, I want the system to always reboot into centos unless I manually choose a different boot option, which is why I baby-sit windows updates to complete them.
While I use another linux distro, I also dual boot Win 10 and have set all of my computers up to boot linux by default. Not sure what your difficulty is : just set up GRUB to boot CentOS as default, as opposed to the last-booted system.

Apologies in advance if I've missed your point ...

-------------------------------------------------------

EDIT: ... OK ... sorry - I just read back and realized that Doug_G is not the OP and is not actually asking a question ... My bad ... Now WHERE is that coffee that I obviously so desperately need .... ;-)

Last edited by Rickkkk; 02-27-2017 at 12:42 PM.
 
Old 03-22-2017, 11:12 PM   #9
kwa71
LQ Newbie
 
Registered: Feb 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Dual Boot Windows 10 and Centos 7

Hi All,
I can't boot into Windows 10 at all. I already have my partition scheme set as Windows 10 /dev/sda4.

insmod part_gpt what is this part_gpt for insmod?
insmod fat Is there an ntfs for insmod?
set root='hd0,gpt1'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi I also don't have a Microsoft efi file to add to the chainloader argument.

Please forgive me for saying so but this doesn't seem like it's Centos 7 specific. Please explain

Thanks,
kwa71
 
Old 03-23-2017, 12:24 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,146

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
Wrong thread

Last edited by syg00; 03-29-2017 at 07:48 AM.
 
  


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
[SOLVED] CenTOS 7 dual boot with windows Mridulj Linux - Newbie 33 07-21-2016 01:45 AM
[SOLVED] Dual boot CentOs 7/Windows 10 - boot loader not properly configured? teaxtor CentOS 4 11-01-2015 01:00 PM
CenTOS 7 dual boot with windows Mridulj CentOS 6 08-15-2014 12:19 AM
CentOS 4.0 + Windows XP Dual Boot laserlight Linux - Enterprise 9 02-01-2010 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:36 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