Here is some background. I had a 1TB HDD with Windows inside it. Partitions something like this:
I bought an another hard drive of 2TB and wanted to dedicate 1TB to Windows and another to Linux. Here is a screenshot of the second hard drive.
As you can see, sda2
had Windows bootloader at time of installing CentOS 7. I intentionally tried to install CentOS bootloader (i.e. grub?) in first hard drive so that CentOS can detect it. But seems like CentOS couldn't detect Windows even after that.
Here's my output from fdisk -l
if screenshot is not enough:
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
# Start End Size Type Name
1 34 262177 128M Microsoft reser Microsoft reserved partition
Partition 1 does not start on physical sector boundary.
2 264192 1953646591 931.5G Microsoft basic Basic data partition
3 1953646592 1955743743 1G Microsoft basic
4 1955743744 3907028991 930.5G Linux LVM
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 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
# Start End Size Type Name
1 2048 616447 300M Windows recover Basic data partition
2 616448 819199 99M EFI System EFI system partition
3 819200 1081343 128M Microsoft reser Microsoft reserved partition
4 1081344 1048575999 499.5G Microsoft basic Basic data partition
5 1048576000 1887436799 400G Microsoft basic Basic data partition
6 1887436800 1953521663 31.5G Microsoft basic Basic data partition
7 1953521664 1953523711 1M BIOS boot parti
Disk /dev/mapper/cl-01: 981.9 GB, 981873983488 bytes, 1917722624 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/cl-00: 17.2 GB, 17179869184 bytes, 33554432 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/luks-13bc4611-477c-4df5-bfb7-b2bbd696e18b: 981.9 GB, 981871886336 bytes, 1917718528 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
I researched a bit and found that I can do update-grub
command. But that here is not possible. CentOS 7 uses different grub than Ubuntu's grub (correct me if I am wrong).
I also found a grub2-mkconfig
method, but this command doesn't finds Windows bootloader:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-514.26.2.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.26.2.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-fd2ff737d87642cc87d59785cf5f2390
Found initrd image: /boot/initramfs-0-rescue-fd2ff737d87642cc87d59785cf5f2390.img
done
This is a UEFI capable computer.
I made a discovery, found this:
Is this of any use?