找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 14130|回复: 19

在lingbaoboy大神的帮助下,终于在CC15.05.1纯净版成功挂载USB移动硬盘,谢谢

  [复制链接]
发表于 2016-7-25 19:29 | 显示全部楼层 |阅读模式
原生纯净版下载地址http://downloads.openwrt.org/chaos_calmer/15.05.1/

先设置路由能上网

登录putty终端





粘贴下面命令

opkg update
opkg install kmod-usb-core
opkg install kmod-usb2                #安装usb2.0
opkg install kmod-usb-ohci            #安装usb ohci控制器驱动
opkg install kmod-usb-storage         #安装usb存储设备驱动
opkg install kmod-fs-vfat             #挂载FAT
opkg install ntfs-3g                  #挂载NTFS
opkg install mount-utils              #挂载卸载工具
opkg install block-mount
opkg install fdisk    #磁盘工具
opkg install kmod-nls-cp437 kmod-nls-iso8859-1    #语言支持包
opkg install luci-app-samba           #SAMBA网络共享服务
/etc/init.d/samba enable              #启用并开始SAMBA共享
/etc/init.d/samba restart


重启路由后键入命令
mkdir -p /mnt/sta1
mount -t ntfs-3g /dev/sda1 /mnt/sta1  #挂载


可以在页面看到已经加载成功,可以看到硬盘了



进入共享




设置Samba共享



至此,已经可以通过网络访问移动硬盘了。

下面添加开机自动挂载
用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.
 楼主| 发表于 2016-7-25 19:30 | 显示全部楼层
本帖最后由 jiyuquan 于 2016-7-25 21:13 编辑

需要FQ!!!!!
shadowsock-libev-spec   下载 !!!!!
luci-shadowsock             下载 !!!!!

1.安装SS
winscp将ipk文件上传至/tmp目录
putty登录路由,运行命令

opkg update
opkg install iptables-mod-nat-extra ipset libopenssl

opkg remove dnsmasq && opkg install dnsmasq-full
cd /tmp
opkg install 你上传的文件名.ipk     #SS文件
opkg install 你上传的文件名.ipk     #LUCI文件
reboot                                           #重启路由

2.安装ChinaDNS
需要FQ!!!!!
chinadns      下载
luci-app-chinadns 下载

winscp将ipk文件上传至/tmp目录

putty登录路由,运行命令

cd /tmp
opkg install 你上传的文件名.ipk     #chinadns文件
opkg install 你上传的文件名.ipk     #LUCI文件

reboot                                           #重启路由


3.配置
putty登录路由,运行命令
ipset -N redir iphash
iptables -t nat -A PREROUTING -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1080
winscp登录路由,修改 /etc/dnsmasq.conf ,在最后加入conf-dir=/etc/dnsmasq.d


在/etc目录下新建文件名为dnsmasq.d的文件夹,然后下载 dnsmasq_list.conf 后放入dnsmasq.d文件夹下
dnsmasq_list.conf下载链接: http://pan.baidu.com/s/1jHQnDCq 密码: 9f4u

4.启用
/etc/init.d/s-s enable
/etc/init.d/s-s start



4.界面设置


















本帖子中包含更多资源

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

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-7-25 22:28 | 显示全部楼层
66666666666
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-7-25 22:39 | 显示全部楼层
感谢分享,学习了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-7-25 22:43 | 显示全部楼层
顺带发现s-s的2.4.8,捡到宝贝一样高兴 :)
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-7-25 23:46 来自手机 | 显示全部楼层
我的怕供电不足,也不怎么下载
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-7-27 21:46 | 显示全部楼层
需要改内存吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-8-2 21:50 | 显示全部楼层
搞好这些后,怎么才能保存配置呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2016-10-14 15:39 | 显示全部楼层
mark!!!!!!!!!!!!!!!!!!!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-5-2 20:35 | 显示全部楼层
你好,之前BB版本是可以挂载移动硬盘,新刷明月CC冬至版后只能挂64G优盘,今天又刷了官方cc150501后,按你的方法操作,还是只能挂优盘,移动硬盘用NTFS或EXT3格式,FDISK -L都看不到。不知道什么情况。

点评

困惑好久的问题,今天已经解决(移动硬盘无法识别,金士顿的16G优盘五无法识别),HUN加装电源,搞定。  详情 回复 发表于 2017-5-5 19:10
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-5-5 19:10 | 显示全部楼层
lijunz 发表于 2017-5-2 20:35
你好,之前BB版本是可以挂载移动硬盘,新刷明月CC冬至版后只能挂64G优盘,今天又刷了官方cc150501后,按你 ...

困惑好久的问题,今天已经解决(移动硬盘无法识别,金士顿的16G优盘五无法识别),HUN加装电源,搞定。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-6-11 21:12 | 显示全部楼层
多谢大大分享,问题完美解决了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-7-5 09:52 | 显示全部楼层
先MARK 一下,现在还不懂。学习学习
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-5 17:36 | 显示全部楼层
我按照你的步骤,挂载点识别不到U盘,不知为何?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-5 19:51 来自手机 | 显示全部楼层
楼主,你这个2009年的脚本已经过时了,这个脚本有bug,openwrt官方已经更新到2015版了,详情见我的帖子

点评

谢谢 #!/bin/sh # Copyright (C) 2011 OpenWrt.org sleep 10 #more apps installed, need more time to load kernel modules! blkdev=`dirname $DEVPATH` if [ `basename $blkdev` != "block" ]; then  详情 回复 发表于 2017-8-6 08:21
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-29 10:32

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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