{"id":91,"date":"2022-02-24T01:59:07","date_gmt":"2022-02-23T17:59:07","guid":{"rendered":"https:\/\/andy9999678.me\/blog\/?p=91"},"modified":"2022-02-24T02:22:46","modified_gmt":"2022-02-23T18:22:46","slug":"%e8%a7%a3%e5%86%b3-msi-%e4%b8%bb%e6%9d%bf%e4%b8%8a%e5%ae%89%e8%a3%85-archlinux-%e6%97%b6-uefi-%e4%b8%8b-grub-%e5%90%af%e5%8a%a8%e9%a1%b9%e5%a4%b1%e6%95%88%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/andy9999678.me\/blog\/archives\/91","title":{"rendered":"\u89e3\u51b3 MSI \u4e3b\u677f\u4e0a\u5b89\u88c5 ArchLinux \u65f6 UEFI \u4e0b GRUB \u542f\u52a8\u9879\u5931\u6548\u7684\u95ee\u9898"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u80cc\u666f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fc7\u5e74\u8fd9\u51e0\u5929\u5347\u7ea7\u4e86\u4e00\u4e0b\u5bb6\u91cc\u7684\u8f6f\u8def\u7531 &amp; NAS\uff0c\u4ece\u4e4b\u524d ASRock \u7684 H81 MATX \u4e3b\u677f\u6362\u6210\u4e86\u65b0\u7684 MSI B460 TORPEDO\uff0c\u65b0\u4e3b\u677f\u662f ATX \u6709 2.5G \u7f51\u53e3\u8fd8\u6709\u66f4\u591a\u7684 M.2 \/ PCI-E \/ SATA \u53e3\uff0c\u505a All in one server \u7684\u6269\u5c55\u6027\u5df2\u7ecf\u8db3\u591f\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fc1\u79fb\u7cfb\u7edf\u7684\u65f6\u5019\u53d1\u73b0\u65b0\u4e70\u7684\u5341\u4ee3 CPU (i5-10105T) \u4e0a\u9762\u60f3\u7528\u96c6\u663e\u5c31\u5fc5\u987b\u7528 UEFI \u542f\u52a8\uff08\u4e0d\u7136\u4f1a\u62a5\u9519\uff0c\u8bf4\u96c6\u663e\u6ca1\u6709\u5bf9\u5e94\u7684 VBIOS \u65e0\u6cd5\u5728 CSM \u4e0b\u542f\u52a8\uff09\u3002\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u6211\u4e70\u4e86\u4e2a QS \u6563\u7247\u7684\u539f\u56e0\uff1b\u4f46\u4e0d\u7ba1\u600e\u4e48\u6837\u6211\u5fc5\u987b\u8981\u628a\u4e4b\u524d\u7684 ArchLinux BIOS\/MBR \u542f\u52a8\u65b9\u5f0f\u6539\u4e3a UEFI\/GPT \u4e86<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MBR \u6362\u6210 GPT \u6211\u76f4\u63a5\u7528\u7684 DiskGenius \u8f6f\u4ef6\uff0c\u60f3\u7740\u6309\u7167 Arch Wiki \u91cc\u9762\u4ecb\u7ecd <a href=\"https:\/\/wiki.archlinux.org\/title\/GRUB#Installation_2\" data-type=\"URL\" data-id=\"https:\/\/wiki.archlinux.org\/title\/GRUB#Installation_2\">GRUB \u5b89\u88c5<\/a> \u7684\u8bf4\u660e\u4e00\u6b65\u4e00\u6b65\u8d70\u5c31\u53ef\u4ee5\u4e86\uff0c\u6ca1\u60f3\u5230\u4e00\u76f4\u51fa\u9519\u2026\u2026\u5c31\u6709\u4e86\u8fd9\u7bc7\u6587\u7ae0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u95ee\u9898<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c1d\u8bd5\u6309\u7167 Arch Wiki \u6d41\u7a0b\u5b89\u88c5 GRUB\uff0c\u8fdb\u5165 Arch Installation Media\uff0cchroot \u540e\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># grub-install --target=x86_64-efi --efi-directory=<em>esp<\/em> --bootloader-id=GRUB<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63d0\u793a\u5b89\u88c5\u6210\u529f\u3002\u5728\u5b89\u88c5\u73af\u5883\u4e0b\u8fd0\u884c efibootmgr \u4e5f\u53ef\u4ee5\u770b\u5230<strong>\u786e\u5b9e\u6210\u529f\u6dfb\u52a0\u4e86\u542f\u52a8\u9879<\/strong>\uff0c\u4f46\u662f\u91cd\u542f\u4e4b\u540e\u5b8c\u5168\u627e\u4e0d\u5230\u542f\u52a8\u9879\uff0c\u4e3b\u677f BIOS \u9875\u9762\u751a\u81f3\u4e0d\u5141\u8bb8\u6dfb\u52a0\u8fd9\u5757\u786c\u76d8\u4f5c\u4e3a\u542f\u52a8\u8bbe\u5907\uff0cGRUB \u7684\u5b89\u88c5\u662f\u5931\u8d25\u7684\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u6cd51<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">TL;DR<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6838\u5fc3\u539f\u56e0\u662f MSI \u4e3b\u677f\u9700\u8981 EFI \u6587\u4ef6\u5728 EFI \u7684\u7279\u5b9a\u8def\u5f84\u4e0a\u3002Arch \u7684 GRUB \u4f1a\u9ed8\u8ba4\u5b89\u88c5\u5230 <code>{ESP}\/EFI\/GRUB\/grubx64.efi<\/code> \u4e0a\uff0c\u4f46\u4e3b\u677f\u542f\u52a8\u65f6\u5e0c\u671b\u7684\u5730\u65b9\u662f <code>{ESP}\/EFI\/BOOT\/BOOTx64.efi<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u6b64\u6839\u636e <a href=\"https:\/\/wiki.archlinux.org\/title\/GRUB#Default\/fallback_boot_path\">wiki<\/a> \u6709\u4e24\u79cd\u529e\u6cd5\uff1a\u4e00\u4e2a\u662f\u5b89\u88c5\u65f6\u589e\u52a0\u53c2\u6570<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># grub-install --target=x86_64-efi --efi-directory=<em>esp<\/em> <strong>--removable<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53e6\u5916\u4e5f\u53ef\u4ee5 <code>grub-install<\/code> \u4e4b\u540e\u518d\u628a\u5b89\u88c5\u597d\u7684 efi \u542f\u52a8\u7a0b\u5e8f\u590d\u5236 \/ \u79fb\u52a8\u5230\u76ee\u6807\u4f4d\u7f6e\u4e0a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mv <em>esp<\/em>\/EFI\/grub <em>esp<\/em>\/EFI\/BOOT\n# mv <em>esp<\/em>\/EFI\/BOOT\/grubx64.efi <em>esp<\/em>\/EFI\/BOOT\/BOOTX64.EFI<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image.png\" alt=\"\" class=\"wp-image-93\" width=\"256\" height=\"105\" srcset=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image.png 426w, https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-300x123.png 300w\" sizes=\"auto, (max-width: 256px) 100vw, 256px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u95ee\u9898\u5728\u5f88\u591a\u5176\u4ed6\u7684\u8bbe\u5907\u4e0a\u4e5f\u5b58\u5728\uff0c<a href=\"https:\/\/wiki.archlinux.org\/title\/GRUB\/EFI_examples\" data-type=\"URL\" data-id=\"https:\/\/wiki.archlinux.org\/title\/GRUB\/EFI_examples\">\u6839\u636e Arch Wiki\uff0c\u770b\u8d77\u6765<\/a>\u8054\u60f3\u548c\u90e8\u5206 Thinkpad \u7684\u578b\u53f7\u4e5f\u6709\u4e00\u6837\u7684\u95ee\u9898<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u6cd52\uff08\u5f53\u65f6\u6298\u817e\u7684\u8fc7\u7a0b\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u65f6\u6298\u817e\u7684\u65f6\u5019\u5e76\u6ca1\u53d1\u73b0\u6709\u8fd9\u6837\u7684\u89e3\u6cd5\uff0c\u800c\u662f\u7ed5\u4e86\u4e9b\u5f2f\u8def\uff1a\u8fdb\u5165 EFI Shell \u624b\u52a8\u53bb\u6dfb\u52a0\u542f\u52a8\u9879\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u65f6\u7684\u601d\u8def\u662f\u5728 Arch Media \u91cc\u9762 efibootmgr \u5ba3\u79f0\u5b89\u88c5\u6210\u529f\u4e86\uff0c\u4f46\u91cd\u542f\u540e\u5374\u5931\u8d25\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a Arch Media \u8bfb\u5199 UEFI \u542f\u52a8\u9879\u4f4d\u7f6e NVRAM \u7684\u8fc7\u7a0b\u662f\u6709\u95ee\u9898\u7684\uff0c\u6240\u4ee5\u5f97\u60f3\u529e\u6cd5\u6362\u4e2a\u65b9\u5f0f\u5199\u542f\u52a8\u9879\u3002\u6ca1\u4ec0\u4e48\u601d\u8def\uff0c\u611f\u89c9\u53ea\u80fd\u9760 EFI Shell \u4e86\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"101\" src=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-1.png\" alt=\"\" class=\"wp-image-94\" srcset=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-1.png 375w, https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-1-300x81.png 300w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><figcaption>UEFI \u65b9\u5f0f\u542f\u52a8\u7684 Arch Installation Media<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528 UEFI \u542f\u52a8 Arch Installation Media \u7684\u65f6\u5019\u6709\u4e00\u4e2a\u9009\u9879\u662f UEFI Shell\uff0c\u8fdb\u5165\u4e4b\u540e\u53ef\u4ee5\u770b\u5230\u7c7b\u4f3c\u4e0b\u9762\u7684\u754c\u9762<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-2.png\" alt=\"\" class=\"wp-image-95\" width=\"483\" height=\"223\" srcset=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-2.png 666w, https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-2-300x139.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f4\u63a5\u6572 <code>help <\/code>\u53ef\u4ee5\u770b\u5230\u547d\u4ee4\u5217\u8868\u3002\u8fd9\u91cc\u8f93\u5165 <code>alias <\/code>\u547d\u4ee4\u53ef\u4ee5\u770b\u5230 UEFI Shell \u91cc\u627e\u5230\u7684 EFI \u5206\u533a\uff08\u4e00\u822c\u81f3\u5c11\u627e\u5230\u4e24\u4e2a\uff0c\u6709\u4e00\u4e2a\u662f\u5b89\u88c5\u955c\u50cf\u81ea\u5e26\u7684\uff09\u7684 Mapping Table\uff0c\u6839\u636e\u5bf9\u5e94\u7684\u6587\u5b57\u8bf4\u660e\u627e\u5230\u771f\u6b63\u9700\u8981\u542f\u52a8\u7684\u5206\u533a <code>FS[n]: <\/code>\u5047\u8bbe\u662f <code>FS1<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\u7684\u64cd\u4f5c\u7c7b\u4f3c DOS\uff0c\u5148\u8f93\u5165 FS1: \u56de\u8f66\u8fdb\u5165\u5bf9\u5e94\u7684\u5206\u533a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/andy9999678.me\/blog\/wp-content\/uploads\/2022\/02\/image-3.png\" alt=\"\" class=\"wp-image-96\" width=\"102\" height=\"64\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e4b\u540e\u53ef\u4ee5\u901a\u8fc7 cd ls \u7b49\u547d\u4ee4\u770b\u5230\u81ea\u5df1\u7684 EFI \u6587\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u95f4\u63a5\u68c0\u67e5\u81ea\u5df1\u662f\u5426\u8fdb\u5165\u4e86\u6b63\u786e\u7684\u5206\u533a\u3002<strong>\u6ce8\u610f\uff0c\u5728\u8fd9\u91cc\u542f\u52a8\u5668\u5b89\u88c5\u597d\u7684 EFI \u6587\u4ef6\u662f\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u7684<\/strong>\uff0c\u8fd0\u884c\u5bf9\u5e94\u7684 .EFI \u6587\u4ef6\u5c31\u8fdb\u5165\u5b89\u88c5\u597d\u7684\u542f\u52a8\u5668\u4e86\u3002\uff08\u624b\u52a8\u8fdb\u5165 <code>grubx64.efi<\/code> \u4e4b\u540e\uff0c\u6211\u624d\u786e\u8ba4 GRUB \u7684\u5b89\u88c5\u5b8c\u5168\u6ca1\u95ee\u9898\uff0c\u5355\u7eaf\u662f\u5f15\u5bfc\u9879\u7684\u95ee\u9898\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e4b\u540e\u7528 <code>bcfg <\/code>\u547d\u4ee4\uff08\u53c2\u89c1<a href=\"https:\/\/uefi.org\/sites\/default\/files\/resources\/UEFI_Shell_2_2.pdf\" data-type=\"URL\" data-id=\"https:\/\/uefi.org\/sites\/default\/files\/resources\/UEFI_Shell_2_2.pdf\">\u6587\u6863<\/a>\uff09\u786e\u8ba4\u542f\u52a8\u9879<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Shell&gt; bcfg boot dump -v <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6dfb\u52a0\u542f\u52a8\u9879\uff0cEFI \u6587\u4ef6\u7684\u8def\u5f84\u53ef\u4ee5\u662f\u76f8\u5bf9\u6216\u8005\u7edd\u5bf9\u8def\u5f84<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Shell&gt; bcfg boot add 1 FS0:\\EFI\\GRUB\\grubx64.efi \"GRUB\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5230\u8fd9\u91cc\u91cd\u542f\u5c31\u53d1\u73b0\u786e\u5b9e\u6210\u529f\u6dfb\u52a0\u4e86\u542f\u52a8\u9879\uff0c\u4e3b\u677f BIOS \u91cc\u4e5f\u80fd\u770b\u5230\u521a\u624d\u6dfb\u52a0\u7684 GRUB \u542f\u52a8\u6761\u76ee\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e48\u505a\u5176\u5b9e\u5f88\u6298\u817e\u800c\u4e14\u5728\u6211\u7684\u7cfb\u7edf\u4e0a\u4f9d\u65e7\u4e0d\u7a33\u5b9a\uff0c\u786c\u76d8\u5206\u533a\u5927\u5c0f\u53d1\u751f\u53d8\u5316\u90fd\u4f1a\u5bfc\u81f4\u4e3b\u677f\u4e0a\u7684\u542f\u52a8\u9879\u4e22\u5931\uff0c\u9700\u8981\u91cd\u65b0\u6dfb\u52a0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7ed3\u8bba &amp; \u9057\u7559\u95ee\u9898<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>\u770b\u8d77\u6765\u8fd9\u4e2a\u95ee\u9898\u5728\u5f88\u591a\u8bbe\u5907\u4e0a\u90fd\u51fa\u73b0\u8fc7\uff0c\u5e76\u975e\u4e0d\u5e38\u89c1\uff0c\u8fd9\u4e48\u770b\u6765\u4ee5\u540e\u5b89\u88c5\u65f6\u5e94\u8be5\u9ed8\u8ba4\u5b89\u88c5\u5230\u8fd9\u4e2a fallback \u8def\u5f84\u4e0b\uff08<code>EFI\/BOOT\/BOOTX64.EFI<\/code>\uff09\u624d\u5408\u7406\u5427\u3002<\/li><li>\u5982\u679c UEFI \u53ea\u8ba4\u56fa\u5b9a\u8def\u5f84\u7684 EFI \u6587\u4ef6\uff0c\u90a3\u4e48\u5728 UEFI Shell \u91cc\u901a\u8fc7 <code>bcfg <\/code>\u547d\u4ee4\u7684\u65b9\u6cd5\uff0c\u6211\u4e0d\u786e\u5b9a\u5728\u5176\u4ed6\u8bbe\u5907\u4e0a\u662f\u5426\u4e5f\u6210\u7acb\uff1b<\/li><li>bcfg \u6dfb\u52a0\u542f\u52a8\u9879\u7684\u65b9\u6cd5\u5728\u6211\u7684\u5fae\u661f\u4e3b\u677f\u4e0a\u662f\u4e00\u4e2a\u4e0d\u7a33\u5b9a\u7684\u65b9\u6cd5\uff0c\u66f4\u6362\u786c\u76d8\uff0c\u751a\u81f3\u8c03\u6574\u5206\u533a\u5927\u5c0f\u540e\u8fd9\u4e2a\u542f\u52a8\u9879\u90fd\u4f1a\u6d88\u5931\uff0c\u9700\u8981\u518d\u6b21\u624b\u52a8\u91cd\u65b0\u6dfb\u52a0\uff0c\u56e0\u6b64\u8fd8\u662f\u5c11\u6298\u817e\uff0c\u76f4\u63a5\u628a EFI \u6587\u4ef6\u653e\u5728\u6b63\u786e\u7684\u4f4d\u7f6e\u5427\u3002<\/li><li>\u4f60\u53ef\u5343\u4e07\u4e0d\u8981\u50cf\u9694\u58c1\u53d4\u53d4\u4e00\u6837\uff0c\u5927\u5e74\u521d\u4e8c\u8fd8\u5728\u4fee\u7535\u8111.jpg<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f \u8fc7\u5e74\u8fd9\u51e0\u5929\u5347\u7ea7\u4e86\u4e00\u4e0b\u5bb6\u91cc\u7684\u8f6f\u8def\u7531 &amp; NAS\uff0c\u4ece\u4e4b\u524d ASRock \u7684 H81 MATX \u4e3b\u677f\u6362 &hellip; <a href=\"https:\/\/andy9999678.me\/blog\/archives\/91\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u89e3\u51b3 MSI \u4e3b\u677f\u4e0a\u5b89\u88c5 ArchLinux \u65f6 UEFI \u4e0b GRUB \u542f\u52a8\u9879\u5931\u6548\u7684\u95ee\u9898<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":3,"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/posts\/91\/revisions\/100"}],"wp:attachment":[{"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andy9999678.me\/blog\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}