LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boot Windows 10 and CentOS 7 (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-windows-10-and-centos-7-a-4175600538/)

kwa71 02-24-2017 08:56 PM

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

colorpurple21859 02-24-2017 09:16 PM

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

Doug G 02-24-2017 09:35 PM

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.

rknichols 02-25-2017 09:28 AM

Quote:

Originally Posted by Doug G (Post 5675681)
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.

Doug G 02-25-2017 07:53 PM

Quote:

Originally Posted by rknichols (Post 5675830)
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. :)

rknichols 02-25-2017 08:02 PM

Quote:

Originally Posted by Doug G (Post 5676050)
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???

Doug G 02-25-2017 11:46 PM

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.

Rickkkk 02-27-2017 01:38 PM

Quote:

Originally Posted by Doug G (Post 5676109)
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 .... ;-)

kwa71 03-23-2017 12:12 AM

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

syg00 03-23-2017 01:24 AM

Wrong thread


All times are GMT -5. The time now is 02:22 PM.