{"id":2820,"date":"2021-05-10T00:47:49","date_gmt":"2021-05-09T16:47:49","guid":{"rendered":"https:\/\/jir.idv.tw\/wordpress\/?p=2820"},"modified":"2021-05-11T08:45:14","modified_gmt":"2021-05-11T00:45:14","slug":"ubuntu%e7%b3%bb%e7%b5%b1%e8%8b%a5%e5%ae%89%e8%a3%9d%e5%9c%a8usb%e8%a3%9d%e7%bd%ae-%e9%96%8b%e6%a9%9f%e5%92%8c%e8%ae%80%e5%8f%96%e5%be%88%e6%85%a2%e7%9a%84%e8%a7%a3%e6%b3%95","status":"publish","type":"post","link":"https:\/\/jir.idv.tw\/wordpress\/?p=2820","title":{"rendered":"UBUNTU\u7cfb\u7d71\u82e5\u5b89\u88dd\u5728USB\u88dd\u7f6e \u958b\u6a5f\u548c\u8b80\u53d6\u5f88\u6162\u7684\u89e3\u6cd5"},"content":{"rendered":"<p>USB\u8a18\u61b6\u5361\u5b89\u88ddUBUNTU\u7cfb\u7d71\u5f8c\uff0c\u660e\u986f\u901f\u5ea6\u6c92\u6709\u50cfLIVE USB\u7528RAMDISK\u7684\u901f\u5ea6\u3002<br \/>\n\u9019\u500b\u53ef\u80fd\u662f\u89e3\u65b9\uff0c\u9084\u5728\u6e2c\u8a66\u61c9\u7528\u4e2d\u3002<\/p>\n<p><strong>\u65b9\u6848\u4e00\uff0c<\/strong>\u6e1b\u5c11\u6a94\u6848\u8b80\u5beb\u4e00\u76f4\u540c\u6b65\u7f6e\u63db\u8b80\u5beb\u5230USB\u8a18\u61b6\u5361<br \/>\n\u7de8\u8f2f\/etc\/sysctl.conf<br \/>\n<code>vm.swappiness = 0<br \/>\nvm.dirty_background_ratio = 20<br \/>\nvm.dirty_expire_centisecs = 0<br \/>\nvm.dirty_ratio = 80<br \/>\nvm.dirty_writeback_centisecs = 6000<\/code><\/p>\n<p><strong>\u65b9\u6848\u4e8c\uff0c<\/strong>\u6e2c\u8a66\u76ee\u524d\u8dd1USB\u7684\u901f\u5ea6\u662f\u591a\u5c11\uff0c\u6211\u6e2c\u8a66\u7d0430MS\/s\u4e0a\u4e0b\uff0cUSB2.0\u6709\u9ede\u6162\u3002\u639b\u8f09\u9069\u5408\u7684USB\u6a21\u7d44\u9a45\u52d5\u3002<br \/>\nhdparm -tT \/dev\/sda<br \/>\n\u6240\u4ee5\u7de8\u8f2f\/etc\/initramfs-tools\/modules\u5169\u884c\u5f8c\u91cd\u958b\u6a5f\u3002<br \/>\n<code>ohci_hcd<br \/>\nehci_hcd<\/code><\/p>\n<p><strong>\u65b9\u6848\u4e09\uff0c<\/strong>\u95dc\u9589SWAP\u6a94\u6848\uff0c\u76f4\u63a5\u7528\u8a18\u61b6\u9ad4\u3002<br \/>\n\u770b\/etc\/fstab\u7684\u5167\u5bb9\uff0c\u628aSWAP\u90a3\u884c#\u6a19\u8a18\u5ffd\u7565\u3002<br \/>\n\u7136\u5f8csudo swapoff\u6307\u4ee4\u95dc\u9589\u78c1\u5340\u6216\u6a94\u6848\u3002<\/p>\n<p>\u6587\u7ae0\u51fa\u8655\uff1a<br \/>\n<a href=\"https:\/\/askubuntu.com\/questions\/104504\/how-to-improve-the-speed-of-a-usb-based-installation-of-ubuntu\" rel=\"noopener\" target=\"_blank\">https:\/\/askubuntu.com\/questions\/104504\/how-to-improve-the-speed-of-a-usb-based-installation-of-ubuntu<\/a><\/p>\n<p><a href=\"https:\/\/odd.blog\/2009\/05\/07\/ubuntu-linux-slow-external-usb-drive\/\" rel=\"noopener\" target=\"_blank\">https:\/\/odd.blog\/2009\/05\/07\/ubuntu-linux-slow-external-usb-drive\/<\/a><\/p>\n<p><strong>***** 2021.05.11\u66f4\u65b0<\/strong><br \/>\n<strong>\u65b9\u6848\u56db\uff0c<\/strong>\u6e1b\u5c11\/var\u8cc7\u6599\u593e\u76f8\u5c0d\u4e0d\u91cd\u8981\u7684\u8b80\u5beb\u52d5\u4f5c\u3002<br \/>\n\u7de8\u8f2f\/etc\/fstab\uff0c\u52a0\u5165\u4e0b\u5217\u5e7e\u884c\u6558\u8ff0\u3002<br \/>\n<code># LOGS OFF START<br \/>\ntmpfs \/tmp tmpfs defaults,noatime,size=100M,mode=1777 0 0<br \/>\ntmpfs \/var\/tmp tmpfs defaults,noatime,mode=1777 0 0<br \/>\ntmpfs \/var\/log tmpfs defaults,noatime,mode=0755 0 0<br \/>\ntmpfs \/var\/log\/apt tmpfs defaults,noatime 0 0<br \/>\ntmpfs \/var\/log\/journal tmpfs defaults,noatime 0 0<br \/>\n# LOGS OFF END<\/code><\/p>\n<p><strong>\u65b9\u6848\u4e94\uff0c<\/strong>\u628a\u4e3b\u8981\u958b\u6a5f\u7cfb\u7d71\u90fd\u5c01\u88dd\u6210\u4e00\u500b\u6620\u50cf\u6a94\uff0c\u7528RAMDISK\u958b\u6a5f\uff0c\u53ea\u4fdd\u7559\u78c1\u5340\u7528\u4f86\u5b58\u653e\/home\u7684\u53ef\u4ee5\u4fee\u6539\u6a94\u6848\u3002<br \/>\n\u7f3a\u9ede\u662f\u6c92\u8fa6\u6cd5\u66f4\u65b0\u5957\u4ef6(\u5f88\u9ebb\u7169)\uff0c\u9069\u5408\u91cd\u8907\u55ae\u8abf\u7684\u5de5\u4f5c\u4e3b\u6a5f\u3002<br \/>\n\u8981\u600e\u9ebc\u88fd\u4f5c\u7684\u6b65\u9a5f\uff0c\u9084\u5728\u7814\u7a76\u4e2d\u3002\u5f85\u66f4\u65b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>USB\u8a18\u61b6\u5361\u5b89\u88ddUBUNTU\u7cfb\u7d71\u5f8c\uff0c\u660e\u986f\u901f\u5ea6\u6c92\u6709\u50cfLIVE USB\u7528RAMDISK\u7684\u901f\u5ea6\u3002 \u9019\u500b\u53ef\u80fd\u662f\u89e3\u65b9\uff0c\u9084\u5728\u6e2c\u8a66\u61c9\u7528\u4e2d\u3002 \u65b9\u6848\u4e00\uff0c\u6e1b\u5c11\u6a94\u6848\u8b80\u5beb\u4e00\u76f4\u540c\u6b65\u7f6e\u63db\u8b80\u5beb\u5230USB\u8a18\u61b6\u5361 \u7de8\u8f2f\/etc\/sysctl.conf vm.swappiness = 0 vm.dirty_background_ratio = 20 vm.dirty_expire_centisecs = 0 vm.dirty_ratio = 80 vm.dirty_writeback_centisecs = 6000 \u65b9\u6848\u4e8c\uff0c\u6e2c\u8a66\u76ee\u524d\u8dd1USB\u7684\u901f\u5ea6\u662f\u591a\u5c11\uff0c\u6211\u6e2c\u8a66\u7d0430MS\/s\u4e0a\u4e0b\uff0cUSB2.0\u6709\u9ede\u6162\u3002\u639b\u8f09\u9069\u5408\u7684USB\u6a21\u7d44\u9a45\u52d5\u3002 hdparm -tT \/dev\/sda \u6240\u4ee5\u7de8\u8f2f\/etc\/initramfs-tools\/modules\u5169\u884c\u5f8c\u91cd\u958b\u6a5f\u3002 ohci_hcd ehci_hcd \u65b9\u6848\u4e09\uff0c\u95dc\u9589SWAP\u6a94\u6848\uff0c\u76f4\u63a5\u7528\u8a18\u61b6\u9ad4\u3002 \u770b\/etc\/fstab\u7684\u5167\u5bb9\uff0c\u628aSWAP\u90a3\u884c#\u6a19\u8a18\u5ffd\u7565\u3002 \u7136\u5f8csudo swapoff\u6307\u4ee4\u95dc\u9589\u78c1\u5340\u6216\u6a94\u6848\u3002 \u6587\u7ae0\u51fa\u8655\uff1a https:\/\/askubuntu.com\/questions\/104504\/how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[],"class_list":["post-2820","post","type-post","status-publish","format-standard","hentry","category-4"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2820"}],"version-history":[{"count":4,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2820\/revisions"}],"predecessor-version":[{"id":2824,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2820\/revisions\/2824"}],"wp:attachment":[{"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jir.idv.tw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}