{"id":33406,"date":"2024-03-26T10:14:55","date_gmt":"2024-03-26T02:14:55","guid":{"rendered":"https:\/\/www.deepin.org\/?p=33406"},"modified":"2024-03-27T10:41:22","modified_gmt":"2024-03-27T02:41:22","slug":"install-the-rootfs-into-the-btrfs-subvolume","status":"publish","type":"post","link":"https:\/\/www.deepin.org\/zh\/install-the-rootfs-into-the-btrfs-subvolume\/","title":{"rendered":"\u3010Btrfs\u6b63\u5f53\u65f6\u3011\u5982\u4f55\u5c06\u7cfb\u7edf\u6b63\u786e\u5b89\u88c5\u5230 btrfs \u5b50\u5377\u5e76\u634f\u4e00\u4e2a\u6062\u590d\u73af\u5883"},"content":{"rendered":"<img loading=\"lazy\" src=\"https:\/\/storage.deepin.org\/thread\/202403260226206274_zh.png\" alt=\"\" width=\"900\" height=\"383\" \/><\/p>\n<p>\u4f5c\u8005\uff1aziggy<\/p>\n<h1 id=\"\u524d\u671f\u51c6\u5907\" style=\"text-align: center;\"><strong>\u524d\u671f\u51c6\u5907<\/strong><\/h1>\n<h2 id=\"\u5b89\u88c5\u51c6\u5907\"><strong>\u5b89\u88c5\u51c6\u5907<\/strong><\/h2>\n<ol>\n<li>\u51c6\u5907\u4e00\u4e2a\u7cfb\u7edf\u5b89\u88c5\u955c\u50cf\u5e76\u523b\u5f55\u5230\u79fb\u52a8\u5b58\u50a8\u8bbe\u5907\uff0c\u6700\u597d\u662f5.10+\u5185\u6838\uff0c\u5bf9btrfs\u652f\u6301\u4f1a\u66f4\u597d<\/li>\n<li>\u63d0\u524d\u5206\u4e24\u4e2a\u533a:<\/li>\n<\/ol>\n<ul>\n<li>\u4e00\u4e2abtrfs\u5206\u533a\u4f5c\u4e3a\u6bcd\u5377rootfs<\/li>\n<li>\u4e00\u4e2a\u53ef\u4ee5\u4f5c\u4e3a\u5b8c\u6574\u7cfb\u7edf\u8fd0\u884c\u7684live\u76d8<\/li>\n<li>\u4e00\u4e2a\u72ec\u7acb\u5206\u533a\u7528\u4e8e\u5b89\u88c5\u521d\u59cb\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5b89\u88c5\u5230btrfs\u5206\u533a\u4ee5\u5916\u7684\u72ec\u7acb\u786c\u76d8\u4e2d\uff0c\u5f53btrfs\u6240\u5728\u786c\u76d8\u635f\u574f\u65f6\u53ef\u4ee5\u4f5c\u4e3arootb\u5907\u4efd\u8fdb\u884c\u8fd8\u539f\u3002(\u5efa\u8bae)\u4f7f\u7528\u975ebtrfs\u683c\u5f0f\u7528\u4e8e\u533a\u5206<\/li>\n<\/ul>\n<h2 id=\"btrfs\u5206\u533a\u5212\u5206\u5b50\u5377\"><strong>btrfs\u5206\u533a\u5212\u5206\u5b50\u5377<\/strong><\/h2>\n<ol>\n<li>\u5c06btrfs\u5206\u533a\u6302\u8f7d\u5230\/mnt\u4e2d\uff0c\u5f00\u59cb\u521b\u5efa\u6240\u9700\u7684\u5b50\u5377<\/li>\n<\/ol>\n<p><em>ziggy@ziggy-PC:~$ lsblk -f<\/em><br \/>\n<em>NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS<\/em><br \/>\n<em>sdb<\/em><br \/>\n<em>\u251c\u2500sdb1 vfat FAT32 DCF5-3A2C \/boot\/efi<\/em><br \/>\n<em>\u251c\u2500sdb2 swap 1 swap e2a198a1-6e12-4248-bca8-b5cfbf4ce723 [SWAP]<\/em><br \/>\n<em>\u251c\u2500sdb3 btrfs deepin 68e253cf-9282-47b3-b087-9c5910950c88 89.9G 32% \/<\/em><\/p>\n<p>\u6839\u636elsblk\u5f97\u51fabtrfs\u5206\u533a\u4e3a\/dev\/sdb3\uff0c\u6302\u8f7d<\/p>\n<p><em>root@ziggy-PC:~# mount <span class=\"hljs-regexp\">\/dev\/<\/span>sdb3 <span class=\"hljs-regexp\">\/mnt\/<\/span><\/em><\/p>\n<ol start=\"2\">\n<li>\u5f53btrfs\u5206\u533a\u88ab\u6302\u8f7d\u5230\/mnt\u540e\uff0c\u6b64\u65f6\/mnt\u4e3abtrfs\u6bcd\u5377\uff0c\u672c\u8eab\u4e0d\u5177\u5907\u4efb\u4f55\u5b50\u5377\u529f\u80fd\u3002\u5e76\u4e14btrfs\u76ee\u524d\u4ecd\u5904\u4e8e\u53d1\u5c55\u9636\u6bb5\u548c\u53d6\u51b3\u4e8ebtrfs+grub\u5f15\u5bfc\u987a\u5e8f\uff0c\u5efa\u8bae\u5728\u7cfb\u7edf\u5b50\u5377\u4ee5\u5916\u5355\u72ec\u8bbe\u7f6e\u4e00\u4e2a\u6839\u5b50\u5377\u5145\u5f53\u5f15\u5bfc\u4e2d\u8f6c\u7684\u4f5c\u7528\u3002<\/li>\n<li>\u4ee5\u4e0b\u793a\u4f8b\u4f9d\u6b21\u8bbe\u7f6e\u5b50\u5377\"@main(btrfs\u6839\u5377),@home(\u7528\u6237\u4e3b\u76ee\u5f55),@opt(\u5e94\u7528\u76ee\u5f55),@root(root\u4e3b\u76ee\u5f55\uff0c\u53ef\u9009)\"<\/li>\n<\/ol>\n<p><em>root@ziggy-PC:\/mnt# btrfs subvolume create \/mnt\/@main<\/em><br \/>\n<em>root@ziggy-PC:\/mnt# btrfs subvolume create \/mnt\/@home<\/em><br \/>\n<em>root@ziggy-PC:\/mnt# btrfs subvolume create \/mnt\/@opt<\/em><br \/>\n<em>root@ziggy-PC:\/mnt# btrfs subvolume create \/mnt\/@root<\/em><\/p>\n<p>&nbsp;<\/p>\n<h1 id=\"\u7cfb\u7edf\u90e8\u7f72\" style=\"text-align: center;\"><strong>\u7cfb\u7edf\u90e8\u7f72<\/strong><\/h1>\n<h2 id=\"\u521d\u59cb\u7cfb\u7edf\u5b89\u88c5\"><strong>\u521d\u59cb\u7cfb\u7edf\u5b89\u88c5<\/strong><\/h2>\n<ol>\n<li>\u5f15\u5bfc\u8fdb\u5165\u5b89\u88c5\u4ecb\u8d28\uff0c\u9009\u62e9\u975ebtrfs\u683c\u5f0f\u7684\u5377\u4f5c\u4e3a\"\/\"\u6302\u8f7d\u70b9\u8fdb\u884c\u5b89\u88c5\uff0c\u5b89\u88c5\u65f6\u5c3d\u91cf\u9009\u62e9\u4ec5\"\/\"\u6302\u8f7d\u70b9\u8fdb\u884c\u5b89\u88c5\uff0c\u65b9\u4fbf\u540e\u7eed\u8fdb\u884c\u6570\u636e\u8fc1\u79fb\uff0c\u5efa\u8bae\u7684\u6302\u8f7d\u65b9\u6848:\"\/\"\u6839\u76ee\u5f55(\u5fc5\u987b)\uff0c\u4ea4\u6362\u6587\u4ef6swap files(\u53ef\u9009),efi(\u5982\u679c\u662fUEFI\u5f15\u5bfc\u7684\u8bdd)<\/li>\n<\/ol>\n<h2 id=\"\u4e7e\u5764\u5927\u632a\u79fb\"><strong>\u4e7e\u5764\u5927\u632a\u79fb<\/strong><\/h2>\n<p>\u5904\u4e8e\u603b\u6240\u5468\u77e5\u7684\u4e24\u4e2a\u539f\u56e0\uff0c\u5728\u5b89\u88c5\u5b8c\u521d\u59cb\u7cfb\u7edf\u540e\uff0c\u5982\u679c\u6211\u4eec\u60f3\u8981\u8ba9\u7cfb\u7edf\u6b63\u5e38\u5728btrfs\u5377\u4e0a\u8fd0\u884c\u5e76\u4f7f\u80fd\u5feb\u7167\u529f\u80fd\uff0c\u5c31\u9700\u8981\u624b\u52a8\u5c06\u5df2\u7ecf\u5b89\u88c5\u597d\u7684\u7cfb\u7edf\u8fc1\u79fb\u5230btrfs\u5b50\u5377\u4e2d<\/p>\n<ol>\n<li>\u76ee\u524d\u5b89\u88c5\u5668\u6682\u4e0d\u652f\u6301\u76f4\u63a5\u5c06\u7cfb\u7edf\u5b89\u88c5\u5230btrfs\u5b50\u5377\u4e2d<\/li>\n<li>deepin\u5b89\u88c5\u5668\u76ee\u524d\u7b56\u7565\u5bfc\u81f4\u5b89\u88c5\u5b8c\u7cfb\u7edf\u4f46\u5e76\u672a\u8fdb\u5165\u7528\u6237\u914d\u7f6e\u9636\u6bb5\u65f6\uff0c\u6b64\u65f6\u7684\u7cfb\u7edf\u62e5\u6709\u76f8\u5bf9\u6700\u5e72\u51c0\u7684\u73af\u5883<\/li>\n<li>\u901a\u8fc7\u67e5\u770blsblk,\u8bb0\u5f55\/dev\/sda1\u4e3a\u521d\u59cb\u7cfb\u7edf\u7684\u5b89\u88c5\u76ee\u5f55\uff0c\/dev\/sdb3\/@main\u5219\u4e3abtrfs\u5206\u533a\u4e2d\u7684\u6839\u5377<\/li>\n<\/ol>\n<p><em>sda <\/em><br \/>\n<em>\u251c\u2500sda1 ext4 1.0 Roota a7f4b3d4-5d3d-45a1-a27b-798aa6fbae48 30.7G 26% \/media\/ziggy\/Roota<\/em><br \/>\n<em>sdb <\/em><br \/>\n<em>\u251c\u2500sdb1 vfat FAT32 DCF5-3A2C \/boot\/efi<\/em><br \/>\n<em>\u251c\u2500sdb2 swap 1 swap e2a198a1-6e12-4248-bca8-b5cfbf4ce723 [SWAP]<\/em><br \/>\n<em>\u251c\u2500sdb3 btrfs deepin 68e253cf-9282-47b3-b087-9c5910950c88 89.9G 32% \/mnt<\/em><\/p>\n<ol start=\"4\">\n<li>\u786e\u8ba4\u540e\u901a\u8fc7rsync\u6765\u8fdb\u884c\u6570\u636e\u8fc1\u79fb\uff0c\u7531\u4e8e\u672c\u793a\u4f8b\u4e2d\u8fd8\u5355\u72ec\u5212\u5206\u4e86\"@home,@opt,@root\"\uff0c\u56e0\u6b64\u8fd8\u9700\u8981\u5c06\u521d\u59cb\u7cfb\u7edf\u4e2d\u5bf9\u5e94\u76ee\u5f55\u7684\u6570\u636e\u8fc1\u79fb\u5230\u5b50\u5377\u4e2d\u3002<\/li>\n<\/ol>\n<p><em>root@ziggy-PC:\/mnt# rsync -avrP \/media\/ziggy\/Roota \/mnt\/@main<\/em><br \/>\n<em>root@ziggy-PC:\/mnt# rsync -avrP \/media\/ziggy\/Roota\/opt \/mnt\/@opt<\/em><br \/>\n<em>root@ziggy-PC:\/mnt# rsync -avrP \/media\/ziggy\/Roota\/home \/mnt\/@home<\/em><br \/>\n<em>root@ziggy-PC:\/mnt# rsync -avrP \/media\/ziggy\/Roota\/root \/mnt\/@root<\/em><\/p>\n<h2 id=\"\u6587\u4ef6\u914d\u7f6e\"><strong>\u6587\u4ef6\u914d\u7f6e<\/strong><\/h2>\n<p>\u6570\u636e\u8fc1\u79fb\u5b8c\u6210\u540e\uff0c\u7531\u4e8ebtrfs\u5377\u4e0e\u7cfb\u7edf\u539f\u5b89\u88c5\u8def\u5f84\u4e0d\u4e00\u81f4\u4ee5\u53ca\u7cfb\u7edf\u5b89\u88c5\u5230btrfs\u5b50\u5377\u540e\u7684\u5f15\u5bfc\u987a\u5e8f\uff0c\u9700\u8981\u5bf9\u6570\u4e2a\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u91cd\u65b0\u914d\u7f6e<\/p>\n<p>\"Firmware\u56fa\u4ef6==&gt;efi\u5f15\u5bfc\u6587\u4ef6==&gt;Grub==&gt;Btrfs\u6bcd\u5377==&gt;Btrfs\u5b50\u5377Grub==&gt;Btrfs\u5b50\u5377rootfs\"<\/p>\n<p id=\"-boot\u76ee\u5f55\"><strong>\/boot\u76ee\u5f55<\/strong><\/p>\n<p>\/boot\u76ee\u5f55\u4e2d\u9700\u8981\u5bf9grub.cfg\u5f15\u5bfc\u6587\u4ef6\u8fdb\u884c\u4fee\u6539\uff0c\u8fd9\u91cc\u53ef\u4ee5\u5206\u4e3a\u51e0\u6b65<\/p>\n<ol>\n<li>\u901a\u8fc7\u641c\u7d22\u5c06\u521d\u59cb\u7cfb\u7edf\u7684UUID\u6279\u91cf\u66ff\u6362\u4e3abtrfs\u6bcd\u5377\u7684UUID<\/li>\n<\/ol>\n<p><img class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202403241416143816_%E6%88%AA%E5%9B%BE_%E9%80%89%E6%8B%A9%E5%8C%BA%E5%9F%9F_20240324215338.png\" alt=\"\u622a\u56fe_\u9009\u62e9\u533a\u57df_20240324215338.png\" \/><\/p>\n<ol>\n<li>\u89c2\u5bdfgrub.cfg\u6587\u4ef6\u4e2d\u5bf9\u7cfb\u7edf\u7edd\u5bf9\u8def\u5f84\u7684\u5f15\u7528\uff0c\u5728\"\/\"\u524d\u52a0\u4e0a\"\/@main\"\uff0c\u8868\u660e\u8be5\u8def\u5f84\u4fee\u6539\u540e\u4e3a\u5b50\u5377\u4e2d\u7684\u8def\u5f84<\/li>\n<\/ol>\n<p><img class=\"aligncenter\" src=\"https:\/\/storage.deepin.org\/thread\/202403241416209317_%E6%88%AA%E5%9B%BE_%E9%80%89%E6%8B%A9%E5%8C%BA%E5%9F%9F_20240324215426.png\" alt=\"\u622a\u56fe_\u9009\u62e9\u533a\u57df_20240324215426.png\" \/><\/p>\n<ol>\n<li>\u5728linux\u884c\u5185\u6838\u542f\u52a8\u53c2\u6570\u4e2d\u6dfb\u52a0\"rootflags=subvol=@main\"\u6307\u793agrub\u5f15\u5bfcbtrfs\u6bcd\u5377\u4e2d\u7684@main\u5b50\u5377<\/li>\n<\/ol>\n<p><em> linux \/@main\/boot\/vmlinuz-6.1.32-amd64-desktop-hwe root=UUID=68e253cf-9282-47b3-b087-9c5910950c88 ro splash quiet rootflags=subvol=@main DEEPIN_GFXMODE=$DEEPIN_GFXMODE<\/em><br \/>\n<em>initrd \/@main\/boot\/initrd.img-6.1.32-amd64-desktop-hwe<\/em><\/p>\n<p id=\"-etc\u76ee\u5f55\"><strong>\/etc\u76ee\u5f55<\/strong><\/p>\n<ol>\n<li>\u4fee\u6539fstab\u6587\u4ef6\uff0c\u6839\u636e\u5b9e\u9645\u7684\u5b50\u5377\u548c\u9700\u6c42\u60c5\u51b5\u6765\u4fee\u6539\u6302\u8f7d\u4fe1\u606f\uff0c\u6b64\u5904\u6838\u5fc3\u7684\u4e3a\u6839\u76ee\u5f55\u6302\u8f7d\u70b9\u8bbe\u7f6e\uff0c\u5176\u4ed6\u6302\u8f7d\u70b9\u53ef\u4ee5\u53c2\u8003\u6839\u76ee\u5f55\u6302\u8f7d\u70b9\u6765\u8fdb\u884c\u4fee\u6539\uff0c\u4ec5\u9700\u4fee\u6539subvol\u6307\u5411\u5b50\u5377<\/li>\n<\/ol>\n<p><em># &lt;file system&gt; &lt;mount point&gt; &lt;type&gt; &lt;options&gt; &lt;dump&gt; &lt;pass&gt;<\/em><br \/>\n<em># \/dev\/sdb1 LABEL=Roota<\/em><br \/>\n<em>UUID=68e253cf-9282-47b3-b087-9c5910950c88 \/ btrfs rw,relatime,ssd,compress=zstd,subvol=@main 0 1<\/em><\/p>\n<p><em>UUID=68e253cf-9282-47b3-b087-9c5910950c88 \/home btrfs rw,relatime,ssd,subvol=@home 0 1<\/em><\/p>\n<p><em>UUID=68e253cf-9282-47b3-b087-9c5910950c88 \/opt btrfs rw,relatime,ssd,subvol=@opt 0 1<\/em><\/p>\n<ol start=\"2\">\n<li>\u4fee\u6539\/etc\/default\/grub\u6587\u4ef6\uff0c\u5728\"GRUB_CMDLINE_LINUX_DEFAULT\"\u5b57\u6bb5\u4e2d\u6dfb\u52a0\u201crootflags=subvol=@main\u201d\uff0c\u8fd9\u6837\u5728grub update\u540e\u624d\u4f1a\u81ea\u52a8\u5728\u65b0\u7684grub\u6587\u4ef6\u4e2d\u81ea\u52a8\u6dfb\u52a0\u8be5\u542f\u52a8\u547d\u4ee4<\/li>\n<\/ol>\n<p><em>root@ziggy-PC:\/boot\/grub# cat \/etc\/default\/grub<\/em><br \/>\n<em># Written by org.deepin.dde.Grub2<\/em><br \/>\n<em>GRUB_CMDLINE_LINUX_DEFAULT=\"splash quiet rootflags=subvol=@main\"<\/em><\/p>\n<p id=\"EFI\u76ee\u5f55-\u5982\u679c\u662fUEFI\u5f15\u5bfc\u7684\u8bdd-\"><strong>EFI\u76ee\u5f55(\u5982\u679c\u662fUEFI\u5f15\u5bfc\u7684\u8bdd)<\/strong><\/p>\n<ol>\n<li>\u901a\u8fc7lsblk\u67e5\u770b\u5f97\u77e5\/boot\/efi\u6302\u8f7d\u70b9\u6240\u5728\u5206\u533a\u7684UUID\u5e76\u6302\u8f7d\u5230\/mnt\u4e2d<\/li>\n<\/ol>\n<p><em>root@ziggy-PC:\/boot\/grub#mount \/dev\/sdb1 \/mnt<\/em><\/p>\n<ol start=\"2\">\n<li>\u8fdb\u5165\/mnt\u76ee\u5f55\uff0c\u627e\u5230boot\u548cdeepin\u76ee\u5f55\uff0c\u4fee\u6539grub.cfg\u6587\u4ef6.\u5c06\"search.fs_uuid\"\u4fee\u6539\u4e3abtrfs\u6bcd\u5377\u5bf9\u5e94\u7684UUID\u4fe1\u606f\uff0c\"set prefix\"\u4e2d\u52a0\u5165\u5b50\u5377\u5bf9\u5e94\u7684\u8def\u5f84\"<\/li>\n<\/ol>\n<p><em>root@ziggy-PC:\/boot\/efi\/EFI\/deepin# cat grub.cfg <\/em><br \/>\n<em>search.fs_uuid 68e253cf-9282-47b3-b087-9c5910950c88 root hd0,gpt2<\/em><br \/>\n<em>set prefix=($root)'\/@main\/boot\/grub'<\/em><br \/>\n<em>configfile $prefix\/grub.cfg<\/em><\/p>\n<h2 id=\"\u5feb\u7167\u90e8\u7f72\"><strong>\u5feb\u7167\u90e8\u7f72<\/strong><\/h2>\n<p>\u7531\u4e8e\u524d\u6587\u63d0\u53ca@main\u5b50\u5377\u7528\u4e8e\u6839\u5377\u4e0d\u6253\u7b97\u4f5c\u4e3a\u5e38\u7528\u7cfb\u7edf\u5b50\u5377\u4f7f\u7528\uff0c\u56e0\u6b64\u5728\u8be5\u57fa\u7840\u4e0a\u521b\u5efa\u4e00\u4e2a@sys\u5feb\u7167\u5b50\u5377\u6765\u4f5c\u4e3a\u65e5\u7528\u73af\u5883<\/p>\n<p><em>root@ziggy-PC:\/# btrfs subvolume snapshot \/mnt\/@main \/mnt\/@sys<\/em><\/p>\n<p>\u5feb\u7167\u521b\u5efa\u5b8c\u6210\u540e\uff0c\u7531\u4e8e\u5b50\u5377\u53d1\u751f\u6539\u53d8\uff0c\u56e0\u6b64\u9700\u8981\u91cd\u590d\"### \u6587\u4ef6\u914d\u7f6e\"\u6b65\u9aa4\u6765\u8c03\u6574\u65b0\u5b50\u5377\u7684\u5185\u5bb9\uff0c\u4f46\u901a\u7528\u6587\u4ef6\u4e0d\u9700\u8981\u6539\u52a8<\/p>\n<p id=\"-boot\u76ee\u5f55-\"><strong>\/boot\u76ee\u5f55<\/strong><\/p>\n<ol>\n<li>\u4fee\u6539@sys\u5b50\u5377\u4e2d\u7684grub.cfg\u6587\u4ef6\uff0c\u5728linux\u884c\u5185\u6838\u542f\u52a8\u53c2\u6570\u4e2d\u6dfb\u52a0\"rootflags=subvol=@sys\"\u6307\u793agrub\u5f15\u5bfcbtrfs\u6bcd\u5377\u4e2d\u7684@sys\u5b50\u5377\uff0c\u5e76\u4e14\u8be5\u5f15\u5bfc\u9879\u4e2d\u7684initrd\u548clinux\u8def\u5f84\u5747\u9700\u8981\u4fee\u6539\u4e3a\u5f53\u524d\u7cfb\u7edf@sys\u5b50\u5377<\/li>\n<\/ol>\n<p id=\"-etc\u76ee\u5f55-\"><strong>\/etc\u76ee\u5f55<\/strong><\/p>\n<ol>\n<li>\u4fee\u6539@sys\u5b50\u5377\u4e2d\u7684fstab\u6587\u4ef6\uff0c\u6839\u636e\u5b9e\u9645\u7684\u5b50\u5377\u548c\u9700\u6c42\u60c5\u51b5\u6765\u4fee\u6539\u6302\u8f7d\u4fe1\u606f\uff0c\u6b64\u5904\u6838\u5fc3\u7684\u4e3a\u6839\u76ee\u5f55\u6302\u8f7d\u70b9\u8bbe\u7f6e\uff0c\u5176\u4ed6\u6302\u8f7d\u70b9\u53ef\u4ee5\u53c2\u8003\u6839\u76ee\u5f55\u6302\u8f7d\u70b9\u6765\u8fdb\u884c\u4fee\u6539\uff0c\u4ec5\u9700\u4fee\u6539subvol\u6307\u5411\u5b50\u5377<\/li>\n<li>\u4fee\u6539@sys\u5b50\u5377\u4e2d\u7684\/etc\/default\/grub\u6587\u4ef6\uff0c\u5728\"GRUB_CMDLINE_LINUX_DEFAULT\"\u5b57\u6bb5\u4e2d\u6dfb\u52a0\u201crootflags=subvol=@sys\u201d\uff0c\u8fd9\u6837\u5728grub update\u540e\u624d\u4f1a\u81ea\u52a8\u5728\u65b0\u7684grub\u6587\u4ef6\u4e2d\u81ea\u52a8\u6dfb\u52a0\u8be5\u542f\u52a8\u547d\u4ee4<\/li>\n<\/ol>\n<h2 id=\"\u521d\u59cb\u5316\u90e8\u7f72\"><strong>\u521d\u59cb\u5316\u90e8\u7f72<\/strong><\/h2>\n<p>\u7531\u4e8e\"\u521d\u59cb\u5316\"\u73af\u5883\u672c\u8d28\u4e0a\u8fd8\u662f\u4ee5\u5feb\u7167\u5b50\u5377\u7684\u5f62\u5f0f\u5b58\u5728\uff0c\u56e0\u6b64\u4ec5\u9700\u8981\u53c2\u8003\u524d\u9762\u5feb\u7167\u90e8\u7f72\u5185\u5bb9\u5373\u53ef\u5b8c\u6210\u90e8\u7f72\u3002\u5373\u5bf9@sys\u5b50\u5377\u505a\u53ea\u8bfb\u5feb\u7167\u64cd\u4f5c\u4e3a\u540cbtrfs\u6bcd\u5377\u4e0b\u7684\"@snaps\/@restore\u5b50\u5377\"(\u652f\u6301\u4e2a\u4eba\u4e60\u60ef\u7684\u81ea\u5b9a\u4e49)\u4ee5\u53ca\u4fee\u6539\/etc\u5bf9\u5e94\u6587\u4ef6\u5373\u53ef\u5b8c\u6210.snapshots\u7684\"-r\" \u53c2\u6570\u4e3a\u53ea\u8bfb\u5feb\u7167<\/p>\n<p><em>root@ziggy-PC:\/# btrfs subvolume snapshot -r \/mnt\/@sys \/mnt\/@snaps\/@restore<\/em><\/p>\n<p>\u7531\u4e8e\u901a\u8fc7\u5b89\u88c5\u5668\u5b89\u88c5\u7684\u7cfb\u7edf\u4e00\u822c\u8fd8\u4f1a\u9644\u5c5e\"\u9ad8\u7ea7\u83dc\u5355\"\uff0c\u4e2a\u4eba\u5efa\u8bae\u76f4\u63a5\u5229\u7528\u9ad8\u7ea7\u83dc\u5355\uff0c\u5c06\u5176\u63cf\u8ff0\u4fee\u6539\u4e3aRestore\uff0cinitrd\u548clinux\u8def\u5f84\u4fee\u6539\u4e3a\u81ea\u5df1\u7684\u521d\u59cb\u5316\u73af\u5883\u5b50\u5377\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u5728\u9009Restore\u83dc\u5355\u5f15\u5bfc\u65f6\u8fdb\u5165\u521d\u59cb\u5316\u73af\u5883\u4e86\u3002<br \/>\n<strong>\u4f46\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5efa\u8bae\u6062\u590d\u65f6\u662f\u4ee5\u5feb\u7167\u7684\u5f62\u5f0f\u5148\u5c06\"@restore\u5b50\u5377\"\u6062\u590d\u5230\u4e00\u4e2a\u65b0\u5b50\u5377\u4e2d\u518d\u8fdb\u884c\u7528\u6237\u914d\u7f6e\u73af\u8282\u64cd\u4f5c\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u6781\u5927\u7a0b\u5ea6\u907f\u514d\u521d\u59cb\u5316\u73af\u5883\u88ab\u7834\u574f\u4e86.<\/strong><\/p>\n<p>\u53c2\u8003\u6587\u732e:\u00a0<a href=\"https:\/\/bbs.deepin.org\/user\/269061\">@AMZ<\/a>\u00a0<a href=\"https:\/\/bbs.deepin.org\/post\/217231\" target=\"_blank\" rel=\"noopener\">\u5c06uos\/deepin\u8fd0\u884c\u5728btrfs\u6587\u4ef6\u7cfb\u7edf\uff0c\u5e76\u542f\u7528\u5feb\u7167\u529f\u80fd<\/a><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: right;\">\u5185\u5bb9\u6765\u6e90\uff1a<a href=\"https:\/\/bbs.deepin.org\/post\/269851\">deepin \u793e\u533a<\/a><\/p>\n<p style=\"text-align: right;\">\u5185\u5bb9\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u51fa\u5904<\/p>","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1aziggy \u524d\u671f\u51c6\u5907 \u5b89\u88c5\u51c6\u5907 \u51c6\u5907\u4e00\u4e2a\u7cfb\u7edf\u5b89\u88c5\u955c\u50cf\u5e76\u523b\u5f55\u5230\u79fb\u52a8\u5b58\u50a8\u8bbe\u5907\uff0c\u6700\u597d\u662f5.10+\u5185\u6838\uff0c\u5bf9btrfs\u652f\u6301\u4f1a\u66f4\u597d \u63d0\u524d\u5206\u4e24\u4e2a\u533a: \u4e00\u4e2abtrfs\u5206\u533a\u4f5c\u4e3a\u6bcd\u5377rootfs \u4e00\u4e2a\u53ef\u4ee5\u4f5c\u4e3a\u5b8c\u6574\u7cfb\u7edf\u8fd0\u884c\u7684live\u76d8 \u4e00\u4e2a\u72ec\u7acb\u5206\u533a\u7528\u4e8e\u5b89\u88c5\u521d\u59cb\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5b89\u88c5\u5230btrfs\u5206\u533a\u4ee5\u5916\u7684\u72ec\u7acb\u786c\u76d8\u4e2d\uff0c\u5f53btrfs\u6240\u5728\u786c\u76d8\u635f\u574f\u65f6\u53ef\u4ee5\u4f5c\u4e3arootb\u5907\u4efd\u8fdb\u884c\u8fd8\u539f\u3002(\u5efa\u8bae)\u4f7f\u7528\u975ebtrfs\u683c\u5f0f\u7528\u4e8e\u533a\u5206 btrfs\u5206 ...<a href=https:\/\/www.deepin.org\/zh\/install-the-rootfs-into-the-btrfs-subvolume\/>\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":11164,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[155,93],"tags":[],"_links":{"self":[{"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/posts\/33406"}],"collection":[{"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/users\/11164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/comments?post=33406"}],"version-history":[{"count":10,"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/posts\/33406\/revisions"}],"predecessor-version":[{"id":33418,"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/posts\/33406\/revisions\/33418"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/media?parent=33406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/categories?post=33406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deepin.org\/zh\/wp-json\/wp\/v2\/tags?post=33406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}