LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 02-10-2019, 06:28 PM   #1
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Rep: Reputation: Disabled
Trying to install CentOS 7 and Windows 10 on same drive (dual boot)


Hello:

I have a brand new ASUS VivoBook S15 (S530U). I installed Windows 10 on my SSD and then CentOS 7. After the CentOS install's final reboot, there isn't an entry in grub for my Windows 10 stuff.

Here's fdisk -l

Code:
disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 873E25DD-2CDA-11E9-AD60-38BAF8FA5F68


#         Start          End    Size  Type            Name
 1         2048      1026047    500M  Microsoft basic 
 2      1026048    316117075  150.3G  Microsoft basic 
 3    316119040    316323839    100M  EFI System      
 4    316323840    317951999    795M  Windows recover 
 5    317968384    635920383  151.6G  Microsoft basic 
 6    635936768    953888767  151.6G  Microsoft basic 
 7    953905152   1052209151   46.9G  Microsoft basic 
 8   1052225536   1117761535   31.3G  Linux filesyste 
 9   1117777920   1150545919   15.6G  Linux filesyste 
10   1150562304   1183330303   15.6G  Linux filesyste 
11   1183346688   1216114687   15.6G  Linux filesyste 
12   1216131072   1248899071   15.6G  Linux filesyste 
13   1248915456   1281683455   15.6G  Linux filesyste 
14   1281699840   1380003839   46.9G  Linux swap      
15    317952000    317956095      2M  BIOS boot       
16   1697988608   1953509375  121.9G  Linux filesyste 
17   1380003840   1697988607  151.6G  Linux LVM       

Disk /dev/mapper/centos-root: 162.8 GB, 162806104064 bytes, 317980672 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
So I edited /etc/grub.d/40_custom like so:

Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows 10" {
        set root(hd0,3)
        chainloader +1
        }
And then ran:

Code:
grub2-mkconfig --output=/boot/grub2/grub.cfg
When I rebooted, and selected the menu entry for "Windows 10", I got this:

Code:
Error: not an assignment invalid signature
I'm stuck, how can I get the Windows stuff in my grub so I can boot from either OS?

Any assistance you can provide is greatly appreciated!
 
Old 02-10-2019, 06:45 PM   #2
1nuxg33k
LQ Newbie
 
Registered: Feb 2019
Location: PNW
Distribution: Debian, CentOS, OpenSuse, Mint, LXDE
Posts: 12

Rep: Reputation: 4
I could be entirely wrong but I believe you need to run update-grub2
 
Old 02-10-2019, 07:12 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,320

Rep: Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675Reputation: 1675
Take a look at the link below at the Opensuse site with info on Grub2. The command to update grub2 is below and needs to be run as root or sudo if used on opensuse:

Code:
grub2-mkconfig -o /boot/grub2/grub.cfg
The info in your first post shows an EFI partition. Are both CentOS and windows installed UEFI? You should see folders for Microsoft and whatever CentOS uses in the EFI partition if they are. The chainloader entry you used won't work on a windows EFI install. Try the below entry if you have the windows files on the EFI partition but running grub2-mkconfig should work. The set root line should point to your EFI partition (hd0,gpt3).
Quote:
menuentry 'Windows' {
insmod part_gpt
insmod fat
set root='hd0,gpt3'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
 
1 members found this post helpful.
Old 02-10-2019, 08:54 PM   #4
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 1nuxg33k View Post
I could be entirely wrong but I believe you need to run update-grub2
I get a command not found error.
 
Old 02-10-2019, 08:55 PM   #5
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
[QUOTE=yancek;5960347]Take a look at the link below at the Opensuse site with info on Grub2. The command to update grub2 is below and needs to be run as root or sudo if used on opensuse:

Code:
grub2-mkconfig -o /boot/grub2/grub.cfg
I'm confused. That's what I wrote in my original post. Your command is the same as the one I ran.
 
Old 02-10-2019, 09:00 PM   #6
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post

The info in your first post shows an EFI partition. Are both CentOS and windows installed UEFI? You should see folders for Microsoft and whatever CentOS uses in the EFI partition if they are. Th (hd0,gpt3).
This where I'm completely lost. I followed the ASUS instructions for booting from USB stick. Turning secure boot off and enabling "launch csm" (which also disables fast boot).

I have zero idea how to or not to specify UEFI.

I changed the BIOS settings, again secure boot and CSM, once, and only once and then installed Windows then Linux.
 
Old 02-10-2019, 09:29 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,487

Rep: Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741
CSM mode is a BIOS emulation provided by EFI firmware - you should never use it IMHO.
I don't understand why you have so many Linux fielsystems - how many ties have you done the CentOS install ?. From CentOS go here and do as it says - post the RESULTS.txt so we can see what is what in that layout. While we're waiting for that, run these commands and post output
Code:
df -hT
sudo lsblk -f
[ -d /sys/firmware/efi ] && echo "EFI boot" || echo "Legacy boot"
 
1 members found this post helpful.
Old 02-11-2019, 12:35 AM   #8
mgoblue0970
LQ Newbie
 
Registered: Aug 2015
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
CSM mode is a BIOS emulation provided by EFI firmware - you should never use it IMHO.
Well... out of complete frustration and between your last reply, I wiped the disk, set CSM to disabled (ASUS lied), installed Windows, installed CentOS again.

Interestingly enough, the partition wizard had an option for /boot/efi as a mount point this time! That was NOT there with CSM enabled.

So I selected /boot/efi and when the install finished, I had both Windows and Linux in my boot menu!

Thanks for the help. By the way, I only had installed CentOS once. I have separate partitions for:

Code:
/var
/var/log
/var/log/audit
/var/tmp
/tmp
/boot <-- now /boot/efi
/swap
/home
/
Is there a way to mark things [SOLVED] in this forum?

Last edited by mgoblue0970; 02-11-2019 at 12:36 AM. Reason: clarification
 
Old 02-11-2019, 12:40 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,487

Rep: Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741Reputation: 2741
Have a look in thread tools maybe - as OP you can mark it solved.
/boot/efi is not relevant to CSM/BIOS installs.
 
  


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
Tried centos 7 dual boot with windows 10 not went will as could not boot windows 10...help needed rajeshm79 LinuxQuestions.org Member Intro 0 10-29-2018 02:11 PM
[SOLVED] Dual boot without windows - Windows 10 UEFI dual boot with Metamorphose Panther(Debian/KDE) mithidieri Linux - Newbie 7 11-03-2017 01:10 AM
How to go from single drive dual boot to two drive dual boot? argoldst Linux - Newbie 4 10-21-2015 03:28 PM
Boot to windows from centos, boot from centos to windows brettmehaffey Linux - Newbie 12 08-19-2009 06:25 PM
prevent users to run the same script at the same time, on the same machine pvpnguyen Programming 2 09-05-2007 09:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

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