Welcome to the Linux Foundation Forum!

Dual Boot of Windows 7 and Linux (Debian 7 or Centos 7)

I have been trying to Dual boot my Laptop with Windows 7 and a Linux distro between Debian 7 or Centos 7, but with both installation I am having problem. Also this is not the first time I am dual booting a system, so I am not a total newbee, but with new interface of installer and Grub2, I am struck with same probelm on both the distro

I have first installed win7 on a partition, and later installed Linux of other partition as I do regularly, but now this time neither the Grub at the time of installation asks to add another OS nor do I have a option after restart to log into win7

Next, I modified /boot/grub2/grub.cfg to add the following lines after some googling

menuentry "Something" {

insmod ntfs

set root=(hd0,1)

search --no-floppy --fs-uuid --set=root

chainloader +1

}

with this I got Wondows 7 option, when loading I get message "BOOTMGR is missing press ctrl+alt+del to restart", so I recovered BOOTMGR from windows recovery, but then Then I coudn't boot into Linux and Grub was not present, So I resuced from Centos 7 USB and then I was again not able to boot into windows7 because on BOOTMGR message.

So, in effect what I understood is both the loaders are over writing each other, in the MBR sector, I know that this is because of new UEFI storage, so can anyone giude me to dual boot on a UEFI system.

Comments

  • Well lets try this.

    install windows 7 on a partition. This will install the bootmgr in the mbr normally. However, with UEFI, the installer may ask to create a separate bois-partition.

    Make sure windows 7 boots.


    Then install CentOS 7 on another partition. When the install asks where to install the grub, install this to the mbr. This will also create a bios-grub partition as well.

    Grub in the mbr will see Linux. It should see windows. If not, log into CentOS, open a terminal and type,
    #sudo update-grub. This will read all partitions on your HDD looking for any additional operating system. Once found, it will update grub.cfg.

    I do this all the time with my systems. I have CentOS, debian and mint installed on one system.
  • The tpoint is you have all Linux partitions, and no Wimdows partition. I have followed this procedure also, but the problem is that on UEFI enable machines, GRUB rewrites MBR sector, and bootmgr required for Wimdows booting is deleted. And so even with #sudo update-grub, grub does not detects any new windoes system.

    I have even learned, that problem was their in GRUB v1 also, but is not rectified in GRUB v2. And so, I came to conclusion that on UEFI enable machines, its best to install Windows in UEFI mode and then install Linux also in UEFI mode, which is rather more straight forward, the only problem here is installing Windows in UEFI mode.

    Also, I only want Windows on my laptop because netiher Centos nor Debian are detecting Wi-Fi adaptor, so you can help me detecting my harware under linux, I can totaly move away from Window at last.
  • saqman2060
    saqman2060 Posts: 777
    edited November 2014
    There are two programs you can use to detect the hardware under Linux, lspci and lshw.
    Here is an example of lshw
    #sudo lshw
    description: Notebook
    product: HP 2000 Notebook PC (D1E80UA#ABA)
    vendor: Hewlett-Packard
    version: 0888110003305910000620100
    serial: 5CG3330Q3Y
    width: 32 bits
    capabilities: smbios-2.7 dmi-2.7 smp-1.4 smp
    configuration: boot=normal chassis=notebook cpus=1 family=103C_5335KV G=N L=CON B=HP S=PRE X=MIN sku=D1E80UA#ABA uuid=82D751CA-5D47-1C95-0696-E68369F7D050
    *-core
    description: Motherboard
    product: 188B
    vendor: Hewlett-Packard
    physical id: 0
    version: KBC Version 69.17
    serial: PCVAA00WE5B9GK
    slot: Base Board Chassis Location
    *-firmware
    description: BIOS
    vendor: Insyde
    physical id: 0
    version: F.33
    date: 05/13/2013
    size: 128KiB
    capacity: 4032KiB
    capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb uefi
    *-memory
    description: System Memory
    physical id: 23
    slot: System board or motherboard
    size: 4GiB
    *-bank:0
    description: DIMM [empty]
    product: Empty
    vendor: Empty
    physical id: 0
    serial: Empty
    slot: Bottom-Slot 1(top)
    *-bank:1
    description: SODIMM DDR3 Synchronous 800 MHz (1.2 ns)
    product: 8KTF51264HZ-1G6E1
    vendor: Micron Technology
    physical id: 1
    serial: E37B0A86
    slot: Bottom-Slot 2(under)
    size: 4GiB
    width: 64 bits
    clock: 800MHz (1.2ns)
    *-cpu
    description: CPU
    product: AMD E-300 APU with Radeon(tm) HD Graphics
    vendor: Advanced Micro Devices [AMD]
    physical id: 2d
    bus info: [email protected]
    version: 15.2.0
    serial: NotSupport
    slot: Socket FT1
    size: 1114MHz
    capacity: 1300MHz
    width: 64 bits
    clock: 100MHz
    capabilities: x86-64 boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc nonstop_tsc extd_apicid aperfmperf pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt arat hw_pstate npt lbrv svm_lock nrip_save pausefilter cpufreq
    configuration: cores=2 enabledcores=2 threads=2
    *-cache:0
    description: L1 cache
    physical id: 2e
    slot: L1 Cache
    size: 64KiB
    capacity: 128KiB
    clock: 1GHz (1.0ns)
    capabilities: pipeline-burst internal write-back unified
    *-cache:1
    description: L2 cache
    physical id: 2f
    slot: L2 Cache
    size: 512KiB
    capacity: 1MiB
    clock: 1GHz (1.0ns)
    capabilities: pipeline-burst internal write-back unified
    *-pci:0
    description: Host bridge
    product: Family 14h Processor Root Complex
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 100
    bus info: [email protected]:00:00.0
    version: 00
    width: 32 bits
    clock: 66MHz
    configuration: latency=32
    *-display
    description: VGA compatible controller
    product: Wrestler [Radeon HD 6310]
    vendor: Advanced Micro Devices, Inc. [AMD/ATI]
    physical id: 1
    bus info: [email protected]:00:01.0
    version: 00
    width: 32 bits
    clock: 33MHz
    capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
    configuration: driver=radeon latency=0
    resources: irq:44 memory:e0000000-efffffff ioport:3000(size=256) memory:f0400000-f043ffff
    *-multimedia:0
    description: Audio device
    product: Wrestler HDMI Audio
    vendor: Advanced Micro Devices, Inc. [AMD/ATI]
    physical id: 1.1
    bus info: [email protected]:00:01.1
    version: 00
    width: 32 bits
    clock: 33MHz
    capabilities: pm pciexpress msi bus_master cap_list
    configuration: driver=snd_hda_intel latency=0
    resources: irq:45 memory:f0444000-f0447fff
    *-pci:0
    description: PCI bridge
    product: Family 14h Processor Root Port
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 7
    bus info: [email protected]:00:07.0
    version: 00
    width: 32 bits
    clock: 33MHz
    capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
    configuration: driver=pcieport
    resources: irq:40 ioport:1000(size=4096) memory:f0500000-f06fffff ioport:f0700000(size=2097152)
    *-storage
    description: SATA controller
    product: FCH SATA Controller [AHCI mode]
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 11
    bus info: [email protected]:00:11.0
    version: 00
    width: 32 bits
    clock: 66MHz
    capabilities: storage msi ahci_1.0 bus_master cap_list
    configuration: driver=ahci latency=64
    resources: irq:42 ioport:3118(size=8) ioport:3124(size=4) ioport:3110(size=8) ioport:3120(size=4) ioport:3100(size=16) memory:f044c000-f044c7ff
    *-usb:0
    description: USB controller
    product: FCH USB OHCI Controller
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 12
    bus info: [email protected]:00:12.0
    version: 11
    width: 32 bits
    clock: 66MHz
    capabilities: ohci bus_master
    configuration: driver=ohci-pci latency=32
    resources: irq:18 memory:f044b000-f044bfff
    *-usb:1
    description: USB controller
    product: FCH USB EHCI Controller
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 12.2
    bus info: [email protected]:00:12.2
    version: 11
    width: 32 bits
    clock: 66MHz
    capabilities: pm debug ehci bus_master cap_list
    configuration: driver=ehci-pci latency=32
    resources: irq:17 memory:f044a000-f044a0ff
    *-usb:2
    description: USB controller
    product: FCH USB OHCI Controller
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 13
    bus info: [email protected]:00:13.0
    version: 11
    width: 32 bits
    clock: 66MHz
    capabilities: ohci bus_master
    configuration: driver=ohci-pci latency=32
    resources: irq:18 memory:f0449000-f0449fff
    *-usb:3
    description: USB controller
    product: FCH USB EHCI Controller
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 13.2
    bus info: [email protected]:00:13.2
    version: 11
    width: 32 bits
    clock: 66MHz
    capabilities: pm debug ehci bus_master cap_list
    configuration: driver=ehci-pci latency=32
    resources: irq:17 memory:f0448000-f04480ff
    *-serial UNCLAIMED
    description: SMBus
    product: FCH SMBus Controller
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 14
    bus info: [email protected]:00:14.0
    version: 14
    width: 32 bits
    clock: 66MHz
    configuration: latency=0
    *-multimedia:1
    description: Audio device
    product: FCH Azalia Controller
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 14.2
    bus info: [email protected]:00:14.2
    version: 01
    width: 64 bits
    clock: 33MHz
    capabilities: pm bus_master cap_list
    configuration: driver=snd_hda_intel latency=32
    resources: irq:16 memory:f0440000-f0443fff
    *-isa
    description: ISA bridge
    product: FCH LPC Bridge
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 14.3
    bus info: [email protected]:00:14.3
    version: 11
    width: 32 bits
    clock: 66MHz
    capabilities: isa bus_master
    configuration: latency=0
    *-pci:1
    description: PCI bridge
    product: FCH PCI Bridge
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 14.4
    bus info: [email protected]:00:14.4
    version: 40
    width: 32 bits
    clock: 66MHz
    capabilities: pci subtractive_decode bus_master
    *-pci:2
    description: PCI bridge
    product: Hudson PCI to PCI bridge (PCIE port 0)
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 15
    bus info: [email protected]:00:15.0
    version: 00
    width: 32 bits
    clock: 33MHz
    capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
    configuration: driver=pcieport
    resources: irq:16 ioport:2000(size=4096) memory:f0300000-f03fffff ioport:f0000000(size=1048576)
    *-network
    description: Ethernet interface
    product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
    vendor: Realtek Semiconductor Co., Ltd.
    physical id: 0
    bus info: [email protected]:03:00.0
    logical name: eth0
    version: 05
    serial: f0:92:1c:59:d9:be
    size: 10Mbit/s
    capacity: 100Mbit/s
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl_nic/rtl8105e-1.fw latency=0 link=no multicast=yes port=MII speed=10Mbit/s
    resources: irq:43 ioport:2000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff
    *-pci:3
    description: PCI bridge
    product: Hudson PCI to PCI bridge (PCIE port 1)
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 15.1
    bus info: [email protected]:00:15.1
    version: 00
    width: 32 bits
    clock: 33MHz
    capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
    configuration: driver=pcieport
    resources: irq:16 memory:f0200000-f02fffff ioport:f0900000(size=1048576)
    *-network
    description: Wireless interface
    product: AR9485 Wireless Network Adapter
    vendor: Qualcomm Atheros
    physical id: 0
    bus info: [email protected]:07:00.0
    logical name: wlan0
    version: 01
    serial: 48:d2:24:57:a0:b5
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
    configuration: broadcast=yes driver=ath9k driverversion=3.13.0-24-generic firmware=N/A ip=192.168.0.107 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
    resources: irq:17 memory:f0200000-f027ffff memory:f0900000-f090ffff
    *-pci:4
    description: PCI bridge
    product: Hudson PCI to PCI bridge (PCIE port 2)
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 15.2
    bus info: [email protected]:00:15.2
    version: 00
    width: 32 bits
    clock: 33MHz
    capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
    configuration: driver=pcieport
    resources: irq:16 memory:f0100000-f01fffff
    *-generic
    description: Unassigned class
    product: RTS5229 PCI Express Card Reader
    vendor: Realtek Semiconductor Co., Ltd.
    physical id: 0
    bus info: [email protected]:08:00.0
    version: 01
    width: 32 bits
    clock: 33MHz
    capabilities: pm msi pciexpress bus_master cap_list
    configuration: driver=rtsx_pci latency=0
    resources: irq:41 memory:f0100000-f0100fff
    *-pci:1
    description: Host bridge
    product: Family 12h/14h Processor Function 0
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 101
    bus info: [email protected]:00:18.0
    version: 43
    width: 32 bits
    clock: 33MHz
    *-pci:2
    description: Host bridge
    product: Family 12h/14h Processor Function 1
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 102
    bus info: [email protected]:00:18.1
    version: 00
    width: 32 bits
    clock: 33MHz
    *-pci:3
    description: Host bridge
    product: Family 12h/14h Processor Function 2
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 103
    bus info: [email protected]:00:18.2
    version: 00
    width: 32 bits
    clock: 33MHz
    *-pci:4
    description: Host bridge
    product: Family 12h/14h Processor Function 3
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 104
    bus info: [email protected]:00:18.3
    version: 00
    width: 32 bits
    clock: 33MHz
    configuration: driver=k10temp
    resources: irq:0
    *-pci:5
    description: Host bridge
    product: Family 12h/14h Processor Function 4
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 105
    bus info: [email protected]:00:18.4
    version: 00
    width: 32 bits
    clock: 33MHz
    *-pci:6
    description: Host bridge
    product: Family 12h/14h Processor Function 6
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 106
    bus info: [email protected]:00:18.5
    version: 00
    width: 32 bits
    clock: 33MHz
    *-pci:7
    description: Host bridge
    product: Family 12h/14h Processor Function 5
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 107
    bus info: [email protected]:00:18.6
    version: 00
    width: 32 bits
    clock: 33MHz
    *-pci:8
    description: Host bridge
    product: Family 12h/14h Processor Function 7
    vendor: Advanced Micro Devices, Inc. [AMD]
    physical id: 108
    bus info: [email protected]:00:18.7
    version: 00
    width: 32 bits
    clock: 33MHz
    *-scsi:0
    physical id: 1
    logical name: scsi0
    capabilities: emulated
    *-disk
    description: ATA Disk
    product: HGST HTS545032A7
    physical id: 0.0.0
    bus info: [email protected]:0.0.0
    logical name: /dev/sda
    version: GGBO
    serial: TE841348104N4A
    size: 298GiB (320GB)
    capabilities: gpt-1.00 partitioned partitioned:gpt
    configuration: ansiversion=5 guid=709aa96f-f9cd-490b-b569-d945f6d525d8 sectorsize=4096
    *-volume:0
    description: Linux swap volume
    vendor: Linux
    physical id: 1
    bus info: [email protected]:0.0.0,1
    logical name: /dev/sda1
    version: 1
    serial: b121c238-7d9d-477a-bc45-42007a97ceac
    size: 3813MiB
    capacity: 3813MiB
    capabilities: nofs swap initialized
    configuration: filesystem=swap pagesize=4095
    *-volume:1
    description: EXT4 volume
    vendor: Linux
    physical id: 2
    bus info: [email protected]:0.0.0,2
    logical name: /dev/sda2
    logical name: /
    version: 1.0
    serial: 7ed92cda-ecbc-4415-b074-feb509662efc
    size: 97GiB
    capacity: 97GiB
    capabilities: journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
    configuration: created=2014-08-31 22:38:50 filesystem=ext4 label=linuxmint1404 lastmountpoint=/ modified=2014-11-23 17:02:02 mount.fstype=ext4 mount.options=rw,relatime,errors=remount-ro,data=ordered mounted=2014-11-23 17:02:02 name=Linuxmint state=mounted
    *-volume:2
    description: EXT4 volume
    vendor: Linux
    physical id: 4
    bus info: [email protected]:0.0.0,4
    logical name: /dev/sda4
    version: 1.0
    serial: ded58174-483c-4fd5-a358-fe801534ef6c
    size: 93GiB
    capabilities: boot journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
    configuration: created=2014-05-10 12:51:19 filesystem=ext4 label=debianmobileroot lastmountpoint=/mnt modified=2014-11-22 21:24:44 mounted=2014-11-22 21:24:44 name=debianmobilerootdrive state=clean
    *-volume:3
    description: data partition
    vendor: Linux
    physical id: 6
    bus info: [email protected]:0.0.0,6
    logical name: /dev/sda6
    version: 1.0
    serial: 473113bc-7d01-423d-940e-79e2949cebd9
    size: 55GiB
    capabilities: large_files ext2 initialized
    configuration: filesystem=ext2 modified=2014-11-22 23:52:49 mounted=2014-11-18 10:54:44 name=6 state=clean
    *-scsi:1
    physical id: 2
    logical name: scsi1
    capabilities: emulated
    *-cdrom
    description: DVD-RAM writer
    product: DVDRAM GT80N
    vendor: hp
    physical id: 0.0.0
    bus info: [email protected]:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/sr0
    version: R102
    capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
    configuration: ansiversion=5 status=nodisc
    *-battery
    description: Lithium Ion Battery
    product: MU06047
    vendor: 11-85
    physical id: 1
    slot: Primary
    capacity: 47520mWh
    configuration: voltage=10.8V


    I would use lshw if you have it. When using lspci, use it with the -v option after it. I prefer lshw because of the information it collects. Very helpful. Both commands complement each other. Linux comes with manual pages for most of the programs installed, especially for commandline programs.

    #man lspci
    #man lshw

  • As for booting windows and Ubuntu on a UEFI system, I found some articles that not only teaches you what UEFI is and why it was developed but also how to dualboot windows and linux on such a system. There a few steps you have to take. Take your time and read it.

    UEFI is the new computer bios that boots up your computer and hands over the remaining boot process your operating system. Your operating system must be able to communicate with the new UEFI or EFI. Using an OS that is not UEFI compatible, one must disable UEFI or Secure Boot.

    If you have an OS installed under UEFI, you have to use UEFI. None UEFI systems must be installed using legacy bios. That means you have to manually enable and disable UEFI from your system's bios to boot your system.

    That may be the reason whay you were not seeing windows and ubuntu under the same boot menu. If you are going to use UEFI, then both OSes must be install using UEFI.

    http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

    http://technet.microsoft.com/en-us/library/hh824898.aspx

    https://help.ubuntu.com/community/Installation/UEFI-and-BIOS

    I would suggest you image your harddrive just in case something major goes wrong. You can always reverse the issue.

    Some programs that will help with disk imaging using linux.

    http://www.cyberciti.biz/open-source/linux-based-disk-cloning-imaging-software/

    For imaging and backup using windows, have a look at this site.

    http://www.howtogeek.com/howto/4241/how-to-create-a-system-image-in-windows-7/

    hope this helps.
  • nileshpkumar
    nileshpkumar Posts: 9
    edited December 2014
    Grub in the mbr will see Linux. It should see windows. If not, log into CentOS, open a terminal and type,
    #sudo update-grub. This will read all partitions on your HDD looking for any additional operating system. Once found, it will update grub.cfg.

    I do this all the time with my systems. I have CentOS, debian and mint installed on one system.




    I have now completely removed windows from my system and installed CentOS and Debian both in efi mode, and following are the partitions of both
    CentOS 7
    /dev/sda1 /bootefi
    /dev/sda2 /boot
    /dev/sda3 swap
    /dev/sda4 /
    /dev/sda5 /home

    Debian7 partitions
    /dev/sda1 /boot/efi
    /dev/sda3 swap
    /dev/sda6 /
    /dev/sda7 /home

    But the problem now is that, for dual booting i have to go to bios, and change the boot priority each time i wish to boot the other OS, also i have tried running #sudo update-grub and #sudo update-grub2 from both OS, while in both case they detect the presence of other OS but boot.cfg is not modified in both case
    So, presently i have two versions of grub installed one of CentOS and other of Debian, and both don't have the option of booting other OS
    So, please guide me what should be done so that boot.cfg is modified, i am ready to reformat the system if needed to be.
  • Is boot.cfg part of the CentOS system? If so, can you print out the contents of that file. We may need to add an entry for the other OS.

    Here is how one of my systems are listed in grub.cfg from Linuxmint 17:
    menuentry 'Linux Mint 17 Xfce 32-bit, 3.13.0-24-generic (/dev/sda2)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_gpt
    	insmod ext2
    	set root='hd0,gpt2'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  7ed92cda-ecbc-4415-b074-feb509662efc
    	else
    	  search --no-floppy --fs-uuid --set=root 7ed92cda-ecbc-4415-b074-feb509662efc
    	fi
    	linux	/boot/vmlinuz-3.13.0-24-generic root=UUID=7ed92cda-ecbc-4415-b074-feb509662efc ro   quiet splash $vt_handoff
    	initrd	/boot/initrd.img-3.13.0-24-generic
    

    By the way, is there a boot.cfg in one of those /bootefi folders?
  • $ sudo grub2-mkconfig -o /boot/grub/grub.cfg
    [sudo] password for nilesh:
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img
    Warning: Please don't use old title `CentOS Linux, with Linux 3.10.0-123.el7.x86_64' for GRUB_DEFAULT, use `Advanced options for CentOS Linux>CentOS Linux, with Linux 3.10.0-123.el7.x86_64' (for versions before 2.00) or `gnulinux-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782>gnulinux-3.10.0-123.el7.x86_64-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' (for 2.00 or later)
    Found linux image: /boot/vmlinuz-3.2.0-4-amd64
    Found initrd image: /boot/initrd.img-3.2.0-4-amd64
    Found linux image: /boot/vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53
    Found initrd image: /boot/initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    Found Debian GNU/Linux (7.6) on /dev/sda6
    done


    $ sudo grub2-mkconfig
    Generating grub configuration file ...
    #
    # 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/10_linux ###
    Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img
    Warning: Please don't use old title `CentOS Linux, with Linux 3.10.0-123.el7.x86_64' for GRUB_DEFAULT, use `Advanced options for CentOS Linux>CentOS Linux, with Linux 3.10.0-123.el7.x86_64' (for versions before 2.00) or `gnulinux-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782>gnulinux-3.10.0-123.el7.x86_64-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' (for 2.00 or later)
    menuentry 'CentOS Linux, with Linux 3.10.0-123.el7.x86_64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linuxefi /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=bcc2553a-8cd1-4cd1-97fd-a27096a51782 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet
    initrdefi /initramfs-3.10.0-123.el7.x86_64.img
    }
    Found linux image: /boot/vmlinuz-3.2.0-4-amd64
    Found initrd image: /boot/initrd.img-3.2.0-4-amd64
    menuentry 'CentOS Linux, with Linux 3.2.0-4-amd64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.2.0-4-amd64-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linuxefi /vmlinuz-3.2.0-4-amd64 root=UUID=bcc2553a-8cd1-4cd1-97fd-a27096a51782 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet
    initrdefi /initrd.img-3.2.0-4-amd64
    }
    Found linux image: /boot/vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53
    Found initrd image: /boot/initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    menuentry 'CentOS Linux, with Linux 0-rescue-d327e0d3a7774d9a99721afb1894de53' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d327e0d3a7774d9a99721afb1894de53-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' {
    load_video
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linuxefi /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=UUID=bcc2553a-8cd1-4cd1-97fd-a27096a51782 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet
    initrdefi /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    if [ "x$default" = 'CentOS Linux, with Linux 3.10.0-123.el7.x86_64' ]; then default='Advanced options for CentOS Linux>CentOS Linux, with Linux 3.10.0-123.el7.x86_64'; 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 ###
    Found Debian GNU/Linux (7.6) on /dev/sda6
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    submenu 'Advanced options for Debian GNU/Linux (7.6) (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10.0-123.el7.x86_64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.10.0-123.el7.x86_64 root=/dev/sda6
    initrd /initramfs-3.10.0-123.el7.x86_64.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.2.0-4-amd64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.2.0-4-amd64 root=/dev/sda6
    initrd /initrd.img-3.2.0-4-amd64
    }
    }

    ### 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.
    ### 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 ###
    done


    The above are the o/p of the 2 commands run, and attached is the grub.cfg file from Centos7 system, and this boot.cfg is present in /boot/grub/grub.cfg and only one file is present in /boot/efi folder as given below
    $ sudo ls -lh /boot/efi
    total 2.0K
    drwx
    . 5 root root 2.0K Nov 30 19:53 EFI
  • The boot.cfg file was not uploaded above the content of the file I am pasting here again

    #
    # 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/10_linux ###
    menuentry 'CentOS Linux, with Linux 3.10.0-123.el7.x86_64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linuxefi /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=bcc2553a-8cd1-4cd1-97fd-a27096a51782 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet
    initrdefi /initramfs-3.10.0-123.el7.x86_64.img
    }
    menuentry 'CentOS Linux, with Linux 3.2.0-4-amd64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.2.0-4-amd64-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linuxefi /vmlinuz-3.2.0-4-amd64 root=UUID=bcc2553a-8cd1-4cd1-97fd-a27096a51782 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet
    initrdefi /initrd.img-3.2.0-4-amd64
    }
    menuentry 'CentOS Linux, with Linux 0-rescue-d327e0d3a7774d9a99721afb1894de53' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d327e0d3a7774d9a99721afb1894de53-advanced-bcc2553a-8cd1-4cd1-97fd-a27096a51782' {
    load_video
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linuxefi /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=UUID=bcc2553a-8cd1-4cd1-97fd-a27096a51782 ro vconsole.keymap=us crashkernel=auto vconsole.font=latarcyrheb-sun16 rhgb quiet
    initrdefi /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    if [ "x$default" = 'CentOS Linux, with Linux 3.10.0-123.el7.x86_64' ]; then default='Advanced options for CentOS Linux>CentOS Linux, with Linux 3.10.0-123.el7.x86_64'; 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 ###
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    submenu 'Advanced options for Debian GNU/Linux (7.6) (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10.0-123.el7.x86_64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.10.0-123.el7.x86_64 root=/dev/sda6
    initrd /initramfs-3.10.0-123.el7.x86_64.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.2.0-4-amd64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.2.0-4-amd64 root=/dev/sda6
    initrd /initrd.img-3.2.0-4-amd64
    }
    }

    ### 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.
    ### 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 ###
  • Both those files look alike.

    Ok, lets try something. Back a backup of both the grub.cfg and the boot.cfg files. I like nano but you are free to use whatever works. Save the backup copies of the files as, grub.cfg.backup, and, bott.cfg.backup. Keep then in the directory of their original files.

    Open grub.cfg in a terminal or gui editor. I gui editor like gedit may be easier.

    Copy the header section representing debian;

    Found Debian GNU/Linux (7.6) on /dev/sda6
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    submenu 'Advanced options for Debian GNU/Linux (7.6) (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10.0-123.el7.x86_64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.10.0-123.el7.x86_64 root=/dev/sda6
    initrd /initramfs-3.10.0-123.el7.x86_64.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.2.0-4-amd64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.2.0-4-amd64 root=/dev/sda6
    initrd /initrd.img-3.2.0-4-amd64
    }
    }


    Paste it under the last line from the header section representing CentOS;

    if [ "x$default" = 'CentOS Linux, with Linux 3.10.0-123.el7.x86_64' ]; then default='Advanced options for CentOS Linux>CentOS Linux, with Linux 3.10.0-123.el7.x86_64'; fi;

    Found Debian GNU/Linux (7.6) on /dev/sda6
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    submenu 'Advanced options for Debian GNU/Linux (7.6) (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-0-rescue-d327e0d3a7774d9a99721afb1894de53 root=/dev/sda6
    initrd /initramfs-0-rescue-d327e0d3a7774d9a99721afb1894de53.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10.0-123.el7.x86_64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.10.0-123.el7.x86_64 root=/dev/sda6
    initrd /initramfs-3.10.0-123.el7.x86_64.img
    }
    menuentry 'Debian GNU/Linux (7.6) (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.2.0-4-amd64--5168491d-deb3-4360-8e0b-e6e6eea6fa8b' {
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 04a2e9c1-bc97-43b2-aeea-ae622405a288
    else
    search --no-floppy --fs-uuid --set=root 04a2e9c1-bc97-43b2-aeea-ae622405a288
    fi
    linux /vmlinuz-3.2.0-4-amd64 root=/dev/sda6
    initrd /initrd.img-3.2.0-4-amd64
    }
    }


    The text in between the beginning header;
    ### BEGIN /etc/grub.d/30_os-prober ###

    and the ending header;
    ### END /etc/grub.d/30_os-prober ###

    should either be commented out or deleted. Commenting them out would be easier for the purpose of reversing what we did. Save the file, and reboot your system. Pay close attention to what the output of the boot process reports.



  • We may need to edit this files /etc/grub.d/10_linux directly if these previous experiment does not work.

    I never like to re-install an OS as the first choice to fixing a problem. You will learn more if you try to troubleshoot an issue manually. Re-install an OS if all other troubleshooting options fail.

    Always keep a second working system as a backup. You want to make sure you are productive in the event of a system failure. You still have two working Linux systems, CentOS and Debian. The bios requires you to manually choose an OS to boot. Make sure you still have that option. The fact that you can still boot-up a system is a plus.

    Since we will be working with CentOS, keep debian as your working backup.

Categories

Upcoming Training