{"id":2340,"date":"2017-11-03T21:53:52","date_gmt":"2017-11-03T13:53:52","guid":{"rendered":"http:\/\/learn-house.idv.tw\/?p=2340"},"modified":"2020-12-25T11:06:44","modified_gmt":"2020-12-25T03:06:44","slug":"raspberry-pi-3%e9%96%8b%e6%a9%9f%e8%87%aa%e5%8b%95%e6%8e%9b%e8%bc%89-usb-%e9%9a%a8%e8%ba%ab%e7%a2%9f%e6%88%96%e5%a4%96%e6%8e%a5%e7%a1%ac%e7%a2%9f","status":"publish","type":"post","link":"https:\/\/learn-house.idv.tw\/?p=2340","title":{"rendered":"[Raspberry Pi 3]\u958b\u6a5f\u81ea\u52d5\u639b\u8f09 USB \u96a8\u8eab\u789f\u6216\u5916\u63a5\u786c\u789f"},"content":{"rendered":"<p>\u5982\u679cSD\u5361\u5df2\u7d93\u4e0d\u5920\u7528\uff0c\u525b\u597d\u6709\u5f88\u591a\u4e00\u76f4\u6c92\u7528\u5230\u7684USB\u96a8\u8eab\u789f\uff0c\u53ef\u4ee5\u8003\u616e\u76f4\u63a5\u639b\u8f09\u4f86\u589e\u52a0\u7a7a\u9593<br \/>\n\u82e5\u662f\u4f7f\u7528\u5916\u63a52.5\u540b\u96a8\u8eab\u786c\u789f\u5247\u9700\u8cfc\u8cb7\u6709\u63d0\u4f9bpower\u7684\u624d\u6709\u8fa6\u6cd5\u8d77\u5f97\u4f86\uff0c\u6a39\u6885\u6d3e\u76845v\u662f\u9a45\u52d5\u4e0d\u8d77\u4f86\u7684<\/p>\n<h2>STEP 1<\/h2>\n<p>\u5982\u679c\u60a8\u7684 USB \u96a8\u8eab\u789f\u4f7f\u7528\u7684\u6a94\u6848\u7cfb\u7d71\u683c\u5f0f\u662f NTFS \u7684\u8a71\uff0c\u8acb\u5148\u5b89\u88dd ntfs-3g \u5957\u4ef6\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\n#apt-get install ntfs-3g\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!--more--><\/p>\n<h2>STEP 2<\/h2>\n<p>\u63d2\u4e0a USB \u96a8\u8eab\u789f\u4e4b\u5f8c\uff0c\u4f9d\u64da UUID \u67e5\u770b\u6240\u6709\u7684\u786c\u789f\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\n#ls -l \/dev\/disk\/by-uuid\/\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8f38\u51fa\u6703\u985e\u4f3c\u9019\u6a23\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\nlrwxrwxrwx 1 root root 10  2\u6708 12  2016 4844A6C744A6B6DA -> ..\/..\/sda1<br \/>\nlrwxrwxrwx 1 root root 15  2\u6708 12  2016 9d97a4df-a4eb-4b09-92b6-bb1ccfade0ee -> ..\/..\/mmcblk0p2<br \/>\nlrwxrwxrwx 1 root root 15  2\u6708 12  2016 EAD0-90DA -> ..\/..\/mmcblk0p1\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f9e\u9019\u88e1\u6211\u5011\u5c31\u53ef\u4ee5\u770b\u5230\u6bcf\u4e00\u500b\u786c\u789f\u6216\u662f MicroSD \u5361\u5206\u5272\u5340\u6240\u5c0d\u61c9\u7684 UUID\uff0cmmcblk \u958b\u982d\u7684\u90fd\u662f\u8a18\u61b6\u5361\uff0c\u800c\u4e00\u822c\u7684 USB \u96a8\u8eab\u789f\u90fd\u662f\u4ee5 sd \u958b\u982d\uff0c\u4ee5\u9019\u500b\u4f8b\u5b50\u800c\u8a00\uff0cUSB \u96a8\u8eab\u789f\u662f sda1\uff0c\u5c0d\u61c9\u7684 UUID \u70ba 4844A6C744A6B6DA\u3002<\/p>\n<h2>STEP 3<\/h2>\n<p>\u5728 \/media \u4e0b\u9762\u5efa\u7acb\u4e00\u500b\u639b\u8f09\u7528\u7684\u76ee\u9304\uff0c\u4e26\u8a2d\u5b9a\u597d\u9069\u7576\u7684\u6b0a\u9650\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\n#mkdir \/media\/USB<br \/>\n#chmod 770 \/media\/USB\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>STEP 4<\/h2>\n<p>\u67e5\u8a62\u4e00\u4e0b pi \u4f7f\u7528\u8005\u7684 user id \u8207 group id\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\n#grep pi \/etc\/passwd\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8f38\u51fa\u70ba<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\npi:x:1000:1000:,,,:\/home\/pi:\/bin\/bash\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7b2c\u4e09\u6b04\u8207\u7b2c\u56db\u6b04\u5c31\u662f uid \u8207 gid\uff0c\u901a\u5e38\u90fd\u662f 1000\u3002<\/p>\n<h2>STEP 5<\/h2>\n<p>\u9032\u884c\u639b\u8f09\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\n#mount -t ntfs-3g -o uid=1000,gid=1000,umask=007 \/dev\/sda1 \/media\/USB\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5176\u4e2d\u7684 -t ntfs-3g \u662f\u6307\u5b9a\u6a94\u6848\u7cfb\u7d71\u70ba NTFS\uff0c\u5176\u9918\u53ef\u7528\u7684\u53c3\u6578\u6709 vfat\uff08FAT32\uff09\u3001ext4\u3002<\/p>\n<h2>STEP 6<\/h2>\n<p>\u5728 \/etc\/fstab \u4e2d\u52a0\u5165\u4e00\u884c\uff1a<\/p>\n<table style=\"border: 1px solid #fcfcfc; padding: 4px; background-color: #000000;\" width=\"100%\">\n<tbody>\n<tr>\n<td>\n<div style=\"padding: 8px; color: #ffffff; line-height: 1.5;\">\nUUID=4844A6C744A6B6DA \/media\/USB ntfs-3g uid=1000,gid=1000,umask=007 0 0\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9019\u6a23\u4e0b\u6b21\u91cd\u65b0\u958b\u6a5f\u6642\uff0c\u7cfb\u7d71\u5c31\u6703\u81ea\u52d5\u4f9d\u64da UUID \u4f86\u639b\u8f09\u9019\u500b USB \u96a8\u8eab\u789f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679cSD\u5361\u5df2\u7d93\u4e0d\u5920\u7528\uff0c\u525b\u597d\u6709\u5f88\u591a\u4e00\u76f4\u6c92\u7528\u5230\u7684USB\u96a8\u8eab\u789f\uff0c\u53ef\u4ee5\u8003\u616e\u76f4\u63a5\u639b\u8f09\u4f86\u589e\u52a0\u7a7a\u9593 \u82e5\u662f\u4f7f\u7528\u5916\u63a52.5\u540b\u96a8\u8eab<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/learn-house.idv.tw\/?p=2340\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-2340","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2340"}],"version-history":[{"count":0,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/2340\/revisions"}],"wp:attachment":[{"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learn-house.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}