字體:小 中 大 | |
|
|
2022/12/01 17:39:05瀏覽93|回應0|推薦0 | |
指令git clone下來的openwrt BSP, 預設沒有技援auto mount USB disk of fat32
修改.config內的4個設定
CONFIG_PACKAGE_mount-utils=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_block-mount=y
Re-build後刷到linkit7688, 多了指令block
block info
/dev/mtdblock5: UUID="d10a1d5b-a2693e29-539e5350-b188feeb" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock6: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="FC1A-D69D" LABEL=" " VERSION="FAT32" TYPE="vfat" < - - - 有抓到,沒掛載
uci show fstab
fstab.@global[0]=global
fstab.@global[0].anon_swap='0'
fstab.@global[0].anon_mount='0'
fstab.@global[0].auto_swap='1'
fstab.@global[0].auto_mount='1'
fstab.@global[0].delay_root='5'
fstab.@global[0].check_fs='0'
fstab.@mount[0]=mount
fstab.@mount[0].target='/mnt/sda1'
fstab.@mount[0].uuid='FC1A-D69D'
fstab.@mount[0].enabled='0'
修改參數,啟用自動掛載
uci set fstab.@mount[0].enabled=1
uci commit fstab
service fstab boot
lock info
/dev/mtdblock5: UUID="2bac6073-c9c3ba3c-2a700b40-806253ac" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock6: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="FC1A-D69D" LABEL=" " VERSION="FAT32" MOUNT="/mnt/sda1" TYPE="vfat" < - - - 掛載到/mnt/sda1了
測試版本
cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='21.02.1'
DISTRIB_REVISION='r16325-88151b8303'
DISTRIB_TARGET='ramips/mt76x8'
DISTRIB_ARCH='mipsel_24kc'
DISTRIB_DESCRIPTION='OpenWrt 21.02.1 r16325-88151b8303'
DISTRIB_TAINTS='no-all
|
|
( 創作|其他 ) |