Page 1 of 1

Problem with partitions

Posted: 2018/01/14 20:10:58
by dani10
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!

Re: Problem with partitions

Posted: 2018/01/14 21:03:25
by owl102
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

Re: Problem with partitions

Posted: 2018/01/14 21:06:20
by TrevorH
Also, did you install CentOS from a USB stick and if so, how did you create that stick?

Re: Problem with partitions

Posted: 2018/01/16 15:41:42
by dani10
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?

Re: Problem with partitions

Posted: 2018/01/16 15:42:48
by dani10
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.

Re: Problem with partitions

Posted: 2018/01/16 15:49:32
by owl102
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.

Re: Problem with partitions

Posted: 2018/01/16 15:52:22
by TrevorH
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.

Re: Problem with partitions

Posted: 2018/01/16 16:32:49
by dani10
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.

Re: Problem with partitions

Posted: 2018/01/16 17:24:03
by dani10
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]