LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Windows 10 / CentOS 7 will not dual boot (https://www.linuxquestions.org/questions/centos-111/windows-10-centos-7-will-not-dual-boot-4175707964/)

walterbyrd 02-13-2022 11:26 AM

Windows 10 / CentOS 7 will not dual boot
 
I installed Windows 10 first, then installed CentOS 7. I don't think CentOS overwrote the windows partition. But there is no option to boot windows. I have the option of booting centos, or centos.
I found no option to configure a bootloader during the centos installation.

pan64 02-13-2022 12:20 PM

would be nice to give us more details, like your partition information.

colorpurple21859 02-13-2022 12:24 PM

open a terminal and post the output of
Code:

sudo lsblk -f
cat /sys/firmware/efi


walterbyrd 02-13-2022 07:26 PM

NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs System Reserved 02A4B917A4B90DE3
├─sda2 ntfs A62E4BB92E4B8173
├─sda3 xfs 249a2634-0644-4bd9-9ab8-8d3c25ae2c48
├─sda4
├─sda5 xfs e26c7c3e-3e7d-43ec-b46b-8bfe86572ed4 /boot
├─sda6 swap dc0e7787-1b7c-4270-845a-38e2037e781b
├─sda7 xfs root 5b00eae9-156b-4de6-be30-f60f676eef87 /
└─sda8 xfs 3e810b28-1a01-4520-84ba-56d83352dc1e /home

I cannot find an efi file.

cat /sys/firmware/efi
cat: /sys/firmware/efi: No such file or directory

$ ls -l /sys/firmware
total 0
drwxr-xr-x. 5 root root 0 Feb 13 15:03 acpi
drwxr-xr-x. 4 root root 0 Feb 13 20:03 dmi
drwxr-xr-x. 12 root root 0 Feb 13 20:03 memmap
drwxr-xr-x. 2 root root 0 Feb 13 20:27 qemu_fw_cfg

colorpurple21859 02-13-2022 07:59 PM

post
Code:

cat /etc/default/grub

walterbyrd 02-13-2022 08:55 PM

# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

syg00 02-13-2022 10:31 PM

That looks like a MBR (aka MS-DOS) partition table. So non-UEFI, non-gpt - I didn't think retail versions of Win10 allowed that.

Check your firmware (i.e. BIOS) screens and make sure EFI mode is selected - not CSM (legacy) mode. Then erase the disk and re-install every thing again from scratch.

pan64 02-14-2022 12:04 AM

Quote:

Originally Posted by syg00 (Post 6329247)
That looks like a MBR (aka MS-DOS) partition table. So non-UEFI, non-gpt - I didn't think retail versions of Win10 allowed that.

Check your firmware (i.e. BIOS) screens and make sure EFI mode is selected - not CSM (legacy) mode. Then erase the disk and re-install every thing again from scratch.

OP already installed windows that way (I think). So it worked first. But OP will explain it.

colorpurple21859 02-14-2022 06:27 AM

Try this first,
add this to etc/default/grub
Code:

GRUB_DISABLE_OS_PROBER=false
Then run
Code:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
If this doesn’t work then will try manually adding a windows menuentry

walterbyrd 02-15-2022 09:15 AM

> OP already installed windows that way (I think). So it worked first. But OP will explain it.

Yes, I originally installed windows, and windows booted and worked just fine.

pan64 02-15-2022 09:32 AM

would be nice to see the detailed info about those partitions (like size). Windows needs an efi partition, probably that's why it cannot be booted. What is sda4?

colorpurple21859 02-15-2022 09:48 AM

Quote:

That looks like a MBR (aka MS-DOS) partition table. So non-UEFI, non-gpt - I didn't think retail versions of Win10 allowed that
Yes windows 10 will install to a mbr partition table in non-uefi mode.

post the output of
Code:

sudo parted -l

walterbyrd 02-15-2022 11:21 AM

Code:

# grub2-mkconfig -o / boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1160.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1160.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-1495fd8baa4e4037ace10e1effc2d33a
Found initrd image: /boot/initramfs-0-rescue-1495fd8baa4e4037ace10e1effc2d33a.img
Found linux image: /boot/vmlinuz-0-rescue-f88f9bcae7074473912b27834c137add
Found initrd image: /boot/initramfs-0-rescue-f88f9bcae7074473912b27834c137add.img
/usr/sbin/grub2-mkconfig: line 290: /: Is a directory

Line 290: cat ${grub_cfg}.new > ${grub_cfg}

In context: (lines 279 to 293 of /usr/sbin/grub2-mkconfig):

Code:

if test "x${grub_cfg}" != "x" ; then
  if ! ${grub_script_check} ${grub_cfg}.new; then
    # TRANSLATORS: %s is replaced by filename
    gettext_printf "Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
%s file attached." "${grub_cfg}.new" >&2
    echo >&2
    exit 1
  else
    # none of the children aborted with error, install the new grub.cfg
    cat ${grub_cfg}.new > ${grub_cfg}
    rm -f ${grub_cfg}.new
  fi
fi


walterbyrd 02-15-2022 11:26 AM

Quote:

Originally Posted by colorpurple21859 (Post 6329814)
Yes windows 10 will install to a mbr partition table in non-uefi mode.

post the output of
Code:

sudo parted -l

Code:

# parted -l
Model: ATA WDC WD10EZEX-22B (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start  End    Size    Type      File system    Flags
 1      1049kB  525MB  524MB  primary  ntfs            boot
 2      525MB  105GB  104GB  primary  ntfs
 3      105GB  106GB  1074MB  primary  xfs
 4      106GB  1000GB  894GB  extended
 5      106GB  107GB  1074MB  logical  xfs
 6      107GB  113GB  6041MB  logical  linux-swap(v1)
 7      113GB  167GB  53.7GB  logical  xfs
 8      167GB  1000GB  833GB  logical  xfs


walterbyrd 02-15-2022 11:29 AM

Maybe I would do better with something more recent? Rocky Linux, Oracle Linux, Fedora, or Stream CentOS?


All times are GMT -5. The time now is 05:57 AM.