{"id":334908,"date":"2022-06-23T21:00:14","date_gmt":"2022-06-23T21:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=334908"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=334908","title":{"rendered":"<span>\u0410\u0432\u0442\u043e\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u043b\u0435\u0448\u0435\u043a \u0432 armbian<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u043c\u0435\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 <a href=\"https:\/\/github.com\/armbian\/build\" rel=\"noopener noreferrer nofollow\">armbian<\/a> \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. \u0418\u043b\u0438 \u0436\u0435 \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u043e\u0442 <a href=\"https:\/\/github.com\/orangepi-xunlong\/orangepi-build\" rel=\"noopener noreferrer nofollow\">Xunlong<\/a> (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 armbian).<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c \u0432 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0444\u043b\u0435\u0448\u043a\u0438 (\u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 FAT32). \u041f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0442\u0430\u043a\u043e\u0439 \u0444\u043b\u0435\u0448\u043a\u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 E \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441 \u044d\u0442\u043e\u0439 \u0444\u043b\u0435\u0448\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041a\u0430\u043a \u0436\u0435 \u0435\u0451 \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c?<\/p>\n<h2>\u0420\u0443\u0447\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/h2>\n<p>\u0421\u0432\u044f\u0437\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b mount \u0438 \u043e\u043f\u0438\u0441\u0430\u043d <a href=\"https:\/\/snubmonkey.com\/how-to-mount-usb-drive-in-a-linux-system\/#gsc.tab=0\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0437\u0434\u0435<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0440\u0442, \u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0435\u0448\u043a\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. \u042d\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0414\u0430-\u0434\u0430, \u0432 Linux \u0432\u0430\u0448\u0430 \u0444\u043b\u0435\u0448\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e \/dev\/sda \u0442\u043e \/dev\/sdb \u0442\u043e \u0435\u0449\u0451 \u043a\u0430\u043a-\u0442\u043e. \u0422\u0430\u043a \u0432\u043e\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u0440\u0442 USB \u0434\u043b\u044f \u0444\u043b\u0435\u0448\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435, \u0442\u043e<\/p>\n<p>1) \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u043a \u043f\u043e\u0440\u0442\u0443. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u043b\u0435\u0448\u043a\u0438 (HDD, &#8230;), \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u0432\u043e\u0442\u043a\u043d\u0443\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u0435\u0448\u043a\u0443, \u0434\u0435\u043b\u0430\u0435\u043c<\/p>\n<p><code>ls -l \/dev\/disk\/by-path\/<\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u0435\u0448\u043a\u0443 \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0438\u043c\u044f. \u0423 \u043c\u0435\u043d\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0438\u043c\u044f &#171;platform-xhci-hcd.10.auto-usb-0:1:1.0-scsi-0:0:0:0&#187;:<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u043b\u0435\u0448\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u0434\u0430 \u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f), \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441 \u0444\u043b\u0435\u0448\u043a\u043e\u0439, \u0431\u0443\u0434\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043f\u0430\u043f\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 (\u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f ~) \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443-\u0442\u043e\u0447\u043a\u0443-\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0451 usb, \u0442\u043e \u0435\u0441\u0442\u044c<\/p>\n<p><code>cd ~ &amp;&amp; mkdir usb<\/code><\/p>\n<p>4) \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c<\/p>\n<p><code>sudo mount \/dev\/disk\/by-path\/platform-xhci-hcd.10.auto-usb-0:1:1.0-scsi-0:0:0:0 ~\/usb -t vfat<\/code><\/p>\n<p>5) \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <\/p>\n<p><code>cd ~\/usb<\/code><\/p>\n<p>6) \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043d\u0435\u0439<\/p>\n<p><code>ls<\/code><\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u0432\u0430\u0448\u0443 FAT32 \u0444\u043b\u0435\u0448\u043a\u0443 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0443\u0441\u0441\u043a\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u044f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <a href=\"https:\/\/wiki.archlinux.org\/title\/FAT_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)\" rel=\"noopener noreferrer nofollow\">vfat<\/a> <\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043b\u044f OrangePi 4B \u0441 \u044f\u0434\u0440\u043e\u043c 4, \u0441\u043c \/external\/config\/kernel\/linux-rk3399-legacy.config<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># # DOS\/FAT\/NT Filesystems # CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_CODEPAGE=866 CONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\" # CONFIG_NTFS_FS is not set  Pseudo filesystems  CONFIG_PROC_FS=y CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_CHILDREN is not set CONFIG_PROC_UID=y CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y CONFIG_HUGETLBFS is not set CONFIG_HUGETLB_PAGE is not set CONFIG_CONFIGFS_FS=y CONFIG_MISC_FILESYSTEMS=y CONFIG_ADFS_FS is not set CONFIG_AFFS_FS is not set CONFIG_ECRYPT_FS is not set CONFIG_SDCARD_FS is not set CONFIG_HFS_FS is not set CONFIG_HFSPLUS_FS is not set CONFIG_BEFS_FS is not set CONFIG_BFS_FS is not set CONFIG_EFS_FS is not set CONFIG_LOGFS is not set CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y CONFIG_SQUASHFS_DECOMP_SINGLE=y CONFIG_SQUASHFS_DECOMP_MULTI is not set CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set CONFIG_SQUASHFS_XATTR is not set CONFIG_SQUASHFS_ZLIB=y CONFIG_SQUASHFS_LZ4 is not set CONFIG_SQUASHFS_LZO is not set CONFIG_SQUASHFS_XZ is not set CONFIG_SQUASHFS_ZSTD is not set CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set CONFIG_SQUASHFS_EMBEDDED is not set CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 CONFIG_VXFS_FS is not set CONFIG_MINIX_FS is not set CONFIG_OMFS_FS is not set CONFIG_HPFS_FS is not set CONFIG_QNX4FS_FS is not set CONFIG_QNX6FS_FS is not set CONFIG_ROMFS_FS is not set CONFIG_PSTORE=y CONFIG_PSTORE_CONSOLE=y CONFIG_PSTORE_PMSG is not set CONFIG_PSTORE_FTRACE is not set CONFIG_PSTORE_RAM=y CONFIG_SYSV_FS is not set CONFIG_UFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V2=y CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_NFS_SWAP=y CONFIG_NFS_V4_1 is not set CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y CONFIG_NFSD is not set CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_SUNRPC_SWAP=y CONFIG_SUNRPC_DEBUG is not set CONFIG_CEPH_FS is not set CONFIG_CIFS is not set CONFIG_NCP_FS is not set CONFIG_CODA_FS is not set CONFIG_AFS_FS is not set CONFIG_NLS=y CONFIG_NLS_DEFAULT=\"utf8\" CONFIG_NLS_CODEPAGE_437=n CONFIG_NLS_CODEPAGE_737 is not set CONFIG_NLS_CODEPAGE_775 is not set CONFIG_NLS_CODEPAGE_850 is not set CONFIG_NLS_CODEPAGE_852 is not set CONFIG_NLS_CODEPAGE_855 is not set CONFIG_NLS_CODEPAGE_857 is not set CONFIG_NLS_CODEPAGE_860 is not set CONFIG_NLS_CODEPAGE_861 is not set CONFIG_NLS_CODEPAGE_862 is not set CONFIG_NLS_CODEPAGE_863 is not set CONFIG_NLS_CODEPAGE_864 is not set CONFIG_NLS_CODEPAGE_865 is not set CONFIG_NLS_CODEPAGE_866=y CONFIG_NLS_CODEPAGE_869 is not set CONFIG_NLS_CODEPAGE_936=n CONFIG_NLS_CODEPAGE_950 is not set CONFIG_NLS_CODEPAGE_932 is not set CONFIG_NLS_CODEPAGE_949 is not set CONFIG_NLS_CODEPAGE_874 is not set CONFIG_NLS_ISO8859_8 is not set CONFIG_NLS_CODEPAGE_1250 is not set CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=n CONFIG_NLS_ISO8859_2 is not set CONFIG_NLS_ISO8859_3 is not set CONFIG_NLS_ISO8859_4 is not set CONFIG_NLS_ISO8859_5 is not set CONFIG_NLS_ISO8859_6 is not set CONFIG_NLS_ISO8859_7 is not set CONFIG_NLS_ISO8859_9 is not set CONFIG_NLS_ISO8859_13 is not set CONFIG_NLS_ISO8859_14 is not set CONFIG_NLS_ISO8859_15 is not set CONFIG_NLS_KOI8_R is not set CONFIG_NLS_KOI8_U is not set CONFIG_NLS_MAC_ROMAN is not set CONFIG_NLS_MAC_CELTIC is not set CONFIG_NLS_MAC_CENTEURO is not set CONFIG_NLS_MAC_CROATIAN is not set CONFIG_NLS_MAC_CYRILLIC is not set CONFIG_NLS_MAC_GAELIC is not set CONFIG_NLS_MAC_GREEK is not set CONFIG_NLS_MAC_ICELAND is not set CONFIG_NLS_MAC_INUIT is not set CONFIG_NLS_MAC_ROMANIAN is not set CONFIG_NLS_MAC_TURKISH is not set CONFIG_NLS_UTF8=y CONFIG_DLM is not set CONFIG_VIRTUALIZATION is not set<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0412\u044b\u0448\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0440\u0443\u0447\u043d\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0436\u0435 <a href=\"https:\/\/github.com\/Ferk\/udev-media-automount\" rel=\"noopener noreferrer nofollow\">\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442<\/a> (\u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0435\u0449\u0451 &#8212; \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u044b), \u043d\u043e \u043c\u044b \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0438 \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0417\u043d\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0432 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043f\u0430\u043f\u043a\u0443 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u043f\u043e\u0440\u0442, \u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0435\u0448\u043a\u0443) \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043f\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 LABEL \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0444\u043b\u0435\u0448\u043a\u0438, \u0430 \u0435\u0441\u043b\u0438 LABEL \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0438\u043c\u044f \u0442\u043e\u0447\u043a\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 udev \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043c\u043e\u043d\u0441\u0442\u0440\u0430 systemd. \u0418\u0442\u0430\u043a, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b-\u043f\u0440\u0430\u0432\u0438\u043b\u043e 99-local.rules (\u0438\u043c\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 &#8212; \u043a\u0430\u043a\u043e\u0435 \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u043e, \u043d\u043e <s>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435<\/s> \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e .rules) \u043f\u043e \u043f\u0443\u0442\u0438 \/etc\/udev\/rules.d\/ \u0438 \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/etc\/udev\/rules.d\/99-local.rules KERNEL==\"sd*[!0-9]|sr*\", SUBSYSTEMS==\"usb\", ACTION==\"add\", RUN+=\"\/bin\/systemctl start usb-mount@%k.service\" KERNEL==\"sd*[!0-9]|sr*\", SUBSYSTEMS==\"usb\", ACTION==\"remove\", RUN+=\"\/bin\/systemctl stop usb-mount@%k.service\" EOF<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 systemd unit. \u0421\u0438\u043c\u0432\u043e\u043b \u0421\u043e\u0431\u0430\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u043b\u0435\u0448\u043a\u0438 \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442. <\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/etc\/systemd\/system\/usb-mount@.service [Unit] Description=Mount USB Drive on %i  [Service] Type=oneshot RemainAfterExit=true ExecStart=\/usr\/local\/bin\/usb-mount.sh add %i ExecStop=\/usr\/local\/bin\/usb-mount.sh remove %i EOF<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u043f\u0440\u043e\u0439\u0434\u0435\u043d. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0444\u043b\u0435\u0448\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442 usb-mount.sh \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/usr\/local\/bin\/usb-mount.sh #!\/bin\/bash  # This script is called from our systemd unit file to mount or unmount # a USB drive.  usage() {     echo \"Usage: $0 {add|remove} device_name (e.g. sdb1)\"     exit 1 }  if [[ $# -ne 2 ]]; then     usage fi  ACTION=$1 DEVBASE=$2 DEVICE=\"\/dev\/${DEVBASE}\"  # See if this drive is already mounted, and if so where MOUNT_POINT=$(\/bin\/mount | \/bin\/grep ${DEVICE} | \/usr\/bin\/awk '{ print $3 }')  do_mount() {     if [[ -n ${MOUNT_POINT} ]]; then         echo \"Warning: ${DEVICE} is already mounted at ${MOUNT_POINT}\"         exit 1     fi      # Get info for this drive: $ID_FS_LABEL, $ID_FS_UUID, and $ID_FS_TYPE     eval $(\/sbin\/blkid -o udev ${DEVICE})      # Figure out a mount point to use     LABEL=${ID_FS_LABEL}     if [[ -z \"${LABEL}\" ]]; then         LABEL=${DEVBASE}     elif \/bin\/grep -q \" \/media\/${LABEL} \" \/etc\/mtab; then         # Already in use, make a unique one         LABEL+=\"-${DEVBASE}\"     fi     MOUNT_POINT=\"\/media\/${LABEL}\"      echo \"Mount point: ${MOUNT_POINT}\"      \/bin\/mkdir -p ${MOUNT_POINT}      # Global mount options     OPTS=\"rw,relatime\"      # File system type specific mount options     if [[ ${ID_FS_TYPE} == \"vfat\" ]]; then         OPTS+=\",users,gid=100,umask=000,shortname=mixed,utf8=1,flush\"     fi      if ! \/bin\/mount -o ${OPTS} ${DEVICE} ${MOUNT_POINT}; then         echo \"Error mounting ${DEVICE} (status = $?)\"         \/bin\/rmdir ${MOUNT_POINT}         exit 1     fi      echo \"**** Mounted ${DEVICE} at ${MOUNT_POINT} ****\" }  do_unmount() {     if [[ -z ${MOUNT_POINT} ]]; then         echo \"Warning: ${DEVICE} is not mounted\"     else         \/bin\/umount -l ${DEVICE}         echo \"**** Unmounted ${DEVICE}\"     fi      # Delete all empty dirs in \/media that aren't being used as mount     # points. This is kind of overkill, but if the drive was unmounted     # prior to removal we no longer know its mount point, and we don't     # want to leave it orphaned...     for f in \/media\/* ; do         if [[ -n $(\/usr\/bin\/find \"$f\" -maxdepth 0 -type d -empty) ]]; then             if ! \/bin\/grep -q \" $f \" \/etc\/mtab; then                 echo \"**** Removing mount point $f\"                 \/bin\/rmdir \"$f\"             fi         fi     done }  case \"${ACTION}\" in     add)         do_mount         ;;     remove)         do_unmount         ;;     *)         usage         ;; esac  EOF<\/code><\/pre>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u0434\u044e\u0436\u0435\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0443 \u0444\u043b\u0435\u0448\u043a\u0443, \u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043e\u0434\u043d\u0443 \u0444\u043b\u0435\u0448\u043a\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u043f\u0430\u043f\u043a\u0443 \/media\/usb \u0441\u043b\u0435\u0433\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u043a\u0440\u0438\u043f\u0442<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u0438\u043f\u0442 usb-mount.sh \u0441 \u0442\u043e\u0447\u043a\u043e\u0439 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \/media\/usb<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/usr\/local\/bin\/usb-mount.sh #!\/bin\/bash  # This script is called from our systemd unit file to mount or unmount # a USB drive.  usage() {     echo \"Usage: $0 {add|remove} device_name (e.g. sdb1)\"     exit 1 }  if [[ $# -ne 2 ]]; then     usage fi  ACTION=$1 DEVBASE=$2 DEVICE=\"\/dev\/${DEVBASE}\"  # See if this drive is already mounted, and if so where MOUNT_POINT=$(\/bin\/mount | \/bin\/grep ${DEVICE} | \/usr\/bin\/awk '{ print $3 }')  do_mount() {     if [[ -n ${MOUNT_POINT} ]]; then         echo \"Warning: ${DEVICE} is already mounted at ${MOUNT_POINT}\"         exit 1     fi      # Get info for this drive: $ID_FS_LABEL, $ID_FS_UUID, and $ID_FS_TYPE     eval $(\/sbin\/blkid -o udev ${DEVICE})      # Figure out a mount point to use     LABEL=\"usb\"     if [[ -z \"${LABEL}\" ]]; then         LABEL=${DEVBASE}     elif \/bin\/grep -q \" \/media\/${LABEL} \" \/etc\/mtab; then         # Already in use, make a unique one         LABEL+=\"-${DEVBASE}\"     fi     MOUNT_POINT=\"\/media\/${LABEL}\"      echo \"Mount point: ${MOUNT_POINT}\"      \/bin\/mkdir -p ${MOUNT_POINT}      # Global mount options     OPTS=\"rw,relatime\"      # File system type specific mount options     if [[ ${ID_FS_TYPE} == \"vfat\" ]]; then         OPTS+=\",users,gid=100,umask=000,shortname=mixed,utf8=1,flush\"     fi      if ! \/bin\/mount -o ${OPTS} ${DEVICE} ${MOUNT_POINT}; then         echo \"Error mounting ${DEVICE} (status = $?)\"         \/bin\/rmdir ${MOUNT_POINT}         exit 1     fi      echo \"**** Mounted ${DEVICE} at ${MOUNT_POINT} ****\" }  do_unmount() {     if [[ -z ${MOUNT_POINT} ]]; then         echo \"Warning: ${DEVICE} is not mounted\"     else         \/bin\/umount -l ${DEVICE}         echo \"**** Unmounted ${DEVICE}\"     fi      # Delete all empty dirs in \/media that aren't being used as mount     # points. This is kind of overkill, but if the drive was unmounted     # prior to removal we no longer know its mount point, and we don't     # want to leave it orphaned...     for f in \/media\/* ; do         if [[ -n $(\/usr\/bin\/find \"$f\" -maxdepth 0 -type d -empty) ]]; then             if ! \/bin\/grep -q \" $f \" \/etc\/mtab; then                 echo \"**** Removing mount point $f\"                 \/bin\/rmdir \"$f\"             fi         fi     done }  case \"${ACTION}\" in     add)         do_mount         ;;     remove)         do_unmount         ;;     *)         usage         ;; esac  EOF<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0437\u0434\u0430\u043d, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">chmod 777 \/usr\/local\/bin\/usb-mount.sh<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438\u043b\u0438 \u0436\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438 udev \u0438  systemd<\/p>\n<p><code>udevadm control --reload-rules &amp;&amp; systemctl daemon-reload<\/code><\/p>\n<p>\u041f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043d\u0435\u043f\u043e\u043b\u0430\u0434\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 <\/p>\n<p><code>sudo udevadm control --log-priority=debug &amp;&amp; journalctl -f<\/code><\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b \u0437\u0430\u043d\u044f\u0442\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437 \u043c\u043e\u043d\u0441\u0442\u0440\u0430 systemd, \u0447\u0435\u0440\u0435\u0437 eudev, \u0435\u0441\u043b\u0438 \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u0442, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0445.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/673134\/\"> https:\/\/habr.com\/ru\/post\/673134\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u043c\u0435\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 <a href=\"https:\/\/github.com\/armbian\/build\" rel=\"noopener noreferrer nofollow\">armbian<\/a> \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. \u0418\u043b\u0438 \u0436\u0435 \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0441\u0431\u043e\u0440\u043a\u0443 \u043e\u0442 <a href=\"https:\/\/github.com\/orangepi-xunlong\/orangepi-build\" rel=\"noopener noreferrer nofollow\">Xunlong<\/a> (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 armbian).<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c \u0432 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0430\u043c\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0444\u043b\u0435\u0448\u043a\u0438 (\u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 FAT32). \u041f\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0442\u0430\u043a\u043e\u0439 \u0444\u043b\u0435\u0448\u043a\u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 E \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441 \u044d\u0442\u043e\u0439 \u0444\u043b\u0435\u0448\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041a\u0430\u043a \u0436\u0435 \u0435\u0451 \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c?<\/p>\n<h2>\u0420\u0443\u0447\u043d\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/h2>\n<p>\u0421\u0432\u044f\u0437\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b mount \u0438 \u043e\u043f\u0438\u0441\u0430\u043d <a href=\"https:\/\/snubmonkey.com\/how-to-mount-usb-drive-in-a-linux-system\/#gsc.tab=0\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0437\u0434\u0435<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0440\u0442, \u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0435\u0448\u043a\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. \u042d\u0442\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0414\u0430-\u0434\u0430, \u0432 Linux \u0432\u0430\u0448\u0430 \u0444\u043b\u0435\u0448\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e \/dev\/sda \u0442\u043e \/dev\/sdb \u0442\u043e \u0435\u0449\u0451 \u043a\u0430\u043a-\u0442\u043e. \u0422\u0430\u043a \u0432\u043e\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u0440\u0442 USB \u0434\u043b\u044f \u0444\u043b\u0435\u0448\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435, \u0442\u043e<\/p>\n<p>1) \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u043a \u043f\u043e\u0440\u0442\u0443. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u043b\u0435\u0448\u043a\u0438 (HDD, &#8230;), \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u0432\u043e\u0442\u043a\u043d\u0443\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u0435\u0448\u043a\u0443, \u0434\u0435\u043b\u0430\u0435\u043c<\/p>\n<p><code>ls -l \/dev\/disk\/by-path\/<\/code><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043b\u0435\u0448\u043a\u0443 \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0443 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0431\u044b\u043b\u043e, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0438\u043c\u044f. \u0423 \u043c\u0435\u043d\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0438\u043c\u044f &#171;platform-xhci-hcd.10.auto-usb-0:1:1.0-scsi-0:0:0:0&#187;:<\/p>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u043b\u0435\u0448\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u0434\u0430 \u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f), \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0441 \u0444\u043b\u0435\u0448\u043a\u043e\u0439, \u0431\u0443\u0434\u0435\u0442 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043f\u0430\u043f\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 (\u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f ~) \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443-\u0442\u043e\u0447\u043a\u0443-\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0451 usb, \u0442\u043e \u0435\u0441\u0442\u044c<\/p>\n<p><code>cd ~ &amp;&amp; mkdir usb<\/code><\/p>\n<p>4) \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c<\/p>\n<p><code>sudo mount \/dev\/disk\/by-path\/platform-xhci-hcd.10.auto-usb-0:1:1.0-scsi-0:0:0:0 ~\/usb -t vfat<\/code><\/p>\n<p>5) \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <\/p>\n<p><code>cd ~\/usb<\/code><\/p>\n<p>6) \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043d\u0435\u0439<\/p>\n<p><code>ls<\/code><\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u0432\u0430\u0448\u0443 FAT32 \u0444\u043b\u0435\u0448\u043a\u0443 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0443\u0441\u0441\u043a\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u044f\u0434\u0440\u043e Linux \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <a href=\"https:\/\/wiki.archlinux.org\/title\/FAT_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)\" rel=\"noopener noreferrer nofollow\">vfat<\/a> <\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043b\u044f OrangePi 4B \u0441 \u044f\u0434\u0440\u043e\u043c 4, \u0441\u043c \/external\/config\/kernel\/linux-rk3399-legacy.config<\/summary>\n<div class=\"spoiler__content\">\n<pre><code># # DOS\/FAT\/NT Filesystems # CONFIG_FAT_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_FAT_DEFAULT_CODEPAGE=866 CONFIG_FAT_DEFAULT_IOCHARSET=\"utf8\" # CONFIG_NTFS_FS is not set  Pseudo filesystems  CONFIG_PROC_FS=y CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_PROC_CHILDREN is not set CONFIG_PROC_UID=y CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y CONFIG_HUGETLBFS is not set CONFIG_HUGETLB_PAGE is not set CONFIG_CONFIGFS_FS=y CONFIG_MISC_FILESYSTEMS=y CONFIG_ADFS_FS is not set CONFIG_AFFS_FS is not set CONFIG_ECRYPT_FS is not set CONFIG_SDCARD_FS is not set CONFIG_HFS_FS is not set CONFIG_HFSPLUS_FS is not set CONFIG_BEFS_FS is not set CONFIG_BFS_FS is not set CONFIG_EFS_FS is not set CONFIG_LOGFS is not set CONFIG_CRAMFS is not set CONFIG_SQUASHFS=y CONFIG_SQUASHFS_DECOMP_SINGLE=y CONFIG_SQUASHFS_DECOMP_MULTI is not set CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set CONFIG_SQUASHFS_XATTR is not set CONFIG_SQUASHFS_ZLIB=y CONFIG_SQUASHFS_LZ4 is not set CONFIG_SQUASHFS_LZO is not set CONFIG_SQUASHFS_XZ is not set CONFIG_SQUASHFS_ZSTD is not set CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set CONFIG_SQUASHFS_EMBEDDED is not set CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 CONFIG_VXFS_FS is not set CONFIG_MINIX_FS is not set CONFIG_OMFS_FS is not set CONFIG_HPFS_FS is not set CONFIG_QNX4FS_FS is not set CONFIG_QNX6FS_FS is not set CONFIG_ROMFS_FS is not set CONFIG_PSTORE=y CONFIG_PSTORE_CONSOLE=y CONFIG_PSTORE_PMSG is not set CONFIG_PSTORE_FTRACE is not set CONFIG_PSTORE_RAM=y CONFIG_SYSV_FS is not set CONFIG_UFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V2=y CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_NFS_SWAP=y CONFIG_NFS_V4_1 is not set CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y CONFIG_NFSD is not set CONFIG_GRACE_PERIOD=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_SUNRPC_SWAP=y CONFIG_SUNRPC_DEBUG is not set CONFIG_CEPH_FS is not set CONFIG_CIFS is not set CONFIG_NCP_FS is not set CONFIG_CODA_FS is not set CONFIG_AFS_FS is not set CONFIG_NLS=y CONFIG_NLS_DEFAULT=\"utf8\" CONFIG_NLS_CODEPAGE_437=n CONFIG_NLS_CODEPAGE_737 is not set CONFIG_NLS_CODEPAGE_775 is not set CONFIG_NLS_CODEPAGE_850 is not set CONFIG_NLS_CODEPAGE_852 is not set CONFIG_NLS_CODEPAGE_855 is not set CONFIG_NLS_CODEPAGE_857 is not set CONFIG_NLS_CODEPAGE_860 is not set CONFIG_NLS_CODEPAGE_861 is not set CONFIG_NLS_CODEPAGE_862 is not set CONFIG_NLS_CODEPAGE_863 is not set CONFIG_NLS_CODEPAGE_864 is not set CONFIG_NLS_CODEPAGE_865 is not set CONFIG_NLS_CODEPAGE_866=y CONFIG_NLS_CODEPAGE_869 is not set CONFIG_NLS_CODEPAGE_936=n CONFIG_NLS_CODEPAGE_950 is not set CONFIG_NLS_CODEPAGE_932 is not set CONFIG_NLS_CODEPAGE_949 is not set CONFIG_NLS_CODEPAGE_874 is not set CONFIG_NLS_ISO8859_8 is not set CONFIG_NLS_CODEPAGE_1250 is not set CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=n CONFIG_NLS_ISO8859_2 is not set CONFIG_NLS_ISO8859_3 is not set CONFIG_NLS_ISO8859_4 is not set CONFIG_NLS_ISO8859_5 is not set CONFIG_NLS_ISO8859_6 is not set CONFIG_NLS_ISO8859_7 is not set CONFIG_NLS_ISO8859_9 is not set CONFIG_NLS_ISO8859_13 is not set CONFIG_NLS_ISO8859_14 is not set CONFIG_NLS_ISO8859_15 is not set CONFIG_NLS_KOI8_R is not set CONFIG_NLS_KOI8_U is not set CONFIG_NLS_MAC_ROMAN is not set CONFIG_NLS_MAC_CELTIC is not set CONFIG_NLS_MAC_CENTEURO is not set CONFIG_NLS_MAC_CROATIAN is not set CONFIG_NLS_MAC_CYRILLIC is not set CONFIG_NLS_MAC_GAELIC is not set CONFIG_NLS_MAC_GREEK is not set CONFIG_NLS_MAC_ICELAND is not set CONFIG_NLS_MAC_INUIT is not set CONFIG_NLS_MAC_ROMANIAN is not set CONFIG_NLS_MAC_TURKISH is not set CONFIG_NLS_UTF8=y CONFIG_DLM is not set CONFIG_VIRTUALIZATION is not set<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0412\u044b\u0448\u0435 \u0431\u044b\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0440\u0443\u0447\u043d\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0436\u0435 <a href=\"https:\/\/github.com\/Ferk\/udev-media-automount\" rel=\"noopener noreferrer nofollow\">\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442<\/a> (\u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0435\u0449\u0451 &#8212; \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u0435\u043d\u0442\u044b), \u043d\u043e \u043c\u044b \u043f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0438 \u0443\u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0417\u043d\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u0432 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u043f\u0430\u043f\u043a\u0443 (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u043f\u043e\u0440\u0442, \u043a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0435\u0448\u043a\u0443) \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043f\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 LABEL \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0444\u043b\u0435\u0448\u043a\u0438, \u0430 \u0435\u0441\u043b\u0438 LABEL \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0438\u043c\u044f \u0442\u043e\u0447\u043a\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0430, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 udev \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u043c\u043e\u043d\u0441\u0442\u0440\u0430 systemd. \u0418\u0442\u0430\u043a, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0439 \u0444\u0430\u0439\u043b-\u043f\u0440\u0430\u0432\u0438\u043b\u043e 99-local.rules (\u0438\u043c\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 &#8212; \u043a\u0430\u043a\u043e\u0435 \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u043e, \u043d\u043e <s>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435<\/s> \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e .rules) \u043f\u043e \u043f\u0443\u0442\u0438 \/etc\/udev\/rules.d\/ \u0438 \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/etc\/udev\/rules.d\/99-local.rules KERNEL==\"sd*[!0-9]|sr*\", SUBSYSTEMS==\"usb\", ACTION==\"add\", RUN+=\"\/bin\/systemctl start usb-mount@%k.service\" KERNEL==\"sd*[!0-9]|sr*\", SUBSYSTEMS==\"usb\", ACTION==\"remove\", RUN+=\"\/bin\/systemctl stop usb-mount@%k.service\" EOF<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 systemd unit. \u0421\u0438\u043c\u0432\u043e\u043b \u0421\u043e\u0431\u0430\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u043b\u0435\u0448\u043a\u0438 \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442. <\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/etc\/systemd\/system\/usb-mount@.service [Unit] Description=Mount USB Drive on %i  [Service] Type=oneshot RemainAfterExit=true ExecStart=\/usr\/local\/bin\/usb-mount.sh add %i ExecStop=\/usr\/local\/bin\/usb-mount.sh remove %i EOF<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u043f\u0440\u043e\u0439\u0434\u0435\u043d. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0444\u043b\u0435\u0448\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442 usb-mount.sh \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c<\/p>\n<pre><code class=\"bash\">cat &lt;&lt;EOF > \/usr\/local\/bin\/usb-mount.sh #!\/bin\/bash  # This script is called from our systemd unit file to mount or unmount # a USB drive.  usage() {     echo \"Usage: $0 {add|remove} device_name (e.g. sdb1)\"     exit 1 }  if [[ $# -ne 2 ]]; then     usage fi  ACTION=$1 DEVBASE=$2 DEVICE=\"\/dev\/${DEVBASE}\"  # See if this drive is already mounted, and if so where MOUNT_POINT=$(\/bin\/mount | \/bin\/grep ${DEVICE} | \/usr\/bin\/awk '{ print $3 }')  do_mount() {     if [[ -n ${MOUNT_POINT} ]]; then         echo \"Warning: ${DEVICE} is already mounted at ${MOUNT_POINT}\"         exit 1     fi      # Get info for this drive: $ID_FS_LABEL, $ID_FS_UUID, and $ID_FS_TYPE     eval $(\/sbin\/blkid -o udev ${DEVICE})      # Figure out a mount point to use     LABEL=${ID_FS_LABEL}     if [[ -z \"${LABEL}\" ]]; then         LABEL=${DEVBASE}     elif \/bin\/grep -q \" \/media\/${LABEL} \" \/etc\/mtab; then         # Already in use, make a unique one         LABEL+=\"-${DEVBASE}\"     fi     MOUNT_POINT=\"\/media\/${LABEL}\"      echo \"Mount point: ${MOUNT_POINT}\"      \/bin\/mkdir -p ${MOUNT_POINT}      # Global mount options     OPTS=\"rw,relatime\"      # File system type specific mount options     if [[ ${ID_FS_TYPE} == \"vfat\" ]]; then         OPTS+=\",users,gid=100,umask=000,shortname=mixed,utf8=1,flush\"     fi      if ! \/bin\/mount -o ${OPTS} ${DEVICE} ${MOUNT_POINT}; then         echo \"Error mounting ${DEVICE} (status = $?)\"         \/bin\/rmdir ${MOUNT_POINT}         exit 1     fi      echo \"**** Mounted ${DEVICE} at ${MOUNT_POINT} ****\" }  do_unmount() {     if [[ -z ${MOUNT_POINT} ]]; then         echo \"Warning: ${DEVICE} is not mounted\"     else         \/bin\/umount -l ${DEVICE}         echo \"**** Unmounted ${DEVICE}\"     fi      # Delete all empty dirs in \/media that aren't being used as mount     # points. This is kind of overkill, but if the drive was unmounted     # prior to removal we no longer know its mount point, and we don't     # want to leave it orphaned...     for f in \/media\/* ; do         if [[ -n $(\/usr\/bin\/find \"$f\" -maxdepth 0 -type d -empty) ]]; then             if ! \/bin\/grep -q \" $f \" \/etc\/mtab; then                 echo \"**** Removing mount point $f\"                 \/bin\/rmdir \"$f\"             fi         fi     done }  case \"${ACTION}\" in     add)         do_mount <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-334908","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/334908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=334908"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/334908\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=334908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=334908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=334908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}