{"id":96,"date":"2005-06-03T23:06:45","date_gmt":"2005-06-03T15:06:45","guid":{"rendered":"http:\/\/fdream.net\/blog\/article\/96.aspx"},"modified":"2006-03-26T21:03:09","modified_gmt":"2006-03-26T13:03:09","slug":"%e9%87%8d%e8%a3%85GRUB","status":"publish","type":"post","link":"https:\/\/fdream.net\/blog\/article\/96","title":{"rendered":"\u91cd\u88c5GRUB"},"content":{"rendered":"<p>\u524d\u51e0\u5929\u6761\u5b50\u574f\u4e86\u4e00\u6839\uff0c\u4eca\u5929\u62ff\u53bb\u6362\u4e86\u4e00\u6839\uff0c\u56de\u6765\u540e\u987a\u4fbf\u628aC\u76d8\u683c\u4e86\u4e00\u904d\uff0c\u518d\u628a\u7cfb\u7edf\u4e5fGHOST\u4e86\uff0c\u6700\u8fd1\u4e00\u76f4\u7528\u7740\u4e0d\u723d\uff01GHOST\u5b8c\u540e\u53d1\u73b0\u8fd9\u6b21\u548c\u4e0a\u6b21\u5c45\u7136\u4e0d\u4e00\u6837\uff0c\u8fd9\u6b21grub\u6ca1\u4e86\uff0c\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\uff1f\u96be\u9053\u662f\u56e0\u4e3a\u6211\u4eca\u5929\u683c\u4e86\u76d8\uff1f<\/p>\n<p>\u6ca1\u4e86grub\uff0c\u53ea\u597d\u4fee\u4e86\uff0c\u8fd8\u597d\u5076\u7684 Red Hat \u7684\u76d8\u8fd8\u5728\uff0c\u4e0b\u9762\u662f\u5076\u7684\u4fee\u590d\u8fc7\u7a0b\uff1a<\/p>\n<p>1\u3001\u5c06 Red Hat Linux \u7684\u76d8A\uff08\u5171\u6709A\u3001B\u3001C\u4e09\u5f20\uff09\uff0c\u91cd\u542f\u673a\u5668\uff1b<br \/>2\u3001\u51fa\u73b0Linux\u7684\u5f15\u5bfc\u754c\u9762\uff0c\u6309 F5 \u8fdb\u5165 Linux Rescue\uff1b<br \/>3\u3001\u5728 boot \u4e0b\u8f93\u5165\u547d\u4ee4\uff1a<br \/>    <span style=\"color:Brown\"> linux rescue<\/span><br \/>4\u3001\u7136\u540e\u51fa\u73b0\u9009\u62e9\u8bed\u8a00\uff0c\u952e\u76d8\uff0c\u7f51\u7edc\u7b49\u9009\u9879\uff0c\u5206\u522b\u56de\u7b54\u540e\uff0c\u9009\u62e9\u7ee7\u7eed\uff1b<br \/>5\u3001\u7136\u540e\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u5b57\u7b26<br \/>    sh\uff0d2.0.5#         \u5373shell\u7248\u672c\u7684\u4fe1\u606f\uff08\u8fd9\u4e2a\u4e0d\u7ba1\uff09<br \/>6\u3001\u518d\u5728\u540e\u9762\u8f93\u5165 grub\uff0c\u8f93\u5165\u540e\u9700\u8981\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\uff1b<br \/>7\u3001\u7136\u540e\u5c31\u4f1a\u8fdb\u5165grub\uff0c\u5373\u662f\u8fd9\u6837\u7684\uff1a<br \/>     sh#grub><br \/>\u6211\u4eec\u5c31\u53ef\u4ee5\u5728\u8fd9\u6837\u7684\u5b57\u7b26\u540e\u9762\uff0c\u8f93\u5165<br \/>grub>root (hdX,Y)<br \/>grub>setup (hd0)<\/p>\n<p>\u5982\u679c\u6210\u529f\u4f1a\u6709\u4e00\u4e2asucceeded done\u2026\u2026<br \/>\u8fd9\u91cc\u7684X\uff0c\u5982\u679c\u662f\u7b2c\u4e00\u5757\u786c\u76d8\uff0c\u5c31\u662f0\uff1b\u5982\u679c\u4f60\u6240\u5b89\u88c5\u7684linux\u7684\u201c\/\u201d\u6839\u5206\u533a\u5728\u7b2c\u4e8c\u5757\u786c\u76d8\u4e0a\uff0c\u90a3X\u5c31\u662f1\u4e86\uff1b\u8fd9\u91cc\u7684Y\uff0c\u5c31\u662f\u88c5\u6709linux\u7cfb\u7edf\u6240\u5728\u7684\u201c\/\u201d\u6839\u5206\u533a\u3002setup (hd0) \u5c31\u662f\u628aGRUB\u5199\u5230\u786c\u76d8\u7684MBR\u4e0a\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u4f60\u7684linux\u5b89\u88c5\u5230\u54ea\u4e2a\u5206\u533a\u4e0a\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e0d\u77e5\u9053\u8fd9\u4e2aY\u662f\u591a\u5c11\uff0c\u8fd9\u4e5f\u4e0d\u8981\u7d27\uff0c\u5148\u8f93\u5165 root (hdX,\u7136\u540e\u7528[TAB]  \u6765\u67e5\u770b\uff0c\u4f60\u6309\u4e86\u4e00\u4e0b\u5c31\u660e\u767d\u4e86\u2026\u2026<\/p>\n<p>\u64cd\u4f5c\u5982\u4e0b\uff1a[\u524d\u9762\u5f00\u673a\u542f\u52a8\u7684\u4e0a\u9762\u6709\u8bf4\u660e]<br \/>sh#grub<\/p>\n<p>\u4f1a\u51fa\u73b0\u4e0b\u9762\u7684\u5b57\u6837<br \/>grub><\/p>\n<p>\u7136\u540e\u518d\u8fd9\u6837\u64cd\u4f5c\uff0c\u6211\u4e0d\u77e5\u9053\u88c5\u5728\u54ea\u4e2a\u5206\u533a\u4e0a\uff0c\u5c31\u53ef\u4ee5\u5148\u8f93\u5165root (hd0,\u7136\u540e\u7528[TAB]\u952e\u6765\u8865\u9f50\uff0c\u7136\u540e\u5c31\u660e\u767d\u4e86&#8212;-\u6211\u786c\u76d8\u7684\u5206\u533a\u60c5\u51b5\u662f\u8fd9\u6837\u7684\u2026\u2026<br \/>  0  FAT<br \/>  4  FAT<br \/>  5  FAT<br \/>  6  FAT<br \/>  7  \/ ext3<br \/>  8  \/swap<br \/>\u6ce8\uff1a\u6bcf\u4e2a\u6570\u5b57\u540e\u9762\u90fd\u662f\u4e00\u4e32\u82f1\u6587\uff0c\u4f46\u662f\u53ea\u8981\u627e\u5230\u4e0a\u9762\u7684\u5173\u952e\u5b57\u5c31\u591f\u4e86\uff01<\/p>\n<p>grub>root (hd0,7)<br \/>grub>setup (hd0)<\/p>\n<p>\u6700\u540e\u5c31\u662f\u6309\u4e00\u4e0b[RESET]\u952e\uff0c\u91cd\u65b0\u542f\u52a8\uff0c\u5c31OK\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u51e0\u5929\u6761\u5b50\u574f\u4e86\u4e00\u6839\uff0c\u4eca\u5929\u62ff\u53bb\u6362\u4e86\u4e00\u6839\uff0c\u56de\u6765\u540e\u987a\u4fbf\u628aC\u76d8\u683c\u4e86\u4e00\u904d\uff0c\u518d\u628a\u7cfb\u7edf\u4e5fGHOST\u4e86\uff0c\u6700\u8fd1\u4e00\u76f4\u7528\u7740\u4e0d\u723d\uff01GHOST\u5b8c\u540e\u53d1\u73b0\u8fd9\u6b21\u548c\u4e0a\u6b21\u5c45\u7136\u4e0d\u4e00\u6837\uff0c\u8fd9\u6b21grub\u6ca1\u4e86\uff0c\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\uff1f\u96be\u9053\u662f\u56e0\u4e3a\u6211\u4eca\u5929\u683c\u4e86\u76d8\uff1f \u6ca1\u4e86grub\uff0c\u53ea\u597d\u4fee\u4e86\uff0c\u8fd8\u597d\u5076\u7684 Red Hat \u7684\u76d8\u8fd8\u5728\uff0c\u4e0b\u9762\u662f\u5076\u7684\u4fee\u590d\u8fc7\u7a0b\uff1a 1\u3001\u5c06 Red Hat Linux \u7684\u76d8A\uff08\u5171\u6709A\u3001B\u3001C\u4e09\u5f20\uff09\uff0c\u91cd\u542f\u673a\u5668\uff1b2\u3001\u51fa\u73b0Linux\u7684\u5f15\u5bfc\u754c\u9762\uff0c\u6309 F5 \u8fdb\u5165 Linux Rescue\uff1b3\u3001\u5728 boot \u4e0b\u8f93\u5165\u547d\u4ee4\uff1a linux rescue4\u3001\u7136\u540e\u51fa\u73b0\u9009\u62e9\u8bed\u8a00\uff0c\u952e\u76d8\uff0c\u7f51\u7edc\u7b49\u9009\u9879\uff0c\u5206\u522b\u56de\u7b54\u540e\uff0c\u9009\u62e9\u7ee7\u7eed\uff1b5\u3001\u7136\u540e\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u5b57\u7b26 sh\uff0d2.0.5# \u5373shell\u7248\u672c\u7684\u4fe1\u606f\uff08\u8fd9\u4e2a\u4e0d\u7ba1\uff096\u3001\u518d\u5728\u540e\u9762\u8f93\u5165 grub\uff0c\u8f93\u5165\u540e\u9700\u8981\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\uff1b7\u3001\u7136\u540e\u5c31\u4f1a\u8fdb\u5165grub\uff0c\u5373\u662f\u8fd9\u6837\u7684\uff1a sh#grub>\u6211\u4eec\u5c31\u53ef\u4ee5\u5728\u8fd9\u6837\u7684\u5b57\u7b26\u540e\u9762\uff0c\u8f93\u5165grub>root (hdX,Y)grub>setup (hd0) \u5982\u679c\u6210\u529f\u4f1a\u6709\u4e00\u4e2asucceeded done\u2026\u2026\u8fd9\u91cc\u7684X\uff0c\u5982\u679c\u662f\u7b2c\u4e00\u5757\u786c\u76d8\uff0c\u5c31\u662f0\uff1b\u5982\u679c\u4f60\u6240\u5b89\u88c5\u7684linux\u7684\u201c\/\u201d\u6839\u5206\u533a\u5728\u7b2c\u4e8c\u5757\u786c\u76d8\u4e0a\uff0c\u90a3X\u5c31\u662f1\u4e86\uff1b\u8fd9\u91cc\u7684Y\uff0c\u5c31\u662f\u88c5\u6709linux\u7cfb\u7edf\u6240\u5728\u7684\u201c\/\u201d\u6839\u5206\u533a\u3002setup (hd0) \u5c31\u662f\u628aGRUB\u5199\u5230\u786c\u76d8\u7684MBR\u4e0a\u3002 \u5982\u679c\u4f60\u4e0d\u77e5\u9053\u4f60\u7684linux\u5b89\u88c5\u5230\u54ea\u4e2a\u5206\u533a\u4e0a\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e0d\u77e5\u9053\u8fd9\u4e2aY\u662f\u591a\u5c11\uff0c\u8fd9\u4e5f\u4e0d\u8981\u7d27\uff0c\u5148\u8f93\u5165 root (hdX,\u7136\u540e\u7528[TAB] \u6765\u67e5\u770b\uff0c\u4f60\u6309\u4e86\u4e00\u4e0b\u5c31\u660e\u767d\u4e86\u2026\u2026 \u64cd\u4f5c\u5982\u4e0b\uff1a[\u524d\u9762\u5f00\u673a\u542f\u52a8\u7684\u4e0a\u9762\u6709\u8bf4\u660e]sh#grub \u4f1a\u51fa\u73b0\u4e0b\u9762\u7684\u5b57\u6837grub> \u7136\u540e\u518d\u8fd9\u6837\u64cd\u4f5c\uff0c\u6211\u4e0d\u77e5\u9053\u88c5\u5728\u54ea\u4e2a\u5206\u533a\u4e0a\uff0c\u5c31\u53ef\u4ee5\u5148\u8f93\u5165root (hd0,\u7136\u540e\u7528[TAB]\u952e\u6765\u8865\u9f50\uff0c\u7136\u540e\u5c31\u660e\u767d\u4e86&#8212;-\u6211\u786c\u76d8\u7684\u5206\u533a\u60c5\u51b5\u662f\u8fd9\u6837\u7684\u2026\u2026 0 FAT 4 FAT 5 FAT 6 FAT 7 \/ ext3 8 \/swap\u6ce8\uff1a\u6bcf\u4e2a\u6570\u5b57\u540e\u9762\u90fd\u662f\u4e00\u4e32\u82f1\u6587\uff0c\u4f46\u662f\u53ea\u8981\u627e\u5230\u4e0a\u9762\u7684\u5173\u952e\u5b57\u5c31\u591f\u4e86\uff01 grub>root (hd0,7)grub>setup (hd0) \u6700\u540e\u5c31\u662f\u6309\u4e00\u4e0b[RESET]\u952e\uff0c\u91cd\u65b0\u542f\u52a8\uff0c\u5c31OK\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[152,19,21],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-coding","tag-grub","tag-Linux","tag-RedHat"],"views":28606,"_links":{"self":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":0,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"wp:attachment":[{"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fdream.net\/blog\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}