找回密码
 立即注册

QQ登录

只需一步,快速开始

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

中国电信定制5口千兆路由友华WR2000js挂载U盘添加SWAP缓存和部署v2瑞和$$R出国旅行

[复制链接]
发表于 2018-10-6 14:04 | 显示全部楼层 |阅读模式
本帖最后由 speedturtle 于 2019-1-2 11:16 编辑

billy@billy-m3:~$ telnet 192.168.9.1
Trying 192.168.9.1...
Connected to 192.168.9.1.

YOUHUA-WR1200JS login: admin #输入用户
Password:   #输入密码

BusyBox v1.24.2 (2018-06-07 00:53:20 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

[YOUHUA-WR1200JS /home/root]# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=8k)
tmpfs on /etc type tmpfs (rw,noatime,size=4096k)
tmpfs on /home type tmpfs (rw,relatime,size=1024k)
tmpfs on /media type tmpfs (rw,relatime,size=8k)
tmpfs on /mnt type tmpfs (rw,relatime,size=8k)
tmpfs on /tmp type tmpfs (rw,relatime,size=32768k)
tmpfs on /var type tmpfs (rw,relatime,size=4096k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda1 on /media/AiDisk_a1 type exfat (rw,noatime,fmask=0000,dmask=0000,allow_utime=0022,iocharset=utf8,namecase=0,errors=remount-ro)
[YOUHUA-WR1200JS /home/root]# df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                   12928     12928         0 100% /
/dev/root                12928     12928         0 100% /
proc                         0         0         0   0% /proc
sysfs                        0         0         0   0% /sys
usbfs                        0         0         0   0% /proc/bus/usb
tmpfs                        8         0         8   0% /dev
tmpfs                     4096       704      3392  17% /etc
tmpfs                     1024         4      1020   0% /home
tmpfs                        8         0         8   0% /media
tmpfs                        8         0         8   0% /mnt
tmpfs                    32768       152     32616   0% /tmp
tmpfs                     4096       256      3840   6% /var
devpts                       0         0         0   0% /dev/pts
/dev/sda1            262133760  12840064 249293696   5% /media/AiDisk_a1 #新买回来的U盘已经格式化了,下面重新分区格式化设置

[YOUHUA-WR1200JS /home/root]# cat /proc/partitions
major minor  #blocks  name

  31        0        192 mtdblock0
  31        1         64 mtdblock1
  31        2         64 mtdblock2
  31        3       1297 mtdblock3
  31        4      14254 mtdblock4
  31        5        512 mtdblock5
  31        6      15552 mtdblock6
   8        0  262144000 sda
   8        1  262142976 sda1
[YOUHUA-WR1200JS /home/root]# fdisk -lu /dev/sda

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *        2048   524287999   262142976   7 HPFS/NTFS
[YOUHUA-WR1200JS /home/root]# fdisk -u /dev/sda

The number of cylinders for this disk is set to 32635.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m
Command Action
a       toggle a bootable flag
b       edit bsd disklabel
c       toggle the dos compatibility flag
d       delete a partition
l       list known partition types
n       add a new partition
o       create a new empty DOS partition table
p       print the partition table
q       quit without saving changes
s       create a new empty Sun disklabel
t       change a partition's system id
u       change display/entry units
v       verify the partition table
w       write table to disk and exit
x       extra functionality (experts only)

Command (m for help): d
Selected partition 1

Command (m for help): 1
1: unknown command
Command Action
a       toggle a bootable flag
b       edit bsd disklabel
c       toggle the dos compatibility flag
d       delete a partition
l       list known partition types
n       add a new partition
o       create a new empty DOS partition table
p       print the partition table
q       quit without saving changes
s       create a new empty Sun disklabel
t       change a partition's system id
u       change display/entry units
v       verify the partition table
w       write table to disk and exit
x       extra functionality (experts only)

Command (m for help): d
No partition is defined yet!

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (2048-524287999, default 2048): Using default value 2048
Last sector or +size or +sizeM or +sizeK (2048-524287999, default 524287999): +256M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First sector (502049-524287999, default 502049): Using default value 502049
Last sector or +size or +sizeM or +sizeK (502049-524287999, default 524287999): Using default value 524287999

Command (m for help): m
Command Action
a       toggle a bootable flag
b       edit bsd disklabel
c       toggle the dos compatibility flag
d       delete a partition
l       list known partition types
n       add a new partition
o       create a new empty DOS partition table
p       print the partition table
q       quit without saving changes
s       create a new empty Sun disklabel
t       change a partition's system id
u       change display/entry units
v       verify the partition table
w       write table to disk and exit
x       extra functionality (experts only)

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 82
Changed system type of partition 1 to 82 (Linux swap)

Command (m for help): p

Disk /dev/sda: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders, total 524288000 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1            2048      502048      250000+ 82 Linux swap
Partition 1 does not end on cylinder boundary
/dev/sda2          502049   524287999   261892975+ 83 Linux
Partition 2 does not end on cylinder boundary

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
[YOUHUA-WR1200JS /home/root]# cat /proc/partitions
major minor  #blocks  name

  31        0        192 mtdblock0
  31        1         64 mtdblock1
  31        2         64 mtdblock2
  31        3       1297 mtdblock3
  31        4      14254 mtdblock4
  31        5        512 mtdblock5
  31        6      15552 mtdblock6
   8        0  262144000 sda
   8        1     250000 sda1
   8        2  261892975 sda2
[YOUHUA-WR1200JS /home/root]# mkfs.ext4 -m 0 -L Main /dev/sda2  #这里的ext4是文件系统,我平时都是使用Linux所以选择这个。离不开windows的用户可以选择exFAT
mke2fs 1.42.8 (20-Jun-2013)
Filesystem label=Main
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
16375808 inodes, 65473243 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1999 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done                           
Writing inode tables: 1339/1999 #我的U盘比较大这里等了好久

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   
接下來是啓用swap space:
[YOUHUA-WR1200JS /home/root]#mkswap /dev/sda1
Setting up swapspace version 1, size = 255996416 bytes
系統下次啓動的時候會調用U盤的swap作爲緩存


====以上完成分区设置SWAP,以及格式化====
U盘替代移动硬盘,很小巧,速度还可以,而且不用考虑用电的问题。

啓用ENTware
首先,創建OPT目錄,輸入命令  mkdir /media/Main/opt

然後在路由器管理界面進行以下圖片標註的設置。


最後查看掛載是否成功,正常掛載顯示如下:
[YOUHUA-WR1200JS /opt/home/admin]# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=8k)
tmpfs on /etc type tmpfs (rw,noatime,size=4096k)
tmpfs on /home type tmpfs (rw,relatime,size=1024k)
tmpfs on /media type tmpfs (rw,relatime,size=8k)
tmpfs on /mnt type tmpfs (rw,relatime,size=8k)
tmpfs on /tmp type tmpfs (rw,relatime,size=32768k)
tmpfs on /var type tmpfs (rw,relatime,size=4096k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda2 on /media/Main type ext4 (rw,noatime,data=ordered)
/dev/sda2 on /opt type ext4 (rw,noatime,data=ordered)




本帖子中包含更多资源

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

×
我的恩山、我的无线 The best wifi forum is right here.
发表于 2018-10-6 19:27 来自手机 | 显示全部楼层
16M勉强够跑v2瑞,我用过,还行
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-10-7 12:36 | 显示全部楼层
hcyme 发表于 2018-10-6 19:27
16M勉强够跑v2瑞,我用过,还行

我加了个U盘用的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-26 12:52

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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