LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 03-13-2019, 06:37 PM   #1
lowell2753@gmail.com
LQ Newbie
 
Registered: Mar 2019
Posts: 3

Rep: Reputation: Disabled
(Centos 7) Unable to boot or Dual boot with Windows 10. Missing SSD. & os-prober doesn't find windows 10


Hello guys.

I installed Centos7 on my HDD while I have windows installed on my SSD.
When I tried to set up dual boot. Grub is malfunctioning for some reason.

EVEN ON MY BIOS PAGE, MY WINDOWS INSTALLED SSD IS NOT SHOWN

I'm going to put some outputs from commands...
Code:
    [root@localhost ~]# lsblk
    NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda               8:0    0 232.9G  0 disk 
    ├─sda1            8:1    0    16M  0 part 
    ├─sda2            8:2    0  69.5G  0 part /run/media/root/02B22DB8B22DB159
    ├─sda3            8:3    0   495M  0 part /run/media/root/6A74253174250185
    └─sda4            8:4    0 162.9G  0 part /run/media/root/SSD
    sdb               8:16   0   1.8T  0 disk 
    ├─sdb1            8:17   0   200M  0 part /boot/efi
    ├─sdb2            8:18   0     1G  0 part /boot
    ├─sdb3            8:19   0   299G  0 part 
    │ ├─centos-root 253:0    0    50G  0 lvm  /
    │ ├─centos-swap 253:1    0   7.9G  0 lvm  [SWAP]
    │ └─centos-home 253:2    0 241.1G  0 lvm  /home
    ├─sdb4            8:20   0 635.2G  0 part 
    ├─sdb5            8:21   0   290G  0 part 
    ├─sdb6            8:22   0    10G  0 part 
    └─sdb7            8:23   0 627.3G  0 part
And,
Code:
    [root@localhost ~]# blkid
    /dev/sdb1: SEC_TYPE="msdos" UUID="00CB-5870" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="538f6163-4854-46cf-bd70-e3ea7ae00e50" 
    /dev/sdb2: UUID="31b39370-d28b-4056-936d-6f86e7bdff12" TYPE="xfs" PARTUUID="c6abf287-12fc-493c-8813-0d9ac1f86087" 
    /dev/sdb3: UUID="Q3eIEQ-QsNH-Zot4-GAH0-kKxs-VnQD-glFPGv" TYPE="LVM2_member" PARTUUID="5a473279-5580-4ede-95e8-bf4f4930e1e9" 
    /dev/sdb4: LABEL="Important backups" UUID="4266C56266C55777" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="9564925e-0dc1-499c-8ad0-60237843896d" 
    /dev/sdb5: LABEL="CentOS" UUID="400E2FE40E2FD1A8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="2f7116de-0313-4b51-8e94-f199e5c04dc2" 
    /dev/sdb6: LABEL="Google" UUID="684A81EC4A81B6FA" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ddda345b-177a-4783-9701-b0bc84caa267" 
    /dev/sdb7: LABEL="Stuff" UUID="FE440BC1440B7C21" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="8d2e7aea-1010-44d5-b246-0b8383ce97c5" 
    /dev/sda2: UUID="02B22DB8B22DB159" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="aed8e955-ab05-44aa-832d-b6259f6c7e17" 
    /dev/sda3: UUID="6A74253174250185" TYPE="ntfs" PARTUUID="96ab56d1-1ac8-4e39-b82c-03fa4ae14ebd" 
    /dev/sda4: LABEL="SSD" UUID="24009939009912C2" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="95d41118-4f6c-46ca-9c20-fd05b28a638e" 
    /dev/mapper/centos-root: UUID="cbaa94ca-fb50-4c15-b9b2-6fcaa63f5086" TYPE="xfs" 
    /dev/mapper/centos-swap: UUID="6d44bbd7-d20c-45f9-9cac-9186989e8f3a" TYPE="swap" 
    /dev/mapper/centos-home: UUID="1c40e7f3-c1be-41e4-a971-b26f5812760c" TYPE="xfs" 
    /dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="abf7e6f3-a94a-41e8-bae3-482932bc56fa"
as you can see, I have the windows partitions mounted

However, when I run os-prober,
Code:
    [root@localhost ~]# os-prober
    [root@localhost ~]#
It returns nothing...
So I tried manually editing grub like:


Code:
    [root@localhost etc]# vim grub2-efi.cfg
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub2-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    set pager=1
    
    if [ -s $prefix/grubenv ]; then
      load_env
    fi
    if [ "${next_entry}" ] ; then
       set default="${next_entry}"
       set next_entry=
       save_env next_entry
       set boot_once=true
    else
       set default="${saved_entry}"
    fi
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    terminal_output console
    if [ x$feature_timeout_style = xy ] ; then
      set timeout_style=menu
      set timeout=5
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
      set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/00_tuned ###
    set tuned_params=""
    set tuned_initrd=""
    ### END /etc/grub.d/00_tuned ###
    
    ### BEGIN /etc/grub.d/01_users ###
    if [ -f ${prefix}/user.cfg ]; then
      source ${prefix}/user.cfg
      if [ -n "${GRUB2_PASSWORD}" ]; then
        set superusers="root"
        export superusers
        password_pbkdf2 root ${GRUB2_PASSWORD}
      fi
    fi
    ### END /etc/grub.d/01_users ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-693.el7.x86_64-advanced-cbaa94ca-fb50-4c15-b9b2-6fcaa63f5086' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_gpt
    	insmod xfs
    	set root='hd1,gpt2'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  31b39370-d28b-4056-936d-6f86e7bdff12
    	else
    	  search --no-floppy --fs-uuid --set=root 31b39370-d28b-4056-936d-6f86e7bdff12
    	fi
    	linuxefi /vmlinuz-3.10.0-693.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet 
    	initrdefi /initramfs-3.10.0-693.el7.x86_64.img
    }
    menuentry 'CentOS Linux (0-rescue-b6e43f208d5e496e9f3478a7c353da78) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-b6e43f208d5e496e9f3478a7c353da78-advanced-cbaa94ca-fb50-4c15-b9b2-6fcaa63f5086' {
    	load_video
    	insmod gzio
    	insmod part_gpt
    	insmod xfs
    	set root='hd1,gpt2'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  31b39370-d28b-4056-936d-6f86e7bdff12
    	else
    	  search --no-floppy --fs-uuid --set=root 31b39370-d28b-4056-936d-6f86e7bdff12
    	fi
    	linuxefi /vmlinuz-0-rescue-b6e43f208d5e496e9f3478a7c353da78 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet 
    	initrdefi /initramfs-0-rescue-b6e43f208d5e496e9f3478a7c353da78.img
    }
    if [ "x$default" = 'CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)'; fi;
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_ppc_terminfo ###
    ### END /etc/grub.d/20_ppc_terminfo ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # 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 "Windows10" {
    	insmod ntfs
    	insmod ntldr
    	insmod part_msdos
    	insmod search_fs_uuid
    	search --fs-uuid --no-floppy --set=root 6A74253174250185
    	ntldr /bootmgr
    }
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
And When I select Windows10 at the GRUB screen,

It shows

Code:
error: file `/EFI/centos/x86_64-efi/ntfs.mod' not found.
error: file `/EFI/centos/x86_64-efi/ntldr.mod' not found.
error: no such device: 6A74253174250185.
error: can't find command `ntldr`
================================================================

** I have ntfs3g installed.

Code:
[root@localhost ~]# rpm -qa | grep ntfs
ntfs-3g-2017.3.23-6.el7.x86_64
** Result of fdisk -l

Code:
[root@localhost ~]# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes, 488397168 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: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  4294967295  2147483647+  ee  GPT
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: 7579DF4B-DDA7-4CEC-89B9-7D196B2E0516


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2   3277879296   3279976447      1G  Microsoft basic 
 3   3279976448   3907028991    299G  Linux LVM       
 4      1161216   1333180415  635.2G  Microsoft basic Basic data partition
 5   1333180416   1941350399    290G  Microsoft basic Basic data partition
 6   1941352448   1962323967     10G  Microsoft basic Basic data partition
 7   1962326016   3277879295  627.3G  Microsoft basic Basic data partition

Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/centos-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/centos-home: 258.9 GB, 258901803008 bytes, 505667584 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 
Old 03-13-2019, 09:05 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
why and where is this number that contains the period at the end of it? remove that period
Code:
error: no such device: 6A74253174250185.
then see if it finds it.
verify if the files are actually in this location, if not then find them and copy them into it, then try it again
Code:
error: file `/EFI/centos/x86_64-efi/ntfs.mod' not found.
error: file `/EFI/centos/x86_64-efi/ntldr.mod' not found.
ntldr
Code:
NTLDR (abbreviation of NT loader) is the boot loader for all releases of Windows NT 
operating system up to and including Windows XP and Windows Server 2003. NTLDR is 
typically run from the primary hard disk drive, but it can also run from portable storage
 devices such as a CD-ROM, USB flash drive, or floppy disk.
I don't know, I do not have windows on this laptop, just Linux, so I cannot check a grub conf to see how it writes for booting windows.

Last edited by BW-userx; 03-13-2019 at 09:09 PM.
 
Old 03-14-2019, 12:14 AM   #3
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,877
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
I don't have Windows with Grub2 either, but I would try blkid's PARTUUID for sda3, instead of the UUID, in your custom.cfg's search line, before I looked elsewhere.
 
Old 03-14-2019, 12:59 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
If I had to guess, I'd say this was a prior Win system that was "upgraded" (interesting term) to Win10.
/dev/sda being msdos (aka MBR) is very bad idea if you have Linux installed as UEFI. I have one such system, and can only boot between them by going into the firmware and choosing either Win10 or Linux. I live with it as I rarely boot Win10.
I do get the option to boot the device name (in the firmware) rather than a "Windows" entry .
 
Old 03-14-2019, 04:24 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
duplicate of https://www.linuxquestions.org/quest...-a-4175650129/
 
Old 03-14-2019, 07:01 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



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
[SOLVED] Dual boot : os-prober does not recognize updated CentOS kernel Honest Abe Linux - General 1 05-28-2018 01:54 AM
Problems with os-prober grub 2 arch linux windows 10 dual boot ihavemanhands Arch 5 11-24-2015 09:09 PM
Dual Booting LFS with os-prober + grub2. ReaperX7 Linux From Scratch 9 04-30-2014 01:32 AM
GRUB2 os-prober resulting script: where to find an explanation? JZL240I-U Linux - Software 0 04-28-2014 04:44 AM
Problems with dual boot, grub2 auto os prober mhbell Ubuntu 2 11-04-2009 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 AM.

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
Open Source Consulting | Domain Registration