Centos7 com problemas de dualboot do Windows 8

1

Eu instalei o CentOS7 ao invés do Ubuntu.
Eu também tinha o Windows 8 instalado.
Depois de instalar o CentOS7, não consigo executar o Windows.
Meu laptop: ASUS R510J

script de inicialização:

                  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

E /etc/grub.d/40_custom file:

#!/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
}

Eu tentei um monte de mix de nome de partições ou chainloader. Eu li que alguém teve problemas com nomes de inicialização EFI errados depois de instalar o CentOS7. Eu tentei também copiar arquivos EFI corretos em partição de windows inicializável

retorno de su ~ sudo grub2-mkconfig -o /boot/grub2/grub.cfg é sempre o mesmo.

De qualquer forma, na BIOS, eu adiciono a opção bootable from uefi e o Windows 8 aparece no grub, mas depois de escolher: equandoclicoem'e': Eu tentei alterar a partição raiz e o chainloader também.

Instalei o ntfs-3d, epel e tudo mais para funcionar. Eu posso ver arquivos do Windows a partir do Centos.

Eu gostaria de ficar feliz por qualquer ajuda. Se for possível eu não gostaria de reinstalar o Windows ou o CentOS ...

    
por Konrad Siamro 24.04.2016 / 18:54

1 resposta

0

Encontre a partição correta em que o bootmgfw.efi reside e defina a partição raiz de acordo. Para encontrar a partição na qual o bootmgfw.efi reside, vá para o modo de recuperação do grub (pressione 'e' e depois F2 ) e digite ls . Isto irá mostrar-lhe as partições (ambas as janelas e centos). Por tentativa e erro, tente localizar o bootmgfw.efi, dizendo ls (hd0,gpt1) e assim por diante. Depois de localizar a partição que possui bootmgfw.efi, forneça essa partição na linha set root= . Isso deve então localizar o gerenciador de inicialização do Windows efi e permitir que você inicialize no Windows.

    
por 26.04.2016 / 14:41

Tags