\u5bf9\u4e8e\u8fd9\u4e2a\u9879\u76ee\uff0c\u4f60\u9700\u8981\u4fee\u6539\u4e00\u4e2a\u670d\u52a1\u5668\u78c1\u76d8\u955c\u50cf\u3002\u5728\u6d4b\u8bd5\u671f\u95f4\uff0c\u6211\u4f7f\u7528 Fedora Server 31 ARM\u3002\u5728\u4f60\u4e0b\u8f7d\u8be5\u78c1\u76d8\u955c\u50cf\u5e76\u9a8c\u8bc1\u5176\u6821\u9a8c\u548c\u4e4b\u540e\uff0c\u4f60\u9700\u8981\u5c06\u5176\u89e3\u538b\u7f29\u5e76\u6302\u8f7d\u5176\u5230\u5bbf\u4e3b\u673a\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u67d0\u4e2a\u4f4d\u7f6e\u4e0a\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u4fee\u6539\u5b83\u3002<\/p>\n
\u4f60\u53ef\u4ee5\u4f7f\u7528 xz \u547d\u4ee4\u901a\u8fc7 --decompress \u53c2\u6570\u6765\u89e3\u538b\u7f29 Fedora \u670d\u52a1\u5668\u955c\u50cf\uff1a<\/p>\n
xz --decompress Fedora-Server-armhfp-X-y.z-sda.raw.xz<\/pre>\n\u8fd9\u4f1a\u7559\u4e0b\u4e00\u4e2a\u89e3\u538b\u7f29\u540e\u7684\u539f\u59cb\u78c1\u76d8\u955c\u50cf\uff08\u5b83\u4f1a\u81ea\u52a8\u5730\u66ff\u6362 .xz \u538b\u7f29\u6587\u4ef6\uff09\u3002\u8fd9\u4e2a\u539f\u59cb\u78c1\u76d8\u955c\u50cf\u5c31\u50cf\u5b83\u542c\u8d77\u6765\u7684\u90a3\u6837\uff1a\u4e00\u4e2a\u5305\u542b\u683c\u5f0f\u5316\u540e\u5b89\u88c5\u597d\u7684\u78c1\u76d8\u4e0a\u7684\u6240\u6709\u6570\u636e\u7684\u6587\u4ef6\u3002\u8fd9\u5305\u542b\u5206\u533a\u4fe1\u606f\u3001\u542f\u52a8\u5206\u533a\u3001root \u5206\u533a\u4ee5\u53ca\u5176\u5b83\u5206\u533a\u3002\u4f60\u9700\u8981\u6302\u8f7d\u4f60\u6253\u7b97\u5728\u5176\u4e2d\u8fdb\u884c\u4fee\u6539\u7684\u5206\u533a\uff0c\u4f46\u662f\u8981\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u4f60\u9700\u8981\u77e5\u9053\u78c1\u76d8\u955c\u50cf\u4e2d\u7684\u5206\u533a\u8d77\u59cb\u4f4d\u7f6e\u548c\u6247\u533a\u5927\u5c0f\uff0c\u8fd9\u6837\u4f60\u624d\u53ef\u4ee5\u6302\u8f7d\u8be5\u6587\u4ef6\u6b63\u786e\u7684\u6247\u533a\u3002<\/p>\n
\u5e78\u8fd0\u7684\u662f\uff0c\u4f60\u53ef\u4ee5\u5728\u4e00\u4e2a\u78c1\u76d8\u955c\u50cf\u4e0a\u4f7f\u7528 fdisk \u547d\u4ee4\uff0c\u5c31\u50cf\u5728\u5b9e\u9645\u78c1\u76d8\u4e0a\u4f7f\u7528\u4e00\u6837\u5bb9\u6613\u3002\u4f7f\u7528 --list \u6216 -l \u53c2\u6570\u6765\u67e5\u770b\u5206\u533a\u7684\u5217\u8868\u548c\u5176\u4fe1\u606f\uff1a<\/p>\n
# \u4f7f\u7528 fdisk \u6765\u5217\u51fa\u539f\u59cb\u955c\u50cf\u6587\u4ef6\u7684\u5206\u533a\uff1a<\/p>\n
$ fdisk -l Fedora-Server-armhfp-31-1.9-sda.raw\r\nDisk Fedora-Server-armhfp-X-y.z-sda.raw: 3.2 GiB, 3242196992 bytes, 6332416 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0xdaad9f57\r\n\u00a0\r\nDevice \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Boot \u00a0 Start \u00a0 \u00a0 End Sectors \u00a0Size Id Type\r\nFedora-Server-armhfp-X-y.z-sda.raw1 \u00a0 \u00a0 \u00a0 \u00a0 8192 \u00a0163839 \u00a0155648 \u00a0 76M \u00a0c W95 F\r\nFedora-Server-armhfp-X-y.z-sda.raw2 * \u00a0 \u00a0 163840 1163263 \u00a0999424 \u00a0488M 83 Linux\r\nFedora-Server-armhfp-X-y.z-sda.raw3 \u00a0 \u00a0 \u00a01163264 6047743 4884480 \u00a02.3G 83 Linux<\/pre>\n\u4f60\u9700\u8981\u7684\u6240\u6709\u4fe1\u606f\u90fd\u53ef\u5728\u4e0a\u9762\u7684\u8f93\u51fa\u4e2d\u83b7\u5f97\u3002\u7b2c 3 \u884c\u8868\u793a\u6247\u533a\u5927\u5c0f\uff08\u5305\u62ec\u903b\u8f91\u548c\u7269\u7406\u7684\uff09\uff1a512 \u5b57\u8282 \/ 512 \u5b57\u8282\u3002<\/p>\n
\u8bbe\u5907\u5217\u8868\u663e\u793a\u7684\u662f\u539f\u59cb\u78c1\u76d8\u955c\u50cf\u4e2d\u7684\u5206\u533a\u3002\u7b2c\u4e00\u4e2a\uff0cFedora-Server-armhfp-X-y.z-sda.raw1 \u6beb\u65e0\u7591\u95ee\u662f\u5f15\u5bfc\u7a0b\u5e8f\u5206\u533a\uff0c\u56e0\u4e3a\u5b83\u662f\u7b2c\u4e00\u4e2a\uff0c\u5f88\u5c0f\uff08\u4ec5\u4ec5 76MB\uff09\uff0c\u800c\u4e14\u7c7b\u578b\u88ab\u6807\u8bc6\u4e3a c\uff0c\u5373 W95 FAT32\uff08LBA\uff09\uff0c\u8fd9\u662f\u4e00\u4e2a\u4ece SD \u5361\u542f\u52a8\u7684 FAT32 \u5206\u533a\u3002<\/p>\n
\u7b2c\u4e8c\u4e2a\u5206\u533a\u4e5f\u4e0d\u662f\u975e\u5e38\u5927\uff0c\u53ea\u6709 488MB\u3002\u8fd9\u4e2a\u5206\u533a\u662f\u4e00\u4e2a Linux \u539f\u751f\u7c7b\u578b\u5206\u533a\uff08Id 83\uff09\uff0c\u5b83\u53ef\u80fd\u662f\u5305\u542b\u5185\u6838\u548c initramfs \u7684 Linux \u542f\u52a8\u5206\u533a\u3002<\/p>\n
\u7b2c\u4e09\u4e2a\u5206\u533a\u53ef\u80fd\u662f\u4f60\u9700\u8981\u7684\u4e1c\u897f\uff1a\u5b83\u6709 2.3GB \u5927\u5c0f\uff0c\u6240\u4ee5\u5728\u5b83\u5176\u4e2d\u5e94\u8be5\u6709\u53d1\u884c\u7248\u7684\u4e3b\u8981\u90e8\u5206\uff0c\u5e76\u4e14\u5b83\u662f\u4e00\u4e2a Linux \u539f\u751f\u5206\u533a\u7c7b\u578b\uff0c\u8fd9\u4e5f\u662f\u5728\u9884\u6599\u4e4b\u4e2d\u7684\u3002\u8fd9\u4e2a\u5206\u533a\u5e94\u8be5\u5305\u542b\u4e86\u4f60\u9700\u8981\u4fee\u6539\u7684\u5206\u533a\u548c\u6570\u636e\u3002<\/p>\n
\u7b2c\u4e09\u4e2a\u5206\u533a\u4ece\u6247\u533a 1163264 \u5f00\u59cb\uff08\u5728 fdisk \u7684\u8f93\u51fa\u4e2d\u88ab\u663e\u793a\u4e3a Start \u5217\uff09\uff0c\u6240\u4ee5\u4f60\u7684\u6302\u8f7d\u504f\u79fb\u91cf\u662f 595591168\uff0c\u8ba1\u7b97\u65b9\u6cd5\u662f\u5c06\u6247\u533a\u5927\u5c0f\uff08512\uff09\u4e58\u4ee5\u8d77\u59cb\u6247\u533a\uff081163264\uff09\uff08\u5373 512 * 1163264\uff09\u3002\u8fd9\u610f\u5473\u7740\u4f60\u9700\u8981\u4ee5\u504f\u79fb\u91cf 595591168 \u6302\u8f7d\u8be5\u6587\u4ef6\uff0c\u624d\u80fd\u6302\u8f7d\u5230\u6b63\u786e\u4f4d\u7f6e\u3002<\/p>\n
\u88c5\u5907\u4e86\u8fd9\u4e9b\u4fe1\u606f\uff0c\u73b0\u5728\u4f60\u53ef\u4ee5\u5c06\u7b2c\u4e09\u4e2a\u5206\u533a\u6302\u8f7d\u5230\u4f60\u7684\u5bb6\u76ee\u5f55\u4e2d\u4e86\uff1a<\/p>\n
$ mkdir ~\/mnt\r\n$ sudo mount -o loop,offset=595591168 Fedora-Server-armhfp-X-y.z-sda.raw ~\/mnt\r\n$ ls ~\/mnt<\/pre>\n\u76f4\u63a5\u5728\u78c1\u76d8\u955c\u50cf\u4e2d\u4f5c\u4e1a<\/strong><\/div>\n\u5728\u78c1\u76d8\u955c\u50cf\u88ab\u89e3\u538b\u7f29\u548c\u88ab\u6302\u8f7d\u5230\u5bbf\u4e3b\u673a\u4e0a\u7684\u4e00\u4e2a\u4f4d\u7f6e\u540e\uff0c\u5c31\u53ef\u4ee5\u4fee\u6539\u955c\u50cf\u4ee5\u7b26\u5408\u4f60\u7684\u9700\u6c42\u3002\u5728\u6211\u770b\u6765\uff0c\u5bf9\u955c\u50cf\u8fdb\u884c\u66f4\u6539\u7684\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u4f7f\u7528chroot\u6765\u5c06\u4f60\u4f1a\u8bdd\u7684\u5de5\u4f5c\u6839\u76ee\u5f55\u66f4\u6539\u4e3a\u6302\u8f7d\u955c\u50cf\u7684\u5de5\u4f5c\u6839\u76ee\u5f55\u3002\u4e0d\u8fc7\uff0c\u6709\u70b9\u68d8\u624b\u3002<\/p>\n
\u5728\u4f60\u6539\u53d8\u4e86\u6839\u76ee\u5f55\u540e\uff0c\u4f60\u7684\u4f1a\u8bdd\u5c06\u4f7f\u7528\u65b0\u7684\u6839\u76ee\u5f55\u4e0b\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u9664\u975e\u4f60\u662f\u5728\u4e00\u4e2a ARM \u7cfb\u7edf\u505a\u8fd9\u4e9b\u6240\u6709\u7684\u64cd\u4f5c\uff0c\u5426\u5219\u89e3\u538b\u7f29\u540e\u7684\u78c1\u76d8\u955c\u50cf\u7684\u67b6\u6784\u5c06\u4e0e\u4f60\u6b63\u5728\u4f7f\u7528\u7684\u5bbf\u4e3b\u673a\u7cfb\u7edf\u4e0d\u540c\u3002\u5373\u4f7f\u5728 chroot \u73af\u5883\u4e2d\uff0c\u5bbf\u4e3b\u673a\u7cfb\u7edf\u4e5f\u65e0\u6cd5\u4f7f\u7528\u4e00\u4e2a\u4e0d\u540c\u67b6\u6784\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u81f3\u5c11\uff0c\u4e0d\u80fd\u5728\u672c\u673a\u4f7f\u7528\u3002<\/p>\n
\u5e78\u8fd0\u7684\u662f\uff0c\u8fd9\u91cc\u6709\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\uff1aqemu-user-static\u3002\u6765\u81ea Debian Wiki \u7684\u8bf4\u660e:<\/p>\n
\u201c[qemu-user-static] \u63d0\u4f9b\u4e86\u7528\u6237\u6a21\u5f0f\u7684\u4eff\u771f\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u662f\u9759\u6001\u6784\u5efa\u7684\u3002\u5728\u8fd9\u4e2a\u6a21\u5f0f\u4e2d\uff0cQEMU \u53ef\u4ee5\u5728\u4e00\u4e2a CPU \u4e0a\u542f\u52a8\u4e3a\u53e6\u4e00\u4e2a CPU \u7f16\u8bd1\u7684 Linux \u8fdb\u7a0b \u2026\u2026 \u5982\u679c\u5b89\u88c5\u4e86 binfmt-support \u8f6f\u4ef6\u5305\uff0cqemu-user-static \u8f6f\u4ef6\u5305\u4f1a\u6ce8\u518c\u63d0\u4f9b\u7684\u4eff\u771f\u5668\u53ef\u4ee5\u5904\u7406\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u683c\u5f0f\uff0c\u4ee5\u4fbf\u5176\u80fd\u591f\u76f4\u63a5\u8fd0\u884c\u5176\u4ed6\u67b6\u6784\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u201d<\/p>\n
\u8fd9\u6b63\u662f\u4f60\u9700\u8981\u5728 chroot \u73af\u5883\u4e2d\u975e\u672c\u5730\u67b6\u6784\u4e2d\u5de5\u4f5c\u6240\u9700\u7684\u3002\u5982\u679c\u5bbf\u4e3b\u673a\u7cfb\u7edf\u662f Fedora\uff0c\u4f7f\u7528 DNF \u6765\u5b89\u88c5 qemu-user-static \u8f6f\u4ef6\u5305\uff0c\u5e76\u91cd\u65b0\u542f\u52a8 systemd-binfmt.service\uff1a<\/p>\n
# \u4f7f\u7528 DNF \u542f\u7528\u975e\u672c\u5730\u7684 arch chroot \u73af\u5883\uff0c\u6dfb\u52a0\u65b0\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u683c\u5f0f\u4fe1\u606f<\/p>\n
# \u8f93\u51fa\u955c\u50cf\u4e86\u7cbe\u7b80<\/p>\n
$ dnf install qemu-user-static\r\n$ systemctl restart systemd-binfmt.service<\/pre>\n\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\uff0c\u4f60\u4e00\u4e2a\u80fd\u591f\u66f4\u6539\u6839\u76ee\u5f55\u5230\u6302\u8f7d\u7684\u78c1\u76d8\u955c\u50cf\uff0c\u8fd0\u884c uname \u547d\u4ee4\u6765\u9a8c\u8bc1\u4e00\u5207\u90fd\u5728\u6b63\u5e38\uff1a<\/p>\n
sudo chroot ~\/mnt\/ \/usr\/bin\/uname -a -r\r\nLinux marvin 5.5.16-200.fc31.x86_64 #1 SMP Wed Apr 8 16:43:33 UTC 2020 armv7l armv7l armv7l GNU\/Linux<\/pre>\n\u5728 chroot \u73af\u5883\u4e2d\u8fd0\u884c uname \u5c06\u5728\u8f93\u51fa\u4e2d\u663e\u793a armv7l\uff0c\u8fd9\u4e2a\u539f\u59cb\u78c1\u76d8\u955c\u50cf\u7684\u67b6\u6784\uff0c \u800c\u4e0d\u662f\u5bbf\u4e3b\u673a\u7684\u67b6\u6784\u3002\u4e00\u5207\u5982\u9884\u671f\uff0c\u53ef\u4ee5\u7ee7\u7eed\u4fee\u6539\u955c\u50cf\u4e86\u3002<\/p>\n
\u4fee\u6539\u78c1\u76d8\u955c\u50cf<\/strong><\/div>\n\u73b0\u5728\u4f60\u53ef\u4ee5\u76f4\u63a5\u5207\u6362\u5230\u8fd9\u4e2a\u57fa\u4e8e ARM \u7684\u78c1\u76d8\u955c\u50cf\u4e2d\uff0c\u5e76\u5728\u8be5\u73af\u5883\u4e2d\u5de5\u4f5c\u4e86\uff0c\u4f60\u53ef\u4ee5\u5bf9\u955c\u50cf\u81ea\u8eab\u955c\u50cf\u4fee\u6539\u4e86\u3002\u4f60\u9700\u8981\u8bbe\u7f6e\u8be5\u955c\u50cf\uff0c\u4ee5\u4fbf\u5b83\u80fd\u591f\u542f\u52a8\u5e76\u53ef\u7acb\u5373\u8bbf\u95ee\uff0c\u800c\u4e0d\u9700\u8981\u5728\u6811\u8393\u6d3e\u4e0a\u505a\u4efb\u4f55\u989d\u5916\u7684\u8bbe\u7f6e\u3002\u4e3a\u6b64\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u5e76\u542f\u7528 sshd\uff08OpenSSH \u5b88\u62a4\u8fdb\u7a0b\uff09\uff0c\u5e76\u4e3a SSH \u8bbf\u95ee\u6dfb\u52a0\u6388\u6743\u5bc6\u7801\u3002<\/p>\n
\u4e3a\u4e86\u4f7f\u5176\u8868\u73b0\u5f97\u66f4\u50cf\u4e00\u4e2a\u4e91\u73af\u5883\uff0c\u5b9e\u73b0\u5728\u5bb6\u91cc\u5efa\u7acb\u79c1\u6709\u4e91\u7684\u68a6\u60f3\uff0c\u6dfb\u52a0\u4e00\u4e2a\u672c\u5730\u7528\u6237\uff0c\u7ed9\u4e88\u8be5\u7528\u6237 sudo \u6743\u9650\uff0c\u5e76\uff08\u4e3a\u4e86\u50cf\u4e91\u7aef\u7684\u91cd\u5ea6\u7528\u6237\u4e00\u6837\uff09\u5141\u8bb8\u8be5\u7528\u6237\u65e0\u9700\u5bc6\u7801\u5c31\u53ef\u4ee5\u4f7f\u7528 sudo\u3002<\/p>\n
\u6240\u4ee5\uff0c\u4f60\u5c06\u505a\u7684\u4e8b\u60c5\u662f\uff1a<\/p>\n
\n- \u5b89\u88c5\u5e76\u542f\u7528 SSHD\uff08SSHD \u5df2\u7ecf\u5728 Fedora ARM \u955c\u50cf\u4e2d\u5b89\u88c5\u5e76\u542f\u7528\uff0c\u4f46\u662f\u4f60\u53ef\u80fd\u9700\u8981\u4e3a\u4f60\u53d1\u884c\u7248\u624b\u52a8\u6267\u884c\u8fd9\u4e9b\u5de5\u4f5c\uff09<\/li>\n
- \u8bbe\u7f6e\u4e00\u4e2a\u672c\u5730\u7528\u6237<\/li>\n
- \u5141\u8bb8\u672c\u5730\u7528\u6237\u6765\u4f7f\u7528 sudo\uff08\u65e0\u9700\u5bc6\u7801\uff0c\u53ef\u9009\uff09<\/li>\n
- \u6dfb\u52a0\u6388\u6743\u5bc6\u94a5<\/li>\n
- \u5141\u8bb8 root \u4f7f\u7528\u6388\u6743\u5bc6\u7801\u955c\u50cf SSH\uff08\u53ef\u9009\uff09<\/li>\n<\/ul>\n
\u6211\u4f7f\u7528 GitHub \u529f\u80fd\uff0c\u5b83\u5141\u8bb8\u4f60\u4e0a\u4f20\u4f60\u7684 SSH \u516c\u94a5\uff0c\u5e76\u5728 https:\/\/github.com\/.keys \u5904\u53ef\u8bbf\u95ee\u3002\u6211\u53d1\u73b0\u8fd9\u662f\u4e00\u79cd\u5f88\u65b9\u4fbf\u7684\u5206\u53d1\u516c\u94a5\u7684\u65b9\u6cd5\uff0c\u4e0d\u8fc7\u6211\u751f\u6027\u591a\u7591\uff0c\u6211\u603b\u662f\u68c0\u67e5\u4e0b\u8f7d\u7684\u5bc6\u94a5\u662f\u5426\u4e0e\u6211\u9884\u671f\u7684\u5339\u914d\u3002\u5982\u679c\u4f60\u4e0d\u60f3\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u4ece\u4f60\u5bbf\u4e3b\u673a\u4e2d\u590d\u5236\u4f60\u516c\u94a5\u5230 chroot \u73af\u5883\u4e2d\uff0c\u6216\u8005\u4f60\u53ef\u4ee5\u5c06\u516c\u94a5\u6258\u7ba1\u5728\u4f60\u63a7\u5236\u7684 Web \u670d\u52a1\u5668\u4e0a\u4ee5\u4fbf\u4f7f\u7528\u76f8\u540c\u7684\u5de5\u4f5c\u6d41\u3002<\/p>\n
\u8981\u5f00\u59cb\u4fee\u6539\u78c1\u76d8\u955c\u50cf\uff0c\u518d\u6b21\u5207\u6362\u6839\u76ee\u5f55\u5230\u6302\u8f7d\u7684\u78c1\u76d8\u955c\u50cf\u4e2d\uff0c\u8fd9\u6b21\u542f\u52a8\u4e00\u4e2a shell\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u8fd0\u884c\u591a\u4e2a\u547d\u4ee4\uff1a<\/p>\n
# \u4e3a\u4e86\u7b80\u6d01\u8d77\u89c1\uff0c\u7701\u7565\u4e86\u8fd9\u4e9b\u547d\u4ee4\u7684\u8f93\u51fa(\u5982\u679c\u6709\u7684\u8bdd)<\/p>\n
$ sudo chroot ~\/mnt \/bin\/bash<\/pre>\n# \u5b89\u88c5 openssh-server \uff0c\u5e76\u542f\u7528\u5b83 (\u5728 Fedora \u4e0a\u5df2\u7ecf\u5b8c\u6210)<\/p>\n
$ dnf install -y openssh-server\r\n$ systemctl enable sshd.service<\/pre>\n# \u5141\u8bb8 root \u4f7f\u7528\u6388\u6743\u5bc6\u7801\u8bbf\u95ee SSH<\/p>\n
$ mkdir \/root\/.ssh<\/pre>\n# \u4e0b\u8f7d\u6216\u8005\u53e6\u5916\u6dfb\u52a0\u6388\u6743\u5bc6\u7801\u6587\u4ef6\uff0c\u4f60\u7684\u516c\u5171\u5bc6\u7801<\/p>\n
# \u5c06 URL \u66ff\u6362\u4e3a\u4f60\u81ea\u5df1\u516c\u5171\u5bc6\u7801\u7684\u8def\u5f84<\/p>\n
$ curl <https:\/\/github.com\/clcollins.keys> -o \/root\/.ssh\/authorized_keys\r\n$ chmod 700 \/root\/.ssh\r\n$ chmod 600 \/root\/.ssh\/authorized_keys<\/pre>\n# \u6dfb\u52a0\u4e00\u4e2a\u672c\u5730\u7528\u6237\uff0c\u5e76\u653e\u7f6e\u4ed6\u4eec\u5230 wheel \u7ec4\u4e2d<\/p>\n
# \u5c06\u7ec4\u548c\u7528\u6237\u66f4\u6539\u4e3a\u60a8\u60f3\u8981\u7684\u4e00\u5207<\/p>\n
useradd -g chris -G wheel -m -u 1000 chris<\/pre>\n# \u4e0b\u8f7d\u5e76\u6dfb\u52a0\u4f60\u7684\u6388\u6743\u5bc6\u7801<\/p>\n
# \u50cf\u4f60\u4e0a\u9762\u6240\u505a\u7684\u90a3\u6837\u66f4\u6539 home \u76ee\u5f55\u548cURL<\/p>\n
mkdir \/home\/chris\/.ssh\r\ncurl <https:\/\/github.com\/clcollins.keys> -o \/home\/chris\/.ssh\/authorized_keys\r\nchmod 700 \/home\/chris\/.ssh\r\nchmod 600 \/home\/chris\/.ssh\/authorized_keys\r\nchown -R chris.chris \/home\/chris\/.ssh\/<\/pre>\n# \u5141\u8bb8 wheel \u7ec4( \u4f7f\u7528\u4f60\u7684\u672c\u5730\u7528\u6237) \u4e0d\u9700\u8981\u4f7f\u7528\u5bc6\u7801\u6765\u4f7f\u7528 suso<\/p>\n
echo \"%wheel ALL=(ALL) NOPASSWD:ALL\" >> \/etc\/sudoers.d\/91-wheel-nopasswd<\/pre>\n\u8fd9\u5c31\u662f\u6811\u8393\u6d3e\u6216\u5176\u5b83\u5355\u677f\u673a\u5728\u9996\u6b21\u542f\u52a8\u65f6\u9700\u8981\u5b8c\u6210\u8bbe\u7f6e SSH \u7684\u5168\u90e8\u5de5\u4f5c\u3002\u4e0d\u8fc7\uff0c\u6bcf\u4e2a\u53d1\u884c\u7248\u90fd\u6709\u81ea\u5df1\u7684\u7279\u70b9\u3002\u4f8b\u5982\uff0cRaspbian \u5df2\u7ecf\u5305\u542b\u4e00\u4e2a\u672c\u5730\u7528\u6237\uff1api\uff0c\u5e76\u4e14\u4e0d\u4f7f\u7528 wheel \u7ec4\u3002\u56e0\u6b64\u5bf9\u4e8e Raspbian \u6765\u8bf4\uff0c\u6700\u597d\u4f7f\u7528\u73b0\u6709\u7528\u6237\uff0c\u6216\u8005\u5220\u9664 pi \u7528\u6237\uff0c\u5e76\u4f7f\u7528\u53e6\u4e00\u4e2a\u7528\u6237\u6765\u66ff\u6362\u5b83\u3002<\/p>\n
\u5728 Fedora ARM \u7684\u60c5\u51b5\u4e0b\uff0c\u955c\u50cf\u4f1a\u5728\u9996\u6b21\u5f15\u5bfc\u542f\u52a8\u65f6\u63d0\u793a\u4f60\u5b8c\u6210\u8bbe\u7f6e\u3002\u8fd9\u4f1a\u7834\u574f\u4f60\u5728\u4e0a\u9762\u6240\u505a\u7684\u4fee\u6539\u7684\u76ee\u7684\uff0c\u5c24\u5176\u662f\u5728\u8bbe\u7f6e\u5b8c\u6210\u4e4b\u524d\uff0c\u5b83\u4f1a\u5b8c\u5168\u963b\u6b62\u542f\u52a8\u3002\u4f60\u7684\u76ee\u6807\u662f\u4f7f\u6811\u8393\u6d3e\u7684\u529f\u80fd\u7c7b\u4f3c\u4e8e\u79c1\u6709\u4e91\u7684\u57fa\u7840\u8bbe\u65bd\u7684\u4e00\u90e8\u5206\u4e00\u6837\u8fd0\u884c\uff0c\u800c\u8fd9\u4e2a\u5de5\u4f5c\u6d41\u7a0b\u5305\u62ec\u5728\u4e3b\u673a\u542f\u52a8\u65f6\u901a\u8fc7 SSH \u8fdc\u7a0b\u8bbe\u7f6e\u4e3b\u673a\u3002 \u7981\u7528\u521d\u59cb\u5316\u8bbe\u7f6e\uff0c\u5b83\u7531 initial-setup.service \u63a7\u5236\uff1a<\/p>\n
# \u5bf9\u591a\u7528\u6237\u548c\u56fe\u5f62\u76ee\u6807\u7981\u7528 initial-setup.service<\/p>\n
unlink \/etc\/systemd\/system\/multi-user.target.wants\/initial-setup.service\r\nunlink \/etc\/systemd\/system\/graphical.target.wants\/initial-setup.service<\/pre>\n\u5f53\u4f60\u5728 chroot \u73af\u5883\u65f6\uff0c\u4f60\u53ef\u4ee5\u5bf9\u4f60\u7cfb\u7edf\u505a\u4efb\u4f55\u4f60\u60f3\u505a\u7684\u5176\u5b83\u66f4\u6539\uff0c\u6216\u8005\u5c31\u653e\u5728\u90a3\u91cc\uff0c\u5728\u7b2c\u4e00\u6b21\u542f\u52a8\u540e\uff0c\u6309\u7167\u4e91\u539f\u751f\u7684\u5de5\u4f5c\u6d41\u901a\u8fc7 SSH \u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n
\u91cd\u65b0\u538b\u7f29\u5e76\u5b89\u88c5\u4fee\u6539\u540e\u7684\u955c\u50cf<\/strong><\/div>\n\u5b8c\u6210\u4e86\u8fd9\u4e9b\u66f4\u6539\u540e\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u91cd\u65b0\u538b\u7f29\u78c1\u76d8\u955c\u50cf\uff0c\u5e76\u5c06\u5176\u5b89\u88c5\u5176\u5230\u4f60\u7684\u6811\u8393\u6d3e\u7684 SD \u5361\u4e0a\u3002<\/p>\n
\u786e\u4fdd\u9000\u51fa chroot \u73af\u5883\uff0c\u7136\u540e\u5378\u8f7d\u78c1\u76d8\u955c\u50cf\uff1a<\/p>\n
$ sudo umount ~\/mnt\/<\/pre>\n\u5c31\u50cf\u6700\u521d\u89e3\u538b\u7f29\u955c\u50cf\u4e00\u6837\uff0c\u4f60\u53ef\u4ee5\u518d\u6b21\u4f7f\u7528 xz \u547d\u4ee4\u6765\u538b\u7f29\u955c\u50cf\u3002\u901a\u8fc7\u4f7f\u7528 --keep \u53c2\u6570\uff0cxz \u5c06\u4fdd\u7559\u539f\u59cb\u7684\u955c\u50cf\uff0c\u800c\u4e0d\u662f\u6e05\u7406\u6389\u5b83\u3002\u867d\u7136\u8fd9\u4f1a\u5360\u7528\u66f4\u591a\u7684\u78c1\u76d8\u7a7a\u95f4\uff0c\u4f46\u4fdd\u7559\u4e0b\u6765\u7684\u672a\u538b\u7f29\u955c\u50cf\u5c06\u5141\u8bb8\u4f60\u5bf9\u6b63\u5728\u5904\u7406\u7684\u955c\u50cf\u8fdb\u884c\u589e\u91cf\u66f4\u6539\uff0c\u800c\u4e0d\u9700\u8981\u6bcf\u6b21\u90fd\u5bf9\u5176\u8fdb\u884c\u89e3\u538b\u7f29\u3002\u8fd9\u5bf9\u4e8e\u5728\u6d4b\u8bd5\u548c\u8c03\u6574\u955c\u50cf\u65f6\u8282\u7701\u65f6\u95f4\u662f\u975e\u5e38\u597d\u7684\u3002<\/p>\n
# \u538b\u7f29\u538b\u7f29\u78c1\u76d8\u955c\u50cf\u4e3a\u4e00\u4e2a .xz \u6587\u4ef6\uff0c\u4f46\u4fdd\u7559\u539f\u59cb\u78c1\u76d8\u955c\u50cf<\/p>\n
xz --compress Fedora-Server-armhfp-31-1.9-sda.raw --keep<\/pre>\n\u538b\u7f29\u8fc7\u7a0b\u5c06\u82b1\u8d39\u4e00\u4e9b\u65f6\u95f4\uff0c\u6240\u4ee5\u8d81\u7740\u8fd9\u4e2a\u65f6\u95f4\u7ad9\u8d77\u6765\uff0c\u8212\u5c55\u8eab\u4f53\uff0c\u8ba9\u4f60\u7684\u8840\u6db2\u518d\u6b21\u6d41\u52a8\u3002<\/p>\n
\u5728\u538b\u7f29\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5c06\u65b0\u7684\u3001\u5df2\u4fee\u6539\u8fc7\u7684\u78c1\u76d8\u955c\u50cf\u590d\u5236\u5230 SD \u5361\u4e0a\uff0c\u4ee5\u4fbf\u4e0e\u6811\u8393\u6d3e\u4e00\u8d77\u4f7f\u7528\u3002\u6807\u51c6\u7684 dd \u65b9\u6cd5\u5c06\u955c\u50cf\u653e\u7f6e\u5230 SD \u5361\u4e0a\u4e5f\u5f88\u597d\u7528\uff0c\u4f46\u662f\u6211\u559c\u6b22\u4f7f\u7528 Fedora \u7684 arm-image-installer\uff0c\u56e0\u4e3a\u5b83\u56e0\u4e3a\u5b83\u5728\u5904\u7406\u672a\u7ecf\u7f16\u8f91\u7684\u955c\u50cf\u65f6\u63d0\u4f9b\u4e86\u4e00\u4e9b\u9009\u9879\u3002\u5b83\u5bf9\u7f16\u8f91\u8fc7\u7684\u955c\u50cf\u4e5f\u5f88\u597d\u7528\uff0c\u5e76\u4e14\u6bd4 dd \u547d\u4ee4\u66f4\u53cb\u597d\u4e00\u4e9b\u3002<\/p>\n
\u786e\u4fdd\u68c0\u67e5 SD \u5361\u5728\u54ea\u4e2a\u78c1\u76d8\u9a71\u52a8\u5668\u4e0a\uff0c\u5e76\u7528 --media \u53c2\u6570\u4f7f\u7528\u5b83\uff1a<\/p>\n
# \u4f7f\u7528 arm-image-installer \u6765\u590d\u5236\u5df2\u4fee\u6539\u7684\u78c1\u76d8\u955c\u50cf\u5230 SD \u5361\u4e0a<\/p>\n
arm-image-installer --image=Fedora-Server-armhfp-X-y.z-sda.raw.xz --target=rpi3 --media=\/dev\/sdc --norootpass --resizefs -y<\/pre>\n\u73b0\u5728\uff0c\u4f60\u5df2\u7ecf\u4e3a\u6811\u8393\u6d3e\u6216\u5176\u5b83\u5355\u677f\u673a\u51c6\u5907\u597d\u4e86\u4e00\u4e2a\u65b0\u7684\u3001\u5df2\u4fee\u6539\u7684 Fedora Server ARM \u955c\u50cf\uff0c\u51c6\u5907\u597d\u542f\u52a8\u5e76\u7acb\u5373 SSH \u5230\u4f60\u7684\u4fee\u6539\u955c\u50cf\u4e2d\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e5f\u53ef\u4ee5\u7528\u6765\u505a\u5176\u5b83\u7684\u4fee\u6539\uff0c\u5e76\u4e14\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5176\u5b83\u53d1\u884c\u7248\u7684\u539f\u59cb\u78c1\u76d8\u955c\u50cf\uff0c\u5982\u679c\u4f60\u66f4\u559c\u6b22\u5b83\u4eec\uff0c\u800c\u4e0d\u662f Fedora \u7684\u8bdd\u3002\u8fd9\u662f\u4e00\u4e2a\u5f00\u59cb\u6784\u5efa\u5bb6\u5ead\u5b9e\u9a8c\u5ba4\u79c1\u6709\u4e91\u7684\u826f\u597d\u57fa\u7840\u3002\u5728\u4ee5\u540e\u7684\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u6307\u5bfc\u4f60\u4f7f\u7528\u4e91\u6280\u672f\u548c\u81ea\u52a8\u5316\u5efa\u7acb\u4e00\u4e2a\u5bb6\u5ead\u5b9e\u9a8c\u5ba4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u6784\u5efa\u4e00\u4e2a\u5bb6\u5ead\u5b9e\u9a8c\u5ba4\u53ef\u4ee5\u662f\u4e00\u4e2a\u6709\u8da3\u7684\u65b9\u5f0f\uff0c\u53ef\u4ee5\u8ba9\u4f60\u5b66\u4e60\u7684\u65b0\u6982\u5ff5\u548c\u5b9e\u9a8c\u65b0\u6280\u672f\u65f6\u8fd8\u80fd\u81ea\u5a31\u81ea\u4e50\u3002\u5f97\u76ca\u4e8e\u4ee5 \u6811\u8393\u6d3e \u4e3a\u9996 […]<\/p>\n","protected":false},"author":323,"featured_media":193252,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-193244","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/193244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=193244"}],"version-history":[{"count":3,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/193244\/revisions"}],"predecessor-version":[{"id":193249,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/193244\/revisions\/193249"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/193252"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=193244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=193244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=193244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}