New
#1
Windows 7 & Centos 7 Dual Boot Issues - Grub2 BOOTMGR missing message
Dear All,
I was having windows 7 and centos 6.8 dual boot working fine. I upgraded to centos 7. All my problem starts from this point onwards.
Some analysis which i have done till now:
1. Windows 7 has boot partition. I do not have it. (Accidental deleted or didn't had, i am not sure)
2. Centos boot partition of type xfs is there in the drive.
3. I already have 4 partitions on my disk, so i cannot have a new one.
Options available to me:
1. Create a boot partition of type ISO9660, which can be shared between linux and windows.
2. Migrate my Centos boot partition to this new ISO9660 partition. (how to do that, i still do not know)
3. Install windows 7 boot files on this partition, using windows disk? (not sure how will i do that)
OR
4. I can still achieve dual boot without doing the madness explained in 1-3. How, i don't know. Are there any tools and scripts which can confirm that?
Thanks Kapil.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is my laptop. 1 disk and multiple partitions scenario.
fdisk -l
-------------
Disk /dev/sda: 320.1 GB, 320072933376 bytes, 625142448 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: dos
Disk identifier: 0x009304de
Device Boot Start End Blocks Id System
/dev/sda1 * 209717248 211814399 1048576 83 Linux
/dev/sda2 206848 209717247 104755200 7 HPFS/NTFS/exFAT
/dev/sda3 211814400 419432447 103809024 8e Linux LVM
/dev/sda4 419432448 625141759 102854656 5 Extended
/dev/sda5 436215808 625141759 94462976 7 HPFS/NTFS/exFAT
Partition table entries are not in disk order
Disk /dev/mapper/cl-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/cl-swap: 8321 MB, 8321499136 bytes, 16252928 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-home: 44.3 GB, 44283461632 bytes, 86491136 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
------------------------------------------------------------------------------------------------------------------------------------
After providing following entries in /etc/grub.d/40_custom
cat <<EOF
menuentry "Windows 7" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
chainloader +1
ntldr /bootmgr
}
EOF
grub2-makeconfig doesn't recognize Windows as OS. I believe this is because in /boot there is nothing for windows.
Due to this in boot prompt i get Windows 7 option. When i try it, it tells bootmgr missing.
I also read about windows 7 having a boot partition. But i am sure i was not having one. Also how can i validate the same i.e. That /dev/sda2 contains the boot partition, or boot partition is deleted ?
Would be grateful, if some direction can be shared.
UPDATE 1:
Boot Info Script Output.
-----------------------------------------------------------------------------------------------
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img, but core.img can not be found at this
location.
sda1: __________________________________________________________________________
File system: xfs
Boot sector type: -
Boot sector info:
Operating System:
Boot files: /grub2/grub.cfg
sda2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
sda3: __________________________________________________________________________
File system: LVM2_member
Boot sector type: -
Boot sector info:
sda4: __________________________________________________________________________
File system: Extended Partition
Boot sector type: Unknown
Boot sector info:
sda5: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7: NTFS
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 2048.
Operating System:
Boot files:
cl-root': ______________________________________________________________________
File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
cl-home': ______________________________________________________________________
File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
mount: unknown filesystem type ''
cl-swap': ______________________________________________________________________
File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 320.1 GB, 320072933376 bytes, 625142448 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
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 209,717,248 211,814,399 2,097,152 83 Linux
/dev/sda2 * 206,848 209,717,247 209,510,400 7 NTFS / exFAT / HPFS
/dev/sda3 211,814,400 419,432,447 207,618,048 8e Linux LVM
/dev/sda4 419,432,448 625,141,759 205,709,312 5 Extended
/dev/sda5 436,215,808 625,141,759 188,925,952 7 NTFS / exFAT / HPFS
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/mapper/cl-home 443fb897-fc16-4977-b1f0-e3208d6b2957 xfs
/dev/mapper/cl-root 360f5e2c-f0a9-474d-ba69-7a0ab297e59e xfs
/dev/mapper/cl-swap d7630c88-df11-4a65-befc-2b0ea843a3b7 swap
/dev/sda1 f1ed9afd-0e07-43e2-af59-746e03181b28 xfs
/dev/sda2 988CA8A28CA87C7E ntfs
/dev/sda3 Oz6ERC-56W2-Xdf7-3aUD-B9GP-VZPP-ytBAva LVM2_member
/dev/sda5 78FCDB66FCDB1D66 ntfs New Volume
========================= "ls -R /dev/mapper/" output: =========================
/dev/mapper:
cl-home
cl-root
cl-swap
control
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/mapper/cl-home /home xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/cl-root / xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/sda1 /boot xfs (rw,relatime,seclabel,attr2,inode64,noquota)
============================= sda1/grub2/grub.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=""
### 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-514.6.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-514.6.1.el7.x86_64-advanced-360f5e2c-f0a9-474d-ba69-7a0ab297e59e' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' f1ed9afd-0e07-43e2-af59-746e03181b28
else
search --no-floppy --fs-uuid --set=root f1ed9afd-0e07-43e2-af59-746e03181b28
fi
linux16 /vmlinuz-3.10.0-514.6.1.el7.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet
initrd16 /initramfs-3.10.0-514.6.1.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-514.el7.x86_64-advanced-360f5e2c-f0a9-474d-ba69-7a0ab297e59e' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' f1ed9afd-0e07-43e2-af59-746e03181b28
else
search --no-floppy --fs-uuid --set=root f1ed9afd-0e07-43e2-af59-746e03181b28
fi
linux16 /vmlinuz-3.10.0-514.el7.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet
initrd16 /initramfs-3.10.0-514.el7.x86_64.img
}
menuentry 'CentOS Linux (0-rescue-f1baebdcc1d74b59993924b6988571f1) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-f1baebdcc1d74b59993924b6988571f1-advanced-360f5e2c-f0a9-474d-ba69-7a0ab297e59e' {
load_video
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' f1ed9afd-0e07-43e2-af59-746e03181b28
else
search --no-floppy --fs-uuid --set=root f1ed9afd-0e07-43e2-af59-746e03181b28
fi
linux16 /vmlinuz-0-rescue-f1baebdcc1d74b59993924b6988571f1 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet
initrd16 /initramfs-0-rescue-f1baebdcc1d74b59993924b6988571f1.img
}
if [ "x$default" = 'CentOS Linux (3.10.0-514.6.1.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-514.6.1.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 ###
menuentry "Windows 7" {
set root='(hd0,msdos2)'
chainloader +1
}
### 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 ###
--------------------------------------------------------------------------------
=================== sda1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
======================== Unknown MBRs/Boot Sectors/etc: ========================
Unknown BootLoader on sda4
00000000 92 29 02 f2 6e f9 5e 21 58 cf c9 f7 5e 23 81 71 |.)..n.^!X...^#.q|
00000010 f6 b9 36 d8 d3 25 93 49 fa 34 54 89 85 3f 89 0d |..6..%.I.4T..?..|
00000020 fc 68 ab 1c c1 58 f9 66 65 8c 72 db 93 13 71 60 |.h...X.fe.r...q`|
00000030 f9 ea 67 b5 6d ae bc cf 9d de b2 ae 34 76 d4 2d |..g.m.......4v.-|
00000040 ce 1b ff 0d 20 70 46 c3 88 57 79 96 19 8a 39 c1 |.... pF..Wy...9.|
00000050 b7 52 c6 db f8 1a 11 0d 18 67 f1 82 3f c8 b7 9e |.R.......g..?...|
00000060 88 ac 61 6b 7a 91 c4 a5 2b 6d 38 0d bb 6f 41 26 |..akz...+m8..oA&|
00000070 16 84 9e 1c 6c c1 23 6b 12 e5 88 3e 2c bc cc 92 |....l.#k...>,...|
00000080 86 3e 4d d5 8d 6c 90 8c 59 56 92 4c 21 09 27 6e |.>M..l..YV.L!.'n|
00000090 d9 69 4e f1 8e bb 2f 9e 29 f0 e9 98 3b 64 29 87 |.iN.../.)...;d).|
000000a0 3d 85 a8 ce e9 8a c2 27 41 73 3d 5a f7 37 a9 ee |=......'As=Z.7..|
000000b0 31 10 3a 17 b2 6a d4 f6 41 55 6a 74 b0 77 cc ba |1.:..j..AUjt.w..|
000000c0 1c ea a9 73 c1 05 a2 56 cd 7b 83 70 ef 17 00 6a |...s...V.{.p...j|
000000d0 04 a4 96 8c 6c 9f b5 24 b3 cc 0b c8 28 3f a2 b9 |....l..$....(?..|
000000e0 61 e0 b4 58 63 a4 7b 3b 33 96 04 1b be c0 0d ae |a..Xc.{;3.......|
000000f0 12 eb 6f b1 4b b3 d8 14 6a 34 6a 16 9e c1 9d 2b |..o.K...j4j....+|
00000100 f7 41 c6 cc e4 d4 44 97 6f b5 89 07 55 c4 68 0f |.A....D.o...U.h.|
00000110 ea ea ee 8e e4 d2 e9 be 13 47 23 7f 30 31 22 de |.........G#.01".|
00000120 f7 ab 2c d5 e5 60 88 1c 65 eb 82 2b b8 fb 0b 64 |..,..`..e..+...d|
00000130 26 17 84 47 b4 2f 9a 3c 36 a7 0b 7a 70 d2 b5 e5 |&..G./.<6..zp...|
00000140 1e 7e 69 d1 35 87 88 a4 a9 2e 03 dd d2 f9 fc d3 |.~i.5...........|
00000150 9d b4 8c ad 14 ca 24 f7 0f fb 8f c2 4f 24 d4 9f |......$.....O$..|
00000160 77 3c 83 b7 72 58 da 4e f0 24 71 ef 04 c0 f6 42 |w<..rX.N.$q....B|
00000170 a3 eb 80 60 05 23 e2 1b 0f d3 a2 82 06 4a a1 44 |...`.#.......J.D|
00000180 08 a5 de 5b 4b bd c8 8c c6 97 b9 fa 3e 68 dc 4c |...[K.......>h.L|
00000190 93 a5 89 c9 2a 5d 17 24 18 9c 3d 8d 6d 34 f2 02 |....*].$..=.m4..|
000001a0 52 0b b3 32 04 98 dd b1 c6 2b c4 56 42 ee 07 31 |R..2.....+.VB..1|
000001b0 2e 0e 88 06 03 f6 c2 94 5d 6a d3 d7 e1 8d 00 fe |........]j......|
000001c0 ff ff 07 fe ff ff 00 18 00 01 00 c8 42 0b 00 00 |............B...|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
Unknown BootLoader on cl-root'
Unknown BootLoader on cl-home'
Unknown BootLoader on cl-swap'
=============================== StdErr Messages: ===============================
cat: /tmp/BootInfo-0nAnSLez/Tmp_Log: No such file or directory
Failed to find logical volume "cl/root'"
Failed to find logical volume "cl/root'"
Failed to find logical volume "cl/root'"
hexdump: /dev/mapper/cl-root': No such file or directory
hexdump: stdin: Bad file descriptor
hexdump: /dev/mapper/cl-root': No such file or directory
hexdump: all input file arguments failed
Failed to find logical volume "cl/home'"
Failed to find logical volume "cl/home'"
Failed to find logical volume "cl/home'"
hexdump: /dev/mapper/cl-home': No such file or directory
hexdump: stdin: Bad file descriptor
hexdump: /dev/mapper/cl-home': No such file or directory
hexdump: all input file arguments failed
Failed to find logical volume "cl/swap'"
Failed to find logical volume "cl/swap'"
Failed to find logical volume "cl/swap'"
hexdump: /dev/mapper/cl-swap': No such file or directory
hexdump: stdin: Bad file descriptor
hexdump: /dev/mapper/cl-swap': No such file or directory
hexdump: all input file arguments failed
mdadm: No arrays found in config file or automatically