{"id":161601,"date":"2020-09-17T07:43:29","date_gmt":"2020-09-16T23:43:29","guid":{"rendered":"http:\/\/4563.org\/?p=161601"},"modified":"2020-09-17T07:43:29","modified_gmt":"2020-09-16T23:43:29","slug":"%e5%bc%95%e5%af%bc-linux-%e7%9a%84-rootfs-%e5%8f%82%e6%95%b0%e6%80%8e%e4%b9%88%e5%a1%ab%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=161601","title":{"rendered":"\u5f15\u5bfc Linux \u7684 rootfs \u53c2\u6570\u600e\u4e48\u586b\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5f15\u5bfc Linux \u7684 rootfs \u53c2\u6570\u600e\u4e48\u586b\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : archoot <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        bootloader\uff0cEFISTUB\uff0cUEFI shell \u7b49\u65b9\u5f0f\u5f15\u5bfc\u7b80\u5355\u5377\uff0cLVM\uff0cRAID\uff0cBtrfs\uff0cOpenZFS \u4e2d\u7684 Linux \u5185\u6838\uff0c\u5176\u4e2d rootfs<br \/>\u53c2\u6570\u5982\u4f55\u586b\u5199\uff1f<\/p>\n<p>\u6211\u7684 Btrfs \u5b50\u5377\u4e2d Arch Linux \u7684 grub.cfg \u90e8\u5206\u4ee3\u7801\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<p>linux \/main\/archlinux\/20200913\/boot\/vmlinuz-linux root=UUID=\u9a6c\u8d5b\u514b rw rootflags=subvol=main\/archlinux\/20200913 loglevel=3<\/p>\n<p>initrd \/main\/archlinux\/20200913\/boot\/initramfs-linux.img      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3496066\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mikeguan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90fd Arch Linux \u4e86\uff0c\u53ef\u80fd\u542f\u52a8\u6d41\u7a0b\u8fd8\u9700\u8981\u770b\u4e0b\uff0c\u8fd9\u90fd\u5565\u8def\u5f84\u540d\uff0c\u5efa\u8bae boot \u5355\u72ec\u5206\u533a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3496067\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : archoot <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mikeguan \u8fd9\u8def\u5f84\u540d\u5947\u602a\u7684\u539f\u56e0\u662f\u56e0\u4e3a\u6211\u7528\u4e86\u5feb\u7167\uff0c\/boot \u5355\u72ec\u5206\u533a\u5c31\u65e0\u6cd5\u987a\u5229\u4f7f\u7528\u5feb\u7167\u4e86\u3002\u6211\u4e3b\u8981\u662f\u60f3\u95ee\u8de8\u533a\u5377\u600e\u4e48\u5f15\u5bfc\u3002\u6211\u4e5f\u60f3\u95ee\u5982\u4f55\u4e0d\u4f7f\u7528 grub \u76f4\u63a5\u7528 UEFI \u5f15\u5bfc\uff08\u5373 EFISTUB \uff09\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3496068\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mikeguan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             boot \u4e0d\u9700\u8981\u4f7f\u7528\u5feb\u7167\uff0c\u4f60\u6709\u81ea\u5df1\u7684\u8003\u91cf\u4f7f\u7528\u5176\u4ed6\u6587\u4ef6\u7cfb\u7edf\u90a3\u5c31\u81ea\u5df1\u770b\u6587\u6863\uff1b<br \/>\u6d4b\u8bd5\u7684\u65f6\u5019\u53bb grub \u7684\u547d\u4ee4\u884c\uff0c\u6d4b\u8bd5\u5b8c\u518d\u5199\u914d\u7f6e\u6587\u4ef6\uff1b<br \/>\u8de8\u533a\u5377\u5f15\u5bfc\uff1f\u5b50\u5377\u4e0d\u5c31\u76f8\u5f53\u4e8e\u4e00\u4e2a\u5206\u533a\u4e48\uff0c\u6709\u4ec0\u4e48\u7279\u522b\u7684\u5417\uff1f\uff1b<br \/>\u4f7f\u7528\u5176\u4ed6\u5f15\u5bfc\u4f60\u53ef\u4ee5\u770b\u6587\u6863                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3496069\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : archoot <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @mikeguan <br \/>\u5c06\u5185\u6838\u4e24\u4e2a\u6587\u4ef6\u590d\u5236\u5230 ESP\uff0c\u7136\u540e\u8fd0\u884c\uff1a<br \/>efibootmgr -d \/dev\/sda -p 1 -c -L &#8220;Arch Linux&#8221; -l \/linux -u &#8220;root=\/dev\/sda2 rw rootflags=subvolid=1050 initrd=\/initrd.img&#8221;<br \/>\u4e4b\u540e\u542f\u52a8\u53ef\u4ee5\u8fdb\u684c\u9762;<\/p>\n<p>\u6211\u4ec5\u5206\u4e86 esp \u548c Btrfs \u5377,\u521b\u5efa\u4e86\u5b50\u5377 base\uff0cgrub\uff0chone\uff0croot\uff1a<\/p>\n<p>\/subvolid=5<br \/>\u2514\u2500\u2500 main<br \/> \u251c\u2500\u2500 archlinux<br \/> \u2502\u00a0\u00a0 \u2514\u2500\u2500 base<br \/> \u251c\u2500\u2500 grub<br \/> \u251c\u2500\u2500 home<br \/> \u2514\u2500\u2500 root<\/p>\n<p>\u5728 grub \u5b50\u5377\u4e0a\u5b89\u88c5 grub \uff08 grub-install \u5728 esp \u5206\u533a\u521b\u5efa\u4e86 grub.efi \uff09\uff0c\u5b89\u88c5 Arch Linux \u5728 base \u5b50\u5377\uff0c\u5728 main\/archlinux\/\u4e0b\u4e3a base \u521b\u5efa\u5feb\u7167\uff0c\u6700\u540e\u521b\u5efa grub.cfg \u3002<br \/>\u5e78\u597d\u6211 esp \u5206\u533a\u5206\u4e86 4GiB\uff0c\/boot \u5355\u72ec\u5206\u533a\u7684\u8bdd\u6211\u7684\u7406\u89e3\u662f\u5347\u7ea7\u5185\u6838\u4f1a\u597d\u50cf\u6709\u95ee\u9898\uff0c\u6240\u4ee5\u6211\u4fbf\u8fd9\u4e48\u7b80\u5355\u7c97\u66b4\uff0c\/boot \u5355\u72ec\u5206\u533a\u7684\u8bdd\u9002\u7528\u4e8e Btrfs \u5377\u5e94\u8be5\u5982\u4f55\u5b9e\u73b0\u7cfb\u7edf\u5feb\u7167\uff1f<\/p>\n<p>\u8de8\u533a\u5377\u662f Windows \u7684\u6982\u5ff5\uff0c\u6211\u5199\u9519\u4e86\u3002\u6211\u60f3\u8868\u8ff0\u7684\u662f\u8de8\u591a\u4e2a\u78c1\u76d8\u7684 rootfs \uff1b<\/p>\n<p>\u6211\u7684\u7535\u8111\u53ef\u4ee5\u540c\u65f6\u8bbf\u95ee 3 \u5757\u7269\u7406\u78c1\u76d8\uff0c\u5206\u522b\u662f sata \u7684 500G \u786c\u76d8\uff0cUMS \u7684 100G \u624b\u673a\uff0cUSB-HDD \u7684 32GB \u4f18\u76d8\uff0c\u5982\u679c\u6211\u8981\u5f3a\u5236\u7ec4\u8f6f RAID \uff08\u6211\u6ca1\u8bd5\u8fc7\uff09\u5e94\u8be5\u600e\u4e48\u73a9\uff1f<\/p>\n<p>\u4e5f\u8bb8\u8fd9\u662f\u5f88\u7b80\u5355\u7684\u4e8b\uff0c\u4f46\u6211\u4e0d\u591f\u6210\u719f\uff0c\u6ca1\u80fd\u529b\u53bb\u7814\u7a76\u6587\u6863\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5f15\u5bfc Linux \u7684 rootfs&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/161601"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161601"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/161601\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161601"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}