Centos7 및 Windows 8 듀얼 부팅 문제

Centos7 및 Windows 8 듀얼 부팅 문제

Ubuntu 대신 CentOS7을 설치했습니다.
저도 윈도우8이 설치되어 있습니다.
CentOS7을 설치한 후 Windows를 실행할 수 없습니다.
내 노트북: ASUS R510J

시작 스크립트:

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => No boot loader is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT16
    Boot sector info:  According to the info in the boot sector, sda1 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda1 starts at sector 2048.
    Operating System:  
    Boot files:        

sda2: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD

sda3: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: unknown filesystem type ''

sda4: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /bootmgr /Boot/BCD /Windows/System32/winload.exe

sda5: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda6: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        

sda7: __________________________________________________________________________

    File system:       xfs
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        /grub2/grub.cfg

sda8: __________________________________________________________________________

    File system:       LVM2_member
    Boot sector type:  -
    Boot sector info: 

centos-root': __________________________________________________________________

    File system:       
    Boot sector type:  Unknown
    Boot sector info: 
    Mounting failed:   mount: unknown filesystem type ''
mount: unknown filesystem type ''

centos-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: 480.1 GB, 480103981056 bytes, 937703088 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

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1   937,703,087   937,703,087  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048       206,847       204,800 EFI System partition
/dev/sda2         206,848     2,050,047     1,843,200 Windows Recovery Environment (Windows)
/dev/sda3       2,050,048     2,312,191       262,144 Microsoft Reserved Partition (Windows)
/dev/sda4       2,312,192   195,117,055   192,804,864 Data partition (Windows/Linux)
/dev/sda5     377,391,104   906,223,615   528,832,512 Data partition (Windows/Linux)
/dev/sda6     906,223,616   937,701,375    31,477,760 Windows Recovery Environment (Windows)
/dev/sda7     195,117,056   196,141,055     1,024,000 Data partition (Windows/Linux)
/dev/sda8     196,141,056   376,244,223   180,103,168 Logical Volume Manager (LVM) partition (Linux)

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/mapper/centos-root 8fd14e11-094d-4eb3-962a-f59e92fbb93a   xfs        
/dev/mapper/centos-swap 08c14e2d-e869-4185-8604-802330769b3f   swap       
/dev/sda1        44E0-3EBB                              vfat       
/dev/sda2        A26E27356E2701A1                       ntfs       Recovery
/dev/sda3                                                          
/dev/sda4        8C7A1FC27A1FA7CA                       ntfs       OS
/dev/sda5        445E1D585E1D43D8                       ntfs       Data
/dev/sda6        8E082DDA082DC257                       ntfs       Restore
/dev/sda7        7eb2363a-e4fe-49eb-b437-49935fde30be   xfs        
/dev/sda8        EIKhsp-vfTS-ONfc-3vQ9-Wpfr-Ob2w-pYCTaM LVM2_member 

========================= "ls -R /dev/mapper/" output: =========================

/dev/mapper:
centos-root
centos-swap
control

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/mapper/centos-root /                        xfs        (rw,relatime,attr2,inode64,noquota)
/dev/sda1        /boot/efi                vfat       (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro)
/dev/sda7        /boot                    xfs        (rw,relatime,attr2,inode64,noquota)


============================= sda7/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 (4.5.0-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.5.0-1.el7.elrepo.x86_64-advanced-8fd14e11-094d-4eb3-962a-f59e92fbb93a' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  7eb2363a-e4fe-49eb-b437-49935fde30be
    else
      search --no-floppy --fs-uuid --set=root 7eb2363a-e4fe-49eb-b437-49935fde30be
    fi
    linuxefi /vmlinuz-4.5.0-1.el7.elrepo.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rdblacklist=nouveau 
    initrdefi /initramfs-4.5.0-1.el7.elrepo.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-327.13.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.13.1.el7.x86_64-advanced-8fd14e11-094d-4eb3-962a-f59e92fbb93a' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  7eb2363a-e4fe-49eb-b437-49935fde30be
    else
      search --no-floppy --fs-uuid --set=root 7eb2363a-e4fe-49eb-b437-49935fde30be
    fi
    linuxefi /vmlinuz-3.10.0-327.13.1.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rdblacklist=nouveau 
    initrdefi /initramfs-3.10.0-327.13.1.el7.x86_64.img
}
menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-8fd14e11-094d-4eb3-962a-f59e92fbb93a' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  7eb2363a-e4fe-49eb-b437-49935fde30be
    else
      search --no-floppy --fs-uuid --set=root 7eb2363a-e4fe-49eb-b437-49935fde30be
    fi
    linuxefi /vmlinuz-3.10.0-327.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rdblacklist=nouveau 
    initrdefi /initramfs-3.10.0-327.el7.x86_64.img
}
menuentry 'CentOS Linux (0-rescue-2cc685281d934fa0a98912fc50f1893d) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-2cc685281d934fa0a98912fc50f1893d-advanced-8fd14e11-094d-4eb3-962a-f59e92fbb93a' {
    load_video
    insmod gzio
    insmod part_gpt
    insmod xfs
    set root='hd0,gpt7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7  7eb2363a-e4fe-49eb-b437-49935fde30be
    else
      search --no-floppy --fs-uuid --set=root 7eb2363a-e4fe-49eb-b437-49935fde30be
    fi
    linuxefi /vmlinuz-0-rescue-2cc685281d934fa0a98912fc50f1893d root=/dev/mapper/centos-root ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rdblacklist=nouveau 
    initrdefi /initramfs-0-rescue-2cc685281d934fa0a98912fc50f1893d.img
}

### 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 "Windows 8" {
#   set root='(hd0,2)'
#   chainloader +1
#}

menuentry "Windows 8" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt3)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}


#menuentry 'Windows 8 (loader)' {
#        insmod part_msdos
#        insmod ntfs
#        set root='hd0,msdos1'
#        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 ###
--------------------------------------------------------------------------------

=================== sda7: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on centos-root'


Unknown BootLoader on centos-swap'



=============================== StdErr Messages: ===============================

cat: /tmp/BootInfo-S4HqYaMe/Tmp_Log: No such file or directory
  Failed to find logical volume "centos/root'"
  Failed to find logical volume "centos/root'"
  Failed to find logical volume "centos/root'"
hexdump: /dev/mapper/centos-root': No such file or directory
hexdump: stdin: Bad file descriptor
hexdump: /dev/mapper/centos-root': No such file or directory
hexdump: all input file arguments failed
  Failed to find logical volume "centos/swap'"
  Failed to find logical volume "centos/swap'"
  Failed to find logical volume "centos/swap'"
hexdump: /dev/mapper/centos-swap': No such file or directory
hexdump: stdin: Bad file descriptor
hexdump: /dev/mapper/centos-swap': No such file or directory
hexdump: all input file arguments failed
mdadm: No arrays found in config file or automatically

fdisk -l:

➜  ~ sudo fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 480.1 GB, 480103981056 bytes, 937703088 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: gpt


#         Start          End    Size  Type            Name
 1         2048       206847    100M  EFI System      EFI System Partition
 2       206848      2050047    900M  Windows recover Basic data partition
 3      2050048      2312191    128M  Microsoft reser Microsoft reserved partition
 4      2312192    195117055     92G  Microsoft basic Basic data partition
 5    377391104    906223615  252.2G  Microsoft basic Basic data partition
 6    906223616    937701375     15G  Windows recover Basic data partition
 7    195117056    196141055    500M  Microsoft basic 
 8    196141056    376244223   85.9G  Linux LVM       

Disk /dev/mapper/centos-root: 85.9 GB, 85899345920 bytes, 167772160 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 /dev/mapper/centos-swap: 6308 MB, 6308233216 bytes, 12320768 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 /dev/sdb: 4009 MB, 4009754624 bytes, 7831552 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/sdb1   *         128     7831551     3915712    b  W95 FAT32

sudo grub2-mkconfig -o /boot/grub2/grub.cfg:

➜  ~ sudo grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.5.0-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.5.0-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.13.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.13.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-2cc685281d934fa0a98912fc50f1893d
Found initrd image: /boot/initramfs-0-rescue-2cc685281d934fa0a98912fc50f1893d.img
done

및 /etc/grub.d/40_custom 파일:

#!/bin/sh
exec tail -n +3 $0
# 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 "Windows 8" {
#   set root='(hd0,6)'
#   chainloader +1
#}

#menuentry "Windows 8" {
#    insmod part_gpt
#    insmod chain
#    set root='(hd0,gpt1)'
#    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
#}


#menuentry 'Windows 8 (loader)' {
#        insmod part_msdos
#        insmod ntfs
#        set root='hd0,msdos1'
#   chainloader +1
#        ntldr /bootmgr
#}

menuentry "Windows 8" {
insmod part_gpt
insmod ntfs
insmod search_fs_uuid
insmod chain
chainloader /EFI/BOOT/BOOTX64.EFI
}

저는 파티션 이름이나 체인 로더를 다양하게 혼합해 보았습니다. CentOS7을 설치한 후 누군가 잘못된 EFI 부팅 이름에 문제가 있다는 것을 읽었습니다. 또한 올바른 EFI 파일을 부팅 가능한 Windows 파티션에 복사해 보았습니다.

➜ ~ sudo grub2-mkconfig -o /boot/grub2/grub.cfg의 반환은 항상 동일합니다.

어쨌든 BIOS에서 uefi에서 부팅하는 옵션을 추가했는데 Windows 8이 grub에 표시되지만 다음을 선택하면 다음과 같습니다. 여기에 이미지 설명을 입력하세요. "e"를 클릭하면: 여기에 이미지 설명을 입력하세요. 또한 루트 파티션과 체인 로더를 변경해 보았습니다.

나는 그것을 실행하기 위해 ntfs-3d, epel 및 기타 모든 것을 설치했습니다. Centos에서 Windows 파일을 볼 수 있습니다.

어떤 도움이라도 받고 싶습니다. 가능하면 Windows나 CentOS를 다시 설치하고 싶지 않습니다.

답변1

bootmgfw.efi가 있는 올바른 파티션을 찾아 그에 따라 루트 파티션을 설정하십시오. bootmgfw.efi가 있는 파티션을 찾으려면 grub 복구 모드로 들어가십시오(누름)'이자형'그런 다음F2)를 입력한 다음엘에스. 그러면 파티션(windows 및 centos)이 표시됩니다. 시행착오를 통해 ls (hd0,gpt1)말 등을 제공하여 bootmgfw.efi를 찾으 십시오. bootmgfw.efi가 포함된 파티션을 찾으면 해당 파티션을 라인에 지정하십시오 set root=. 그러면 Windows efi 부팅 관리자를 찾아 Windows로 부팅할 수 있습니다.

관련 정보