Cannot boot into windows after dual boot with Centos7

General support questions
Criminalpython
Posts: 8
Joined: 2019/07/09 21:17:31
Location: Brighton

Cannot boot into windows after dual boot with Centos7

Post by Criminalpython » 2019/07/09 21:22:11

I am trying to set up dual boot on my windows 10 pc. I installed CentOS onto a partition on my drive, however I accidentally installed the minimal version. I now cannot access my windows OS. I have tried to re install full CentOS but the partition i want to use is now not showing as it is taken up with the minimal installation, how do I fix this?I have tried to install Gnome etc however not many packages are available (yum, vim etc) and this makes it hard to do anything, I also cannot connect to the internet.

Ideally I would like to reinstall the full version over the top of the minimal version, but I cannot see the free drive in the install menu.
Last edited by Criminalpython on 2019/07/12 19:01:34, edited 2 times in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: I have installed CentOS 7 minimal by accident

Post by TrevorH » 2019/07/09 22:54:45

Before we go ahead and make a bad thing worse, I think it would help to know about your hardware, how you did the install, what iso image you downloaded and how you created whatever install media you used to do the install. Give as much info as you can.

Since you can boot into CentOS, please post the output from the following (the first needs to be run as root and will list your partitions)

fdisk -lu /dev/sd[a-z]
ls /sys/firmware/efi
df -h

Also, does your computer boot in UEFI mode or in legacy BIOS mode?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Criminalpython
Posts: 8
Joined: 2019/07/09 21:17:31
Location: Brighton

Re: I have installed CentOS 7 minimal by accident

Post by Criminalpython » 2019/07/12 18:08:15

Hi, I have used ethernet to download Gnome so I now have GUI, however I still cannot get the grub to show windows as I'm using GPT labels...

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: I have installed CentOS 7 minimal by accident

Post by TrevorH » 2019/07/12 18:51:29

Please answer the questions you were asked.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Criminalpython
Posts: 8
Joined: 2019/07/09 21:17:31
Location: Brighton

Re: I have installed CentOS 7 minimal by accident

Post by Criminalpython » 2019/07/12 18:59:22

This is the output of the commands you asked for, it seems as if it can't detect anything? I am not sure which mode I am using, I think I changed it to legacy before I installed CentOS but I have since changed it back
Attachments
output1.png
output1.png (44.58 KiB) Viewed 2472 times

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot boot into windows after dual boot with Centos7

Post by TrevorH » 2019/07/12 21:28:04

Ok, that helps but I didn't think about your disk being anything other than /dev/sda through sdz.

Post the output from fdisk -lu /dev/nvme0n1 instead.

However the fact that /sys/firmware/efi does not exist means that your CentOS is installed in Legacy BIOS mode and not in UEFI mode.

What iso filename did you download and use? Did you check its sha256sum against the list in our release notes https://wiki.centos.org/Manuals/ReleaseNotes before you wrote it to your USB stick?

And most importantly of all, how did you copy the iso image to your USB stick to do the install?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Criminalpython
Posts: 8
Joined: 2019/07/09 21:17:31
Location: Brighton

Re: Cannot boot into windows after dual boot with Centos7

Post by Criminalpython » 2019/07/13 15:55:17

This is the output from the command. How do I find out the iso filename that I used? I know I used the latest 64bit version of Centos7, I wrote it to my USB using rufus, I don't know what you mean by the sha256sum as it was not mentioned in the tutorial I followed to install.
Attachments
screenshot.png
screenshot.png (75.12 KiB) Viewed 2393 times

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cannot boot into windows after dual boot with Centos7

Post by TrevorH » 2019/07/13 16:49:50

I used the latest 64bit version of Centos7, I wrote it to my USB using rufus
So the latest 64 bit iso file is called CentOS-7-x86_64-DVD-1810.iso or CentOS-7-x86_64-Minimal-1810.iso. However, Rufus is on our list of "do not use" programs as it can corrupt our iso by modifying it as it "copies" it to the USB stick. Unfortunately, the way that it breaks it means that it doesn't boot in UEFI mode even on systems that are in UEFI mode - it drops through and boot in Legacy BIOS mode instead. That means your CentOS install is in Legcy BIOS mode and your Windows was installed in UEFI mode which is why you cannot just add it to your grub menu.

I am not a Windows expert and do not know how to recover from this short of reinstalling Windows. You may want to post on a more Windows-centric site to discover the best way to recover from this, hopefully without data loss. I would concentrate on that part of it and abandon your current CentOS install. Once you have your Windows back, then you can start to look at installing CentOS in UEFI mode. That starts by reading our wiki page on USB key based installs which can be found at http://wiki.centos.org/HowTos/InstallFromUSBkey

You need to create the USB stick using one of the tools that is known to work and not corrupt the iso image as it copies it.

From your fdisk output it does appear that you still have an EFI system partition and what looks like various windows related partitions present. I suspect that all you need to do is the UEFI equivalent of 'fixmbr' - though I'm showing how long it is since I used Windows there as that tool is ancient and probably a) not the right one for UEFI and b) superceded by now.

You can download the iso images from https://www.centos.org/download/ if you have lost the original that you used. We added a link on that page that says " If you plan to create USB boot media, please read this first to avoid damage to your system. " complete with a link there to the USBInstall wiki page in order to try to stop this from happening.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Criminalpython
Posts: 8
Joined: 2019/07/09 21:17:31
Location: Brighton

Re: Cannot boot into windows after dual boot with Centos7

Post by Criminalpython » 2019/07/13 17:51:19

Thank you very much for your help! I will try this, luckily I made the decision to back everything up before trying this so I should be able to start again!

owl102
Posts: 413
Joined: 2014/06/10 19:13:41

Re: Cannot boot into windows after dual boot with Centos7

Post by owl102 » 2019/07/13 18:04:11

TrevorH wrote:
2019/07/13 16:49:50
From your fdisk output it does appear that you still have an EFI system partition and what looks like various windows related partitions present. I suspect that all you need to do is the UEFI equivalent of 'fixmbr' - though I'm showing how long it is since I used Windows there as that tool is ancient and probably a) not the right one for UEFI and b) superceded by now.
You don't need to do anything on the MS-Windows side since installing a BIOS bootloader does not break the UEFI bootloaders. So simply installing CentOS in UEFI mode while NOT reformatting the EFI system partition (/boot/efi) and telling the PC that it should prefer UEFI boot over BIOS boot should fix this problem.

I strongly recommend NOT using Rufus, too, since when used with default settings it modifies the ISO before writing it to USB. (Proof: viewtopic.php?p=297142#p297142 )

P.S.: If you get a broken Grub bootloader after installing CentOS your PC still prefers BIOS boot over UEFI boot. This needs to be changed in the BIOS setup of your computer, afterwards the new UEFI Grub should show up after boot.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

Post Reply