Problem with partitions

General support questions
Post Reply
dani10
Posts: 5
Joined: 2018/01/14 19:55:47

Problem with partitions

Post by dani10 » 2018/01/14 20:10:58

First of all, I'm new in CentOs, Linux, Ubuntu and all of this, so you can treat me like a child if you want.

I had Windows 10 and I installed CentOs 7 trying to make it dual boot, but it did not went as planned. At first I couldn't install it properly so I tried more than once. I can't boot to Windows and I can't add boot options, the command "Add boot option" from UEFI has disappeared, so I can just boot from CentOs. I would like to be able to boot to Windows (and later uninstall CentOs or make it properly) but I can't access to the partitions and I am not able to identify which partition is from one O.S. or other (and what it's its purpose). So I tried many things and I don't know what to do, I am starting with CentOs and Linux and everything and I can't do anything. Please need help to come back to Windows!

PD: I give you the results of fdisk -l.
Thank you!
Attachments
instantánea1.png
instantánea1.png (223.08 KiB) Viewed 721 times

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

Re: Problem with partitions

Post by owl102 » 2018/01/14 21:03:25

dani10 wrote:PD: I give you the results of fdisk -l.
First of all: Please don't post screenshots of your Terminal. Select the text instead, click with the right mouse button, choose "Copy" and paste the text afterwards into the post. Otherwise we cannot quote text from the Terminal to reference the line(s) we are talking about.

Now back to your problem: It seems you have a Windows installation in UEFI mode and a CentOS installation in Legacy/CSM-Mode. This is bad since Windows installed in UEFI mode can only boot in UEFI mode, and therefore you don't have a "Windows" boot entry in the Linux/Grub bootloader menu. (Even if you would try to add it manually, it would be dommed to fail.)

Switch your UEFI to "UEFI only" (and especially disable "Legacy" or "CSM" support) and re-install CentOS again. Afterwards install NTFS support:

Code: Select all

yum install epel-release
yum install ntfs-3g
Afterwards

Code: Select all

os-prober
should output a link to your Windows installation which should look similar to this one:

Code: Select all

# os-prober
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
If this is not the case, please post the output of the following commands (as root):

Code: Select all

fdisk -l /dev/sda
ls /boot/efi/EFI
efibootmgr -v
os-prober
Last edited by owl102 on 2018/01/14 21:06:49, edited 1 time in total.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

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

Re: Problem with partitions

Post by TrevorH » 2018/01/14 21:06:20

Also, did you install CentOS from a USB stick and if so, how did you create that stick?
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

dani10
Posts: 5
Joined: 2018/01/14 19:55:47

Re: Problem with partitions

Post by dani10 » 2018/01/16 15:41:42

owl102 wrote:
dani10 wrote:PD: I give you the results of fdisk -l.
First of all: Please don't post screenshots of your Terminal. Select the text instead, click with the right mouse button, choose "Copy" and paste the text afterwards into the post. Otherwise we cannot quote text from the Terminal to reference the line(s) we are talking about.

Now back to your problem: It seems you have a Windows installation in UEFI mode and a CentOS installation in Legacy/CSM-Mode. This is bad since Windows installed in UEFI mode can only boot in UEFI mode, and therefore you don't have a "Windows" boot entry in the Linux/Grub bootloader menu. (Even if you would try to add it manually, it would be dommed to fail.)

Switch your UEFI to "UEFI only" (and especially disable "Legacy" or "CSM" support) and re-install CentOS again. Afterwards install NTFS support:

Code: Select all

yum install epel-release
yum install ntfs-3g
Afterwards

Code: Select all

os-prober
should output a link to your Windows installation which should look similar to this one:

Code: Select all

# os-prober
/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
If this is not the case, please post the output of the following commands (as root):

Code: Select all

fdisk -l /dev/sda
ls /boot/efi/EFI
efibootmgr -v
os-prober
Sorry about the screenshot.

OK, I'm reinstalling CentOs. But if I just remove centOs will I be able to enter to Windows ? Or will I have to do the other things you said?

dani10
Posts: 5
Joined: 2018/01/14 19:55:47

Re: Problem with partitions

Post by dani10 » 2018/01/16 15:42:48

TrevorH wrote:Also, did you install CentOS from a USB stick and if so, how did you create that stick?
I created that stick with the CentOs iso with Rufus, I think.

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

Re: Problem with partitions

Post by owl102 » 2018/01/16 15:49:32

dani10 wrote:I created that stick with the CentOs iso with Rufus, I think.
This is a very bad idea since Rufus offers options to manipulate the image before writing it to the USB drive.

Please erase the existence of Rufus (and Unetbootin) from your memory. These tools were used in past times where the ISO images could not be used on a USB drive straight-ahead. But these times are over since many years.

Please use a tool mentioned in https://wiki.centos.org/HowTos/InstallFromUSBkey instead which copies the ISO without manipulation, e.g. Win32DiskImager.
German speaking forum for Fedora and CentOS: https://www.fedoraforum.de/

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

Re: Problem with partitions

Post by TrevorH » 2018/01/16 15:52:22

The CentOS iso images are all hybrid - which means they work on both UEFI and legacy BIOS. Some of the tools used for copying iso images to usb sticks destroy that hybrid set up and thus, rather than booting in UEFI mode on a UEFI enabled machine, they'll end up failing back to legacy BIOS mode when they shouldn't. That then means your installed system is not using UEFI and grub won't contain options for other previously installed UEFI operating systems.
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

dani10
Posts: 5
Joined: 2018/01/14 19:55:47

Re: Problem with partitions

Post by dani10 » 2018/01/16 16:32:49

owl102 wrote: Please use a tool mentioned in https://wiki.centos.org/HowTos/InstallFromUSBkey instead which copies the ISO without manipulation, e.g. Win32DiskImager.
What is the best option to reinstall it? How do I do it?
Sorry, but I don't want to make it worse.

dani10
Posts: 5
Joined: 2018/01/14 19:55:47

Re: Problem with partitions

Post by dani10 » 2018/01/16 17:24:03

dani10 wrote:
owl102 wrote: Please use a tool mentioned in https://wiki.centos.org/HowTos/InstallFromUSBkey instead which copies the ISO without manipulation, e.g. Win32DiskImager.
What is the best option to reinstall it? How do I do it?
Sorry, but I don't want to make it worse.
Now I can't even enter to CentOs, I had this problem when I installed that time ago too, it ddoesn't load. It shows this error under the load bar:

NMI watchdog: BUG: soft lockup - CPU #0 stuck for 22s! [plymoutt: 288]

Post Reply