µ±Ç°Î»ÖÃ: > CentOS > CentOS½Ì³Ì >

Ԥװwin8 centos ˫ϵͳ Ë«Ó²ÅÌ efi Æô¶¯

ʱ¼ä:2014-05-02 14:39À´Ô´:linux.it.net.cn ×÷Õß:ITÍø

¸ÕÂòµÄthinkpad t430u 64λµÄ±Ê¼Ç±¾£¬·¢ÏÖ×°linuxÊÇÒ»¼þ·Ç³£Âé·³µÄÊ£¬ÒÔÇ°×°¸ölinuxϵͳ,ÅäÖÃË«Æô£¬1¸öСʱ¾ÍÄܸ㶨£¬¶øÕâÒ»´ÎÎÒÁ¬×°centos6.4´øÅäÖÃË«Æô£¬»¨ÁËÈý¸öÐÇÆÚ¡£Ë«Æôºó³É¹¦ºóÓÖ×°ÁËarch£¬ÏÖÔڱʼDZ¾ÊÇÈýϵͳ£¬ÈýÖܵÄʱ¼äÀ±Ê¼Ç±¾ÖØÆô²»ÏÂ300´Î¡£ÎÒÒ²²»ÖªµÀÄܲ»Äܳɹ¦£¬ËùÒÔÊÂÏÈ£¬²¢Ã»ÓÐ×öÏêϸµÄ±Ê¼Ç¡£ËùÒÔÏÂÃ棬ֻÊÇ´óÖµļǼ¡£×¢Ò⣬ÔÚʵ¼Ê²Ù×÷Ç°£¬Ò»¶¨Òª°ÑÕâƪ²©¿ÍºÃºÃ¿´¼¸±é£¬Àí½âÇå³þ£¬ÔÚ²Ù×÷¡£

 

Ò»£¬¹Ø±Õsecure boot

¿ª»ú°´F1½øÈëbios=>security=>secure boot

±Ê¼Ç±¾²»Í¬£¬¿ÉÄÜsecure bootµÄÅäÖò»Í¬£¬½«Æädisabledµô£¬Òª²»È»£¬Ñ¡ÔñUÅÌÆô¶¯£¬¹âÅÌÆô¶¯¶¼ÎÞЧ£¬±¨Ã»ÓÐȨÏÞ¡£

¶þ£¬biosÀïÃæÅäÖÃÆô¶¯ÏĬÈÏefi only£¬¸ÄΪboth

bios=>startup=>uefi/legacy boot

Æô¶¯ÓÅÏȼ¶ÀïÃæÓÐÈý¸öÑ¡Ôñ£¬

1,efi only£¨×¢ÊÍ£ºÄ¬ÈÏ£©
2,both £¨×¢ÊÍ£º¶þÖÖ·½Ê½¶¼¿ÉÒÔ£©
3,legacy only(×¢ÊÍ£ºgrub1)

ÕâÀï˵µÄÆô¶¯¸ùÑ¡ÔñUÅÌÆô¶¯£¬¹âÅÌÆô¶¯²»Ò»Ñù¡£ÕâÀïµÄÆô¶¯ÊÇ£¬¶àϵͳ°²×°ºÃÁË£¬¶øÑ¡ÔñµÄÆô¶¯Ä£Ê½¡£¶øUÅÌÆô¶¯£¬¹âÅÌÆô¶¯ÕâÖÖÇé¿öÊÇϵͳ»¹Ã»ÓÐװʱѡÔñµÄ°²×°Æô¶¯¡£Îҵı¾×Ó£¬°´F12¿ÉÒÔÑ¡ÔñUÅÌÆô¶¯£¬»òÕß¹âÅÌÆô¶¯¡£

ΪʲôҪ½øÐÐÕâÒ»²½£¬Èç¹û²»¸Ä£¬Ä¬ÈÏÊÇ×°ÔÚµÚ¶þ¿éÓ²ÅÌÉÏÃæµÄ£¬Ò²¾ÍÊÇefiµÄĬÈÏÆô¶¯ÅÌ£¬°²×°centosʱ£º

 

win8×°centos

win8×°centos

¸ù±¾Ã»ÓГ¸ü»»ÉèÖÔÕâ¸ö°´Å¥£¬²¢ÇÒÒýµ¼³ÌÐòÖ»ÄÜ°²×°ÔÚ/dev/sda2ÉÏÃ棬ѡÖеÄÇé¿öÏ£¬centos6.4 64룬¸ù±¾°²×°²»³É¹¦£¬ËùÓаü°²×°Íêºó£¬ÅäÖÃʱÌáʾ±¨´í£¬

 

an unhandled exception has occurred.this is most likely a bug.plese copy the full text of this exeception and file a detailed bug report.against anaconda at http://bug.centos.org/

ÈÃÌá½»bugµ½centos£¬Õâ¸öÓеã¿Óµù¡£

½«efi only¸Ä³Ébothºó£¬ÖØа²×°£¬“¸ü»»ÉèÖԾͻá³öÏÖ£¬²¢°ÑÒýµ¼³ÌÐò×°µ½centosËùÔڵķÖÇø£¬ÕâÑùcentos¿ÉÒÔ˳Àû×°Í꣬Ôõô°²×°ÍøÉÏÌ«¶à£¬ÔÚÕâ¶ù¾Í²»¶ßàÂÁË¡£

Èý£¬ÓÃeasybcdºÍ´¿grub1ʵÏÖË«Æô¶¼²»¿ÉÄÜ

ÓÃeasybcdºÍ´¿grub1ʵÏÖË«Æô¸ù±¾²»¿ÉÄÜ£¬´ó¼Ò¾Í²»ÒªÀË·Ñʱ¼äÁË¡£ÍøÉÏÓÐ˵easybcd2.2¿ÉÒÔʵÏÖ£¬ÎÒÊÔ¹ýÎÞÊý´Î²»ÐС£

ÔÚÆô¶¯ÓÅÏȼ¶ÀïÃæÑ¡Ôñ£¬legacy only£¬±£´æÖØÆô£¬¾ÃÎ¥µÄcentos½çÃæ³öÏÖÁË£¬ÄǽÐÒ»¸ö¼¤¶¯¡£Ï·½Ïò¼üÑ¡Ôñothers,windows½ø²»È¥¡£×ÜÖ®»¹ÊÇÓеã¸ßÐ˵ģ¬centos×°³É¹¦ÁË£¬ÎÒÐÅÐÄ´óÔö£¬Í¨¹ýgrub1£¬ÎÒÏëÄÜÆô¶¯win8£¬È»ºóÎҾͿªÊ¼³¢ÊÔÓÃgrub1Æô¶¯win8£¬ÓÖÊÔÁ˲»ÖªµÀ¶àÉٴβ»ÐС£ÎÒÏëÍêÈ«¿¿grub1Æô¶¯ÊDz»¿ÉÄÜÁË

ËÄ£¬ÓÃcentos×Ô´øµÄefiʵÏÖË«Æô£¬»òÕßÊǶàÆô£¬ÕâÒ»¿éÊDZ¾ÎĵÄÖص㣬ϣÍû´ó¼ÒÄÜÀí½âÎÒµÄ˼·¡£

1,Æô¶¯ÓÅÏȼ¶ÀïÃ棬ѡÔñlegacy only£¬½øÈëµ½centos

2,ÏÂÔØÈý¸öÎļþ£¬BOOTX64.conf  BOOTX64.efi  splash.xpm.gz

http://mirrors.163.com/centos/6.4/os/x86_64/EFI/BOOT/    »òÕßÊÇ´Óiso¾µÏñÖнâѹҲÐС£

3£¬¹ÒÔØefiµÄÆô¶¯ÅÌ

²é¿´¸´ÖÆ´òÓ¡?
  1. mkdir /mnt/usb   
  2. mount /dev/sda2 /mnt/usb   
  3. cd /mnt/usb   
  4. mkdir image   
  5. cp /boot/initramfs-2.6.32-358.el6.x86_64.img ./image/initrd.img   
  6. cp /boot/vmlinuz-2.6.32-358.el6.x86_64 ./image/vmlinuz  

ÔÚefiÆô¶¯Å̵ĸùĿ¼Ҳ¾ÍÊÇ/dev/sda2ÉÏÃ棬½¨Ò»¸öimageÎļþ¼Ð£¬°Ñ×°ºÃµÄcenotsÄں˿¼¹ýÀ´£¬ÎÒΪʲôҪÕâô¸ÉÄØ£¬ÒòΪBOOTX64.confÕâ¸öÎļþ¾ÍÊÇÕâô¸ÉµÄ¡£

²é¿´¸´ÖÆ´òÓ¡?
  1. [root@localhost image]# ll /mnt/usb/image/   
  2. ×ÜÓÃÁ¿ 26812   
  3. -rwxr-xr-x. 1 root root 16532286 6Ô   1 18:11 initrd.img   
  4. -rwxr-xr-x. 1 root root  3089184 6Ô   1 19:11 initrd.img-arch    //ÕâÊÇarchµÄ£¬×°ÁËÈýϵͳ   
  5. -rwxr-xr-x. 1 root root  4043888 6Ô   1 18:10 vmlinuz   
  6. -rwxr-xr-x. 1 root root  3778496 6Ô   1 19:10 vmlinuz-arch       //ÕâÒ²ÊÇarchµÄ£¬  

4£¬ÕâÒ»²½½¨redhatĿ¼ÊǶàÓàµÄ£¬ÎÒÊÇ°´ÕÕ²Ù×÷ʱºòµÄ²½ÖèÀ´Ð´Õâƪ²©¿ÍµÄ

²é¿´¸´ÖÆ´òÓ¡?
  1. [root@localhost EFI]# mkdir /mnt/usb/EFI/redhat  

ΪʲôҪredhat£¬¶ø²»ÊÇcentosÄØ£¬×°ºÃµÄcentos£¬/boot/efi/EFI£¨×¢£ºÕâ¸öĿ¼ÔÚϵͳµÄbootÏÂÃ棬²»ÔÚsda2ÉÏÃ棩£¬Õâ¸öĿ¼Ï¾ÍÓÐredhat,ºóÀ´ÎÒ²ÅÖªµÀ£¬Õâ¸öĿ¼ûÓá£

½«ÉÏÃæµÄÈý¸öÎļþBOOTX64.conf  BOOTX64.efi  splash.xpm.gz£¬copyµ½/mnt/usb/EFI/redhatĿ¼ÏÂÃæ

¿´Ò»ÏÂÎÒµÄÅäÖãº

²é¿´¸´ÖÆ´òÓ¡?
  1. [root@localhost redhat]# cat BOOTX64.conf   
  2. #debug --graphics   
  3. default=1   
  4. #splashimage=/EFI/BOOT/splash.xpm.gz   
  5. timeout=5   
  6. #hiddenmenu   
  7. title CentOS 6.4   
  8.  kernel /image/vmlinuz ro root=/dev/sda7   
  9.  initrd /image/initrd.img   
  10. title Windows8   
  11.  chainloader /EFI/Microsoft/Boot/win8.efi   
  12. title Archlinux   
  13.  kernel /image/vmlinuz-arch ro root=/dev/sda9   
  14.  initrd /image/initrd.img-arch  

ÉÏÃæµÄwin8.efiÊÇbootmgfw.efiµÄ±¸·Ý£¬ºóÀ´ÎÒ°Ñbootmgfw.efiÒ²Ìæ»»ÁË£¬ÏÂÃæ»áÌáµ½µÄ£¬ÕⶫÎ÷Æô¶¯win8Óõġ£

Î壬ÖØÆô²âÊÔ

ÖØÆôF1,½øbios£¬°ÑÆô¶¯ÓÅÏȼ¶ÉèΪefi only,±£´æÖØÆð½øgrub

grub> configfile /efi/redhat/BOOTX64.conf

×¢Ò⣺grubÏÂÃæÊÇС¶¨µÄ£¬linuxϵͳÏÂÊÇ´óдµÄ£¬×îºÃÊÇÓÃtab¼üÌáʾ¡£È»ºóÈý¸öÆô¶¯Ñ¡Ïî¾Í³öÏÖÁË£¬ÎÒÑ¡ÁËһϣ¬¶¼ÊÇ¿ÉÒÔ½øµÄ£¬ÄǽÐÒ»¸ö¼¤¶¯°¡£¬Àë³É¹¦²»Ô¶ÁË¡£

grub> chainloader /efi/Microsoft/Boot/win8.efi

win8Ò²ÊÇ¿ÉÒÔ½øµÄ

Ö»ÒªÆô¶¯Ê±ÄÜÈÃEFIʶ±ðBOOTX64.confÕâ¸öÎļþ£¬²¢¶ÁÈ¡£¬¾Í¸ãÕⶨÁË¡£

È»ºóÎҾͿªÊ¼°ÑredhatÕâ¸öĿ¼µ½´¦copy£¬·¢ÏÖ²»ÐУ¬ÎÒÓÖ°ÑBOOTX64.conf  BOOTX64.efi  splash.xpm.gz£¬ÕâÈý¸öÎļþµ½´¦copy£¬EFIÏÂÃæµÄÿ¸öĿ¼ÎÒ¶¼ÊÔÁË¡£²»ÐС£

Áù,refind efiÆô¶¯Æ÷

û°ì·¨°¡£¬¾ÍÉÏgoogleÉÏÃæÕÒefiÆô¶¯¹¤¾ß£¬¿´Á˺ö࣬·¢ÏÖThe rEFInd Boot Manager»¹ÊDZȽϿ¿Æ׵ġ£

ÏÂÔصØÖ·:http://sourceforge.net/projects/refind/?source=dlp,Õâ¸öÊǶþ½øÖÆ°æµÄ¡£

¸Ã¹¤¾ß¹Ù·½µØÖ·£ºhttp://www.rodsbooks.com/refind/ £¬ÏÂÔØ£¬°²×°£¬ÒÔ¼°Ê¹ÓÃ˵Ã÷¶¼ÓС£

°²×°ÅäÖõØÖ·£ºhttp://www.rodsbooks.com/refind/installing.html#linux

ÏÂÃæÊÇÎҵIJÙ×÷£º

cp -r refind /mnt/usb/EFI/
cd /mnt/usb/EFI/refind
rm -rf drivers_ia32
rm -f refind_ia32.efi
rm -rf tools_ia32

²é¿´¸´ÖÆ´òÓ¡?
  1. [root@localhost boot]# ll /mnt/usb/EFI/refind/   //ɾ³ýºó¾ÍÊÇÕâÑù×Ó   
  2. ×ÜÓÃÁ¿ 224   
  3. drwxr-xr-x. 2 root root   4096 6Ô   1 17:52 drivers_x64   
  4. drwxr-xr-x. 2 root root   8192 6Ô   1 17:52 icons   
  5. -rwxr-xr-x. 1 root root  17774 6Ô   1 20:55 refind.conf   
  6. -rwxr-xr-x. 1 root root  17911 6Ô   1 17:52 refind.conf-sample   
  7. -rwxr-xr-x. 1 root root 170824 6Ô   1 17:52 refind_x64.efi   
  8. drwxr-xr-x. 2 root root   4096 6Ô   1 17:52 tools_x64  

Èç¹ûÄãÊÇ64µÄϵͳ£¬¾Í°Ñ32µÄɾ³ýµô£¬·´Ö®¾Íɾ64µÄ¡£

mv refind.conf-sample refind.conf

È»ºóÅäÖÃrefind.conf£¬ÎÒµÄÅäÖÿ϶¨²»¶Ô£¬Èç¹ûÒª¶ÔµÄ»°£¬Ö±½ÓÊÇ¿ÉÒÔÓÃrefind½øÈëcentos,win8,archµÄ¡£¶ø²»ÊÇrefindÈ¥µ÷ÓÃgrubÀ´Æô¶¯

http://www.rodsbooks.com/refind/installing.html#linuxÖеÄInstalling rEFInd Manually Using Linux,°²×°·½·¨ÖУ¬6,7Õâ¶þ²½£¬Ã»¸Ò×ö£¬ÎÒʵÔÚÎÞ·¨Ô¤²â£¬efibootmgr -c -l \\EFI\\refind\\refind_x64.efi -L rEFInd£¬Ö´ÐÐÕâ¸öÃüÁîµ½µ×»áÓÐʲôºó¹û¡£

Æߣ¬ÖØÆôºó£¬ÎÞ·¨½øÈërefind½çÃæ

È»ºó¾ÍÔÚ×ÐϸÔĶÁÎļþ

Rename EFI/BOOT/refind_x64.efi to the name of the boot loader it's replacing—it should become EFI/BOOT/bootx64.efi or EFI/Microsoft/Boot/bootmgfw.efi.

·¢ÏÖÓÐÉÏÃæµÄ¶«Î÷£¬²Ù×÷ÈçÏ£º

²é¿´¸´ÖÆ´òÓ¡?
  1. [root@localhost EFI]# cp -r ./Microsoft/Boot/ ./Microsoft/Boot_bak   
  2. [root@localhost EFI]# cp -r ./refind/* ./Microsoft/Boot/   
  3. [root@localhost EFI]# cd ./Microsoft/Boot/   
  4. [root@localhost Boot]# cp bootmgfw.efi win8.efi        //ÉÏÃæÌáµ½µÄwin8.efi¾ÍÊÇÔÚÕâ¶ùÀ´µÄ   
  5. [root@localhost Boot]# mv refind_x64.efi bootmgfw.efi  

ÏÈ°ÑEFI/Microsoft/Boot/Õâ¸öĿ¼±¸·Ý£¬ÕâÑùÎÒ²»¹ÜÔõôÅäÖÃBootµÄĿ¼£¬ÎÒ¿ÉÒÔ»¹Ô­£¬½øWIN8¾ø¶ÔûÎÊÌâ¡£efiÆô¶¯£¬»áĬÈ϶ÁÈ¡/EFI/Microsoft/Boot/bootmgfw.efi£¬ÎҵĻú×ÓÊÇÕâÑù×ӵģ¬¹æ¶¨ËÀÁË¡£

°Ë£¬ÖØÆôºó£¬¿ÉÒÔ½øÈërefindµÄÒýµ¼½çÃ棬µ«ÊÇûÓÐÒ»¸öϵͳÄܽø¡£

refindÅäÖò»ÕýÈ·£¬ÎÞ·¨½øÈëÈκÎÒ»¸öϵͳ£¬µ«ÊÇÎÒ·¢ÏÖrefindµÄµÚ¶þ¸öÒýµ¼Ïî¶ÁÈ¡µ½ÁË/grub/BOOTX64.conf,²¢ÇÒÊÇĬÈϵÄcentosµÄBOOTX64.conf£¬grubÊÇʲôʱºò½¨µÄÎÒ¶¼ÍüÁË£¬ÀïÃæÊÇÏÂÔصÄԭʼµÄcentosµÄBOOTX64.conf  BOOTX64.efi  splash.xpm.gz

²é¿´¸´ÖÆ´òÓ¡?
  1. [root@localhost refind]# cp /mnt/usb/EFI/redhat/* /mnt/usb/EFI/grub   
  2.   
  3. [root@localhost refind]# cd /mnt/usb/EFI/Microsoft/Boot/   
  4.   
  5. [root@localhost Boot]# vim refind.conf   
  6. timeout 2   
  7. default_selection 2   //½«µÚ¶þÒýµ¼Ïîµ÷ΪĬÈÏ  

ÖªµÀrefind¶ÁÈ¡ÄĸöÆô¶¯Îļþ¾ÍºÃ°ìÁË£¬°ÑredhatÏÂÃæÒѾ­ÅäÖúõÄÎļþcopyµ½grubĿ¼Ï¾͸㶨ÁË¡£

¾ÍÕâÑùÎÒµÄÈýϵͳÆô¶¯¸ã¶¨ÁË£¬²»¹ý»¹ÓÐȱµã£¬

µÚÒ»£¬Òýµ¼ÊÇ·Ö¶þ²½µÄ£¬Ê×ÏÈÊÇrefindÒýµ¼£¬È»ºórefindµ÷ÓÃBOOTX64.conf£¬ÔÚͨ¹ýgrubÀ´Òýµ¼£¬Ö®ºó²ÅÄܽøÈëϵͳ¡£
µÚ¶þ£¬Äں˰汾£¬ÊÇcopyµ½ÁË£¬efiµÄÆô¶¯ÅÌÉÏÃ棬Éý¼¶Äںˣ¬Ò²Óò»ÁË,³ý·ÇÔÚÖØн«ÄÚºËcopyµ½sda2ÉÏÃæ¡£

(ÔðÈα༭£ºIT)
------·Ö¸ôÏß----------------------------
À¸Ä¿Áбí
ÍƼöÄÚÈÝ