找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 763|回复: 2

请问USB硬盘可以识别,但不能挂载文件系统

[复制链接]
发表于 2020-9-14 16:23 | 显示全部楼层 |阅读模式
本帖最后由 hzwj 于 2020-9-15 21:05 编辑

请问USB硬盘可以识别,但不能挂载文件系统,请教怎么解决?

已自行百度解决:如下
用WinSCP连接路由器,打开/etc/hotplug.d/block/10-mount文件(如果不存在请新建)
修改为如下内容
#!/bin/sh

# Copyright (C) 2009 OpenWrt.org  (C) 2010 OpenWrt.org.cn

blkdev=`dirname $DEVPATH`
if [ `basename $blkdev` != "block" ]; then

    device=`basename $DEVPATH`
    case "$ACTION" in
        add)
                mkdir -p /mnt/$device
                # vfat & ntfs-3g check
                if  [ `which fdisk` ]; then
                        isntfs=`fdisk -l | grep $device | grep NTFS`
                        isvfat=`fdisk -l | grep $device | grep FAT`
                        isfuse=`lsmod | grep fuse`
                        isntfs3g=`which ntfs-3g`
                else
                        isntfs=""
                        isvfat=""
                fi

                # mount with ntfs-3g if possible, else with default mount
                if [ "$isntfs" -a "$isfuse" -a "$isntfs3g" ]; then
                        ntfs-3g -o nls=utf8 /dev/$device /mnt/$device
                elif [ "$isvfat" ]; then
                        mount -t vfat -o iocharset=utf8,rw,sync,umask=0000,dmask=0000,fmask=0000 /dev/$device /mnt/$device
                else
                        mount /dev/$device /mnt/$device
                fi
  if [ -f /dev/${device}/swapfile ]; then
   mkswap /dev/${device}/swapfile
   swapon /dev/${device}/swapfile
  fi
                ;;
        remove)
  if [ -f /dev/${device}/swapfile ]; then
   swapoff /dev/${device}/swapfile
  fi
                umount /dev/$device
                ;;
    esac

fi
这段脚本可实现自动挂载

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2020-9-15 12:42 来自手机 | 显示全部楼层
有人教下不
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-9-15 20:22 | 显示全部楼层
违禁词语,请勿在发载点,可是不能访问,怎么弄
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-25 17:50

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表