{"id":1609,"date":"2014-04-23T20:23:49","date_gmt":"2014-04-23T12:23:49","guid":{"rendered":"http:\/\/www.gejoin.com\/?p=1609"},"modified":"2014-04-23T20:23:49","modified_gmt":"2014-04-23T12:23:49","slug":"centosubuntuwindows-%e5%a4%9a%e7%b3%bb%e7%bb%9fgrub%e5%bc%95%e5%af%bc%e4%bf%ae%e5%a4%8d","status":"publish","type":"post","link":"https:\/\/www.mujins.com\/?p=1609","title":{"rendered":"CentOS+Ubuntu+Windows \u591a\u7cfb\u7edfGrub\u5f15\u5bfc\u4fee\u590d"},"content":{"rendered":"<p>\u7b80\u5355\u63cf\u8ff0\u72b6\u51b5\uff1a<br \/>\n1.\u7cfb\u7edf\u5b89\u88c5\u670964\u4f4d\u7684windows 7\u548c64\u4f4d\u7684CentOS\u64cd\u4f5c\u7cfb\u7edf\uff0c\u4f7f\u7528Legacy BIOS \u5b89\u88c5\u5f15\u5bfc\u542f\u52a8\uff0c\u6ca1\u6709\u4f7f\u7528UEFI\u3002<br \/>\n2.CentOS6.5 grub\u5f15\u5bfc\u83dc\u5355\u6b63\u5e38\u5f15\u5bfcWINDOWS 7+CENTOS\uff0cCentOS\u5305\u542b\/boot\u5206\u533a\uff0c\/\u5206\u533a\u4ee5\u53ca\/home\u5206\u533a<br \/>\n3.\u5b89\u88c5ubuntu 14.04\uff0864\u4f4d\uff09 \u4e4b\u540e\uff0c\u4f7f\u7528alongside windows\u7a7a\u95f2\u5206\u533a\u3002\u5b89\u88c5\u5b8c\u6210\u540e\u4f7f\u7528ubuntu grub \u5f15\u5bfc\u542f\u52a8\uff0c\u53ea\u80fd\u5f15\u5bfcwindows 7+ubuntu\uff0ccentos \u65e0\u6cd5\u542f\u52a8.<br \/>\n4.\u5728ubuntu\u7cfb\u7edf\u4e0b\uff0c\u5b89\u88c5grub2\/grub \u7136\u540e update-grub \u5747\u65e0\u6cd5\u6b63\u5e38\u641c\u7d22\u5230centos \u3002<br \/>\n<a href=\"https:\/\/www.gigiwangs.com\/wp-content\/uploads\/2014\/04\/centos-debian-ubuntu.jpg\" data-lightbox=\"gal[1609]\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1635\" src=\"https:\/\/www.gigiwangs.com\/wp-content\/uploads\/2014\/04\/centos-debian-ubuntu.jpg\" alt=\"centos-debian-ubuntu\" width=\"400\" height=\"300\" \/><\/a><br \/>\n\u7efc\u4e0a\uff0c\u53ea\u80fd\u627e\u5176\u4ed6\u65b9\u6cd5\uff0c\u6709\u4eba\u8bf4\u7528centos\u5b89\u88c5\u76d8 grub rescue ,\u89c9\u5f97\u9ebb\u70e6\uff0c\u60f3\u7528ubuntu \u5f15\u5bfc\u3002\u8fd9\u662f\u6211\u7684ubuntu\u4e0b\/boot\/grub\/grub.cfg \uff0c\u5728\u5176\u4e2d\u6dfb\u52a0Centos \u5206\u533a\u4fe1\u606f\uff0c\u4e00\u5b9a\u6ce8\u610f\u5206\u533a\u548cUUID\u3002 \u6210\u529f\u5f15\u5bfc3\u4e2a\u7cfb\u7edf\uff01<\/p>\n<pre class=\"brush:other\">menuentry 'CentOS6.5, with Linux 2.6.32-431.el6.x86_64' {\n    insmod gzio\n    insmod part_msdos\n    insmod ext2\n    set root='hd0,7'\n    if [ x$feature_platform_search_hint = xy ]; then\n    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7 e30284d7-5cf6-4864-a875-75012d8d9b14\n   else\n   search --no-floppy --fs-uuid --set=e30284d7-5cf6-4864-a875-75012d8d9b14\n   fi\n    echo 'Loading Linux 2.6.32-431.el6.x86_64 ...'\n    linux \/boot\/vmlinuz-2.6.32-431.el6.x86_64 root=UUID=e30284d7-5cf6-4864-a875-75012d8d9b14 ro quiet splash\n    echo 'Loading initial ramdisk ...'\n    initrd \/boot\/initramfs-2.6.32-431.el6.x86_64.img\n}<\/pre>\n<p>\u8fd9\u91cc\u518d\u63d0\u4e00\u4e0b\uff0c\u5728\u5df2\u5b89\u88c5windows \u7684gpt\uff08mbr\uff09\u7684 \u78c1\u76d8\u4e0b\u5b89\u88c5ubuntu \u65f6 \uff0c\u5982\u679c\u65e0\u6cd5\u770b\u5230windows\u5206\u533a\uff0c\u800c\u662f\u4e00\u6574\u5757\u786c\u76d8\uff0c\u90a3\u4e48\u4f7f\u7528liveCD\u8fdb\u5165\u7cfb\u7edf\uff0c\u4f7f\u7528\u4e0b\u9762\u547d\u4ee4\u4fee\u590d:<\/p>\n<pre class=\"brush:bash\">sudo dd if=\/dev\/zero of=\/dev\/sda bs=1 count=8 seek=512<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u5355\u63cf\u8ff0\u72b6\u51b5\uff1a 1.\u7cfb\u7edf\u5b89\u88c5\u670964\u4f4d\u7684windows 7\u548c64\u4f4d\u7684CentOS\u64cd\u4f5c\u7cfb\u7edf\uff0c\u4f7f\u7528Legacy BIOS \u5b89\u88c5\u5f15\u5bfc\u542f\u52a8\uff0c\u6ca1\u6709\u4f7f\u7528UEFI\u3002 2.CentOS6.5 grub\u5f15\u5bfc\u83dc\u5355\u6b63\u5e38\u5f15\u5bfcWINDOWS 7+CENTOS\uff0cCentOS\u5305\u542b\/boot\u5206\u533a\uff0c\/\u5206\u533a\u4ee5\u53ca\/home\u5206\u533a 3.\u5b89\u88c5ubuntu 14.04\uff0864\u4f4d\uff09 \u4e4b\u540e\uff0c\u4f7f\u7528alongside windows\u7a7a\u95f2\u5206\u533a\u3002\u5b89\u88c5\u5b8c\u6210\u540e\u4f7f\u7528ubuntu grub \u5f15\u5bfc\u542f\u52a8\uff0c\u53ea\u80fd\u5f15\u5bfcwindows 7+ubuntu\uff0ccentos \u65e0\u6cd5\u542f\u52a8. 4.\u5728ubuntu\u7cfb\u7edf\u4e0b\uff0c\u5b89\u88c5grub2\/grub \u7136\u540e update-grub \u5747\u65e0\u6cd5\u6b63\u5e38\u641c\u7d22\u5230centos \u3002 \u7efc\u4e0a\uff0c\u53ea\u80fd\u627e\u5176\u4ed6\u65b9\u6cd5\uff0c\u6709\u4eba\u8bf4\u7528centos\u5b89\u88c5\u76d8 grub rescue ,\u89c9\u5f97\u9ebb\u70e6\uff0c\u60f3\u7528ubuntu \u5f15\u5bfc\u3002\u8fd9\u662f\u6211\u7684ubuntu\u4e0b\/boot\/grub\/grub.cfg \uff0c\u5728\u5176\u4e2d\u6dfb\u52a0Centos \u5206\u533a\u4fe1\u606f\uff0c\u4e00\u5b9a\u6ce8\u610f\u5206\u533a\u548cUUID\u3002 \u6210\u529f\u5f15\u5bfc3\u4e2a\u7cfb\u7edf\uff01 menuentry &#8216;CentOS6.5, with Linux 2.6.32-431.el6.x86_64&#8242; { insmod gzio insmod part_msdos insmod ext2 set root=&#8217;hd0,7&#8217; if [ x$feature_platform_search_hint = xy ]; then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1635,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,21,78],"tags":[22,53],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1609"}],"collection":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1609"}],"version-history":[{"count":0,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1609\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}