一次小米路由器3刷机的翻车记录

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/taoke00/article/details/89308460

下载旧版本ROM,手动降级

小米路由3miwifi_r3_all_55ac7_2.11.20.bin

登陆后拿到stock id,替换url中的id,在浏览器中打开。

第一行是修改密码的

http://192.168.31.1/cgi-bin/luci/;stok=30aa27d23b2db1881375dc53d0eace72/api/xqsystem/set_name_password?oldPwd=12345678&newPwd=1Qaz2wsx

http://192.168.31.1/cgi-bin/luci/;stok=30aa27d23b2db1881375dc53d0eace72/api/xqnetwork/set_wifi_ap?ssid=tianbao&encryption=NONE&enctype=NONE&channel=1%3Bnvram%20set%20ssh%5Fen%3D1%3B%20nvram%20commit

返回1616正常

http://192.168.31.1/cgi-bin/luci/;stok=30aa27d23b2db1881375dc53d0eace72/api/xqnetwork/set_wifi_ap?ssid=tianbao&encryption=NONE&enctype=NONE&channel=1%3Bsed%20%2Di%20%22%3Ax%3AN%3As%2Fif%20%5C%5B%2E%2A%5C%3B%20then%5Cn%2E%2Areturn%200%5Cn%2E%2Afi%2F%23tb%2F%3Bb%20x%22%20%2Fetc%2Finit.d%2Fdropbear

返回1616正常

http://192.168.31.1/cgi-bin/luci/;stok=30aa27d23b2db1881375dc53d0eace72/api/xqnetwork/set_wifi_ap?ssid=tianbao&encryption=NONE&enctype=NONE&channel=1%3B%2Fetc%2Finit.d%2Fdropbear%20start

返回1616正常

可以通过SSH登陆,以下是备份当前bin到外置存储,最终备份也没用到。

dd if=/dev/mtd0 of=/extdisks/sda/mtd0.bin
dd if=/dev/mtd1 of=/extdisks/sda/mtd1.bin
dd if=/dev/mtd2 of=/extdisks/sda/mtd2.bin
dd if=/dev/mtd3 of=/extdisks/sda/mtd3.bin
dd if=/dev/mtd4 of=/extdisks/sda/mtd4.bin
dd if=/dev/mtd5 of=/extdisks/sda/mtd5.bin
dd if=/dev/mtd6 of=/extdisks/sda/mtd6.bin
dd if=/dev/mtd7 of=/extdisks/sda/mtd7.bin
dd if=/dev/mtd8 of=/extdisks/sda/mtd8.bin
dd if=/dev/mtd9 of=/extdisks/sda/mtd9.bin
dd if=/dev/mtd10 of=/extdisks/sda/mtd10.bin
dd if=/dev/mtd11 of=/extdisks/sda/mtd11.bin
dd if=/dev/mtd12 of=/extdisks/sda/mtd12.bin

刷入uboot,关键步骤。

此处无报错,但是操作时缺乏验证,应该重启长按reset测试?

nvram set boot_wait=on
nvram set uart_en=1
nvram commit
mtd write /tmp/uboot.bin Bootloader

上传新的rom文件,切割写入kernel。

也没报错,但是重启就成砖了。。。

dd if=MI-R3G_3.4.3.9-099.trx bs=4194304 count=1 2> /dev/null | dd of=MI-R3G_3.4.3.9-099.trx.part1 2> /dev/null
mtd write MI-R3G_3.4.3.9-099.trx.part1 kernel1
dd if=MI-R3G_3.4.3.9-099.trx bs=4194304 skip=1 2> /dev/null | dd of=MI-R3G_3.4.3.9-099.trx.part2 2> /dev/null
mtd write MI-R3G_3.4.3.9-099.trx.part2 rootfs0
nvram set flag_last_success=1
nvram commit

最后给大家贴上完整的日志文件,引以为鉴。。

[d:~]$
Connecting to 192.168.31.1:22…
Connection established.
To escape to local shell, press ‘Ctrl+Alt+]’.
sh: /usr/bin/X11/xauth: not found
BusyBox v1.19.4 (2016-04-15 17:38:14 CST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

Welcome to XiaoQiang!

root@XiaoQiang:~# cat /proc/mtd
dev: size erasesize name
mtd0: 08000000 00020000 “ALL”
mtd1: 00040000 00020000 “Bootloader”
mtd2: 00040000 00020000 “Config”
mtd3: 00040000 00020000 “Bdata”
mtd4: 00040000 00020000 “Factory”
mtd5: 00040000 00020000 “crash”
mtd6: 00040000 00020000 “crash_syslog”
mtd7: 00080000 00020000 “reserved0”
mtd8: 00400000 00020000 “kernel0”
mtd9: 00400000 00020000 “kernel1”
mtd10: 02000000 00020000 “rootfs0”
mtd11: 02000000 00020000 “rootfs1”
mtd12: 03600000 00020000 “overlay”
root@XiaoQiang:~# df -Th
df: invalid option – T
BusyBox v1.19.4 (2016-04-15 17:38:14 CST) multi-call binary.
Usage: df [-Pkmh] [FILESYSTEM]…
Print filesystem usage statistics
-P POSIX output format
-k 1024-byte blocks (default)
-m 1M-byte blocks
-h Human readable (e.g. 1K 243M 2G)
root@XiaoQiang:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 25.9M 25.6M 252.0K 99% /
none 60.4M 0 60.4M 0% /dev
tmpfs 60.9M 3.7M 57.2M 6% /tmp
ubi0_0 25.9M 25.6M 252.0K 99% /
tmpfs 60.9M 3.7M 57.2M 6% /tmp
tmpfs 60.9M 3.7M 57.2M 6% /extdisks
ubi1_0 45.4M 6.1M 36.9M 14% /data
ubi1_0 45.4M 6.1M 36.9M 14% /userdisk
ubi0_0 25.9M 25.6M 252.0K 99% /userdisk/data
ubi1_0 45.4M 6.1M 36.9M 14% /etc
/dev/sda 28.6G 19.0M 28.6G 0% /extdisks/sda
root@XiaoQiang:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
inet6 fe80::f2b4:29ff:fefa:25f4/64 scope link
valid_lft forever preferred_lft forever
3: ifb0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 32
link/ether 0e:72:26:f8:95:55 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c72:26ff:fef8:9555/64 scope link
valid_lft forever preferred_lft forever
4: teql0: mtu 1500 qdisc noop state DOWN qlen 100
link/void
5: gre0: mtu 1476 qdisc noop state DOWN
link/gre 0.0.0.0 brd 0.0.0.0
6: wl1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether f0:b4:29:fa:25:f5 brd ff:ff:ff:ff:ff:ff
7: wl0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether f0:b4:29:fa:25:f6 brd ff:ff:ff:ff:ff:ff
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.1/24 brd 192.168.31.255 scope global br-lan
inet6 fe80::f2b4:29ff:fefa:25f4/64 scope link
valid_lft forever preferred_lft forever
9: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
10: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
inet 10.43.173.85/23 brd 10.43.173.255 scope global eth0.2
inet6 fe80::f2b4:29ff:fefa:25f4/64 scope link
valid_lft forever preferred_lft forever
11: apclii0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether f2:b4:29:fa:25:f6 brd ff:ff:ff:ff:ff:ff
12: wl2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether f2:b4:29:f8:25:f5 brd ff:ff:ff:ff:ff:ff
inet 169.254.29.1/24 brd 169.254.29.255 scope global wl2
inet6 fe80::f0b4:29ff:fef8:25f5/64 scope link
valid_lft forever preferred_lft forever
13: wl3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether f2:b4:29:f9:25:f5 brd ff:ff:ff:ff:ff:ff
14: apcli0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether f2:b4:29:fa:25:f5 brd ff:ff:ff:ff:ff:ff
root@XiaoQiang:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 25.9M 25.6M 252.0K 99% /
none 60.4M 0 60.4M 0% /dev
tmpfs 60.9M 3.6M 57.3M 6% /tmp
ubi0_0 25.9M 25.6M 252.0K 99% /
tmpfs 60.9M 3.6M 57.3M 6% /tmp
tmpfs 60.9M 3.6M 57.3M 6% /extdisks
ubi1_0 45.4M 6.1M 36.9M 14% /data
ubi1_0 45.4M 6.1M 36.9M 14% /userdisk
ubi0_0 25.9M 25.6M 252.0K 99% /userdisk/data
ubi1_0 45.4M 6.1M 36.9M 14% /etc
/dev/sda 28.6G 19.0M 28.6G 0% /extdisks/sda
root@XiaoQiang:~# dd if=/dev/mtd0 of=/extdisks/sda/mtd0.bin
262144+0 records in
262144+0 records out
root@XiaoQiang:~# dd if=/dev/mtd1 of=/extdisks/sda/mtd1.bin
512+0 records in
512+0 records out
root@XiaoQiang:~# dd if=/dev/mtd2 of=/extdisks/sda/mtd2.bin
512+0 records in
512+0 records out
root@XiaoQiang:~# dd if=/dev/mtd3 of=/extdisks/sda/mtd3.bin
512+0 records in
512+0 records out
root@XiaoQiang:~# dd if=/dev/mtd4 of=/extdisks/sda/mtd4.bin
512+0 records in
512+0 records out
root@XiaoQiang:~# dd if=/dev/mtd5 of=/extdisks/sda/mtd5.bin
512+0 records in
512+0 records out
root@XiaoQiang:~# dd if=/dev/mtd6 of=/extdisks/sda/mtd6.bin
512+0 records in
512+0 records out
root@XiaoQiang:~# dd if=/dev/mtd7 of=/extdisks/sda/mtd7.bin
1024+0 records in
1024+0 records out
root@XiaoQiang:~# dd if=/dev/mtd8 of=/extdisks/sda/mtd8.bin
8192+0 records in
8192+0 records out
root@XiaoQiang:~# dd if=/dev/mtd9 of=/extdisks/sda/mtd9.bin
8192+0 records in
8192+0 records out
root@XiaoQiang:~# dd if=/dev/mtd10 of=/extdisks/sda/mtd10.bin
65536+0 records in
65536+0 records out
root@XiaoQiang:~# dd if=/dev/mtd11 of=/extdisks/sda/mtd11.bin
65536+0 records in
65536+0 records out
root@XiaoQiang:~# dd if=/dev/mtd12 of=/extdisks/sda/mtd12.bin
110592+0 records in
110592+0 records out
root@XiaoQiang:~#
root@XiaoQiang:~#
root@XiaoQiang:~# ipconfig
-ash: ipconfig: not found
root@XiaoQiang:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
inet6 fe80::f2b4:29ff:fefa:25f4/64 scope link
valid_lft forever preferred_lft forever
3: ifb0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 32
link/ether 0e:72:26:f8:95:55 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c72:26ff:fef8:9555/64 scope link
valid_lft forever preferred_lft forever
4: teql0: mtu 1500 qdisc noop state DOWN qlen 100
link/void
5: gre0: mtu 1476 qdisc noop state DOWN
link/gre 0.0.0.0 brd 0.0.0.0
6: wl1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether f0:b4:29:fa:25:f5 brd ff:ff:ff:ff:ff:ff
7: wl0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether f0:b4:29:fa:25:f6 brd ff:ff:ff:ff:ff:ff
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
inet 192.168.31.1/24 brd 192.168.31.255 scope global br-lan
inet6 fe80::f2b4:29ff:fefa:25f4/64 scope link
valid_lft forever preferred_lft forever
9: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
10: eth0.2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether f0:b4:29:fa:25:f4 brd ff:ff:ff:ff:ff:ff
inet 10.43.173.85/23 brd 10.43.173.255 scope global eth0.2
inet6 fe80::f2b4:29ff:fefa:25f4/64 scope link
valid_lft forever preferred_lft forever
11: apclii0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether f2:b4:29:fa:25:f6 brd ff:ff:ff:ff:ff:ff
12: wl2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether f2:b4:29:f8:25:f5 brd ff:ff:ff:ff:ff:ff
inet 169.254.29.1/24 brd 169.254.29.255 scope global wl2
inet6 fe80::f0b4:29ff:fef8:25f5/64 scope link
valid_lft forever preferred_lft forever
13: wl3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether f2:b4:29:f9:25:f5 brd ff:ff:ff:ff:ff:ff
14: apcli0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether f2:b4:29:fa:25:f5 brd ff:ff:ff:ff:ff:ff
root@XiaoQiang:~# cd /tmp
root@XiaoQiang:/tmp# rz -E
-ash: rz: not found
root@XiaoQiang:/tmp#
-ash: **B00: not found
root@XiaoQiang:/tmp#
root@XiaoQiang:/tmp# rz -E
-ash: rz: not found
root@XiaoQiang:/tmp#
-ash: **B00: not found
root@XiaoQiang:/tmp#
root@XiaoQiang:/tmp#
root@XiaoQiang:/tmp# ftp
-ash: ftp: not found
root@XiaoQiang:/tmp# scp
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 […] [[user@]host2:]file2
root@XiaoQiang:/tmp# scp root@10.43.173.204:/root/router/uboot_md5-b7a74e9668289dd68f1c637cd99dcc5c.bin uboot.bin
/usr/bin/dbclient: Warning: failed creating /root/.ssh: Read-only file system
Host ‘10.43.173.204’ is not in the trusted hosts file.
(fingerprint md5 69:8a:26:44:e2:5a:91:16:36:02:da:05:40:75:a9:5d)
Do you want to continue connecting? (y/n) yes
root@10.43.173.204’s password:
uboot_md5-b7a74e9668289dd68f1c637cd99dcc5c.bin 100% 91KB 91.2KB/s 00:00
root@XiaoQiang:/tmp# ls
4005.bootcheck.log hosts network.env state
DataBase http_info nginx_check.log sysapihttpd
TZ lock oui sysapihttpdconf
arrays locks rc.done sysinfo
authenfailed-cache log rc.timing syslog-ng.ctl
cache logexec resolv.conf syslog-ng.pid
daemon luci-indexcache resolv.conf.auto taskmonitor
datalist luci-modulecache resolv.conf.dummy thunder
dhcp.eth0.2.after_bound.log luci-nonce rr uboot.bin
dhcp.eth0.2.befor_bound.log luci-sessions run uci2dat_mt7612.log
dhcp.leases messages spool uci2dat_mt7620.log
dropbear mi_ip_conflict_pid startscene_crontab.lua.PID uploadfiles
etc mihttpd stat_points_privacy.log web_config_list
etm.log mnt stat_points_rom.log web_filter_list
fstab mt76xx.sh.log stat_points_web.log wifi_analysis.log
root@XiaoQiang:/tmp# cd
root@XiaoQiang:~# nvram set boot_wait=on
root@XiaoQiang:~# nvram set uart_en=1
root@XiaoQiang:~# nvram commit
root@XiaoQiang:~# mtd write /tmp/uboot.bin Bootloader
Unlocking Bootloader …
Writing from /tmp/uboot.bin to Bootloader …
root@XiaoQiang:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 25.9M 25.6M 252.0K 99% /
none 60.4M 0 60.4M 0% /dev
tmpfs 60.9M 3.7M 57.1M 6% /tmp
ubi0_0 25.9M 25.6M 252.0K 99% /
tmpfs 60.9M 3.7M 57.1M 6% /tmp
tmpfs 60.9M 3.7M 57.1M 6% /extdisks
ubi1_0 45.4M 6.1M 36.9M 14% /data
ubi1_0 45.4M 6.1M 36.9M 14% /userdisk
ubi0_0 25.9M 25.6M 252.0K 99% /userdisk/data
ubi1_0 45.4M 6.1M 36.9M 14% /etc
/dev/sda 28.6G 275.0M 28.4G 1% /extdisks/sda
root@XiaoQiang:~# scp root@10.43.173.204:/root/router/MI-R3G_3.4.3.9-099.trx ./ MI-R3G_3.4.3.9-099.trx
root@XiaoQiang:~# scp root@10.43.173.204:/root/router/MI-R3G_3.4.3.9-099.trx ./MI-R3G_3.4.3.9-099.trx
/usr/bin/dbclient: Warning: failed creating /root/.ssh: Read-only file system
Host ‘10.43.173.204’ is not in the trusted hosts file.
(fingerprint md5 69:8a:26:44:e2:5a:91:16:36:02:da:05:40:75:a9:5d)
Do you want to continue connecting? (y/n) yes
root@10.43.173.204’s password:
./MI-R3G_3.4.3.9-099.trx: Read-only file system
root@XiaoQiang:~# cd /tmp/
root@XiaoQiang:/tmp# scp root@10.43.173.204:/root/router/MI-R3G_3.4.3.9-099.trx ./MI-R3G_3.4.3.9-099.trx
/usr/bin/dbclient: Warning: failed creating /root/.ssh: Read-only file system
Host ‘10.43.173.204’ is not in the trusted hosts file.
(fingerprint md5 69:8a:26:44:e2:5a:91:16:36:02:da:05:40:75:a9:5d)
Do you want to continue connecting? (y/n) y
root@10.43.173.204’s password:
MI-R3G_3.4.3.9-099.trx 100% 14MB 1.4MB/s 00:10
root@XiaoQiang:/tmp# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 25.9M 25.6M 252.0K 99% /
none 60.4M 0 60.4M 0% /dev
tmpfs 60.9M 17.9M 43.0M 29% /tmp
ubi0_0 25.9M 25.6M 252.0K 99% /
tmpfs 60.9M 17.9M 43.0M 29% /tmp
tmpfs 60.9M 17.9M 43.0M 29% /extdisks
ubi1_0 45.4M 6.1M 36.9M 14% /data
ubi1_0 45.4M 6.1M 36.9M 14% /userdisk
ubi0_0 25.9M 25.6M 252.0K 99% /userdisk/data
ubi1_0 45.4M 6.1M 36.9M 14% /etc
/dev/sda 28.6G 275.0M 28.4G 1% /extdisks/sda
root@XiaoQiang:/tmp# reboot
root@XiaoQiang:/tmp# cd
root@XiaoQiang:~# shutdown -r
-ash: shutdown: not found
root@XiaoQiang:~# reboot
Connection closed by foreign host.
Disconnected from remote host(新建会话 (22)) at 15:32:05.
Type help' to learn how to use Xshell prompt. [d:\~]$ ssh 192.168.31.1 Connecting to 192.168.31.1:22... Connection established. To escape to local shell, press 'Ctrl+Alt+]'. Connection closed by foreign host. Disconnected from remote host(192.168.31.1:22) at 15:34:29. Typehelp’ to learn how to use Xshell prompt.
[d:~]$
Connecting to 192.168.31.1:22…
Connection established.
To escape to local shell, press ‘Ctrl+Alt+]’.
sh: /usr/bin/X11/xauth: not found
BusyBox v1.19.4 (2016-04-15 17:38:14 CST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.


Welcome to XiaoQiang!

root@XiaoQiang:~# cd /tmp/
root@XiaoQiang:/tmp# dir
-ash: dir: not found
root@XiaoQiang:/tmp# ls
4781.bootcheck.log http_info nginx_check.log sysapihttpd
TZ lock oui sysapihttpdconf
arrays locks rc.done sysinfo
cache log rc.timing syslog-ng.ctl
daemon logexec resolv.conf syslog-ng.pid
datalist luci-indexcache resolv.conf.auto taskmonitor
dhcp.eth0.2.after_bound.log luci-modulecache rr thunder
dhcp.eth0.2.befor_bound.log messages run uci2dat_mt7612.log
dhcp.leases mi_ip_conflict_pid spool uci2dat_mt7620.log
etc mihttpd startscene_crontab.lua.PID uploadfiles
etm.log mnt stat_points_privacy.log web_config_list
fstab mt76xx.sh.log stat_points_rom.log web_filter_list
hosts network.env state wifi_analysis.log
root@XiaoQiang:/tmp# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 25.9M 25.6M 252.0K 99% /
none 60.4M 0 60.4M 0% /dev
tmpfs 60.9M 3.0M 57.8M 5% /tmp
ubi0_0 25.9M 25.6M 252.0K 99% /
tmpfs 60.9M 3.0M 57.8M 5% /tmp
tmpfs 60.9M 3.0M 57.8M 5% /extdisks
ubi1_0 45.4M 6.1M 36.9M 14% /data
ubi1_0 45.4M 6.1M 36.9M 14% /userdisk
ubi0_0 25.9M 25.6M 252.0K 99% /userdisk/data
ubi1_0 45.4M 6.1M 36.9M 14% /etc
/dev/sda 28.6G 275.0M 28.4G 1% /extdisks/sda
root@XiaoQiang:/tmp# scp root@10.43.173.204:/root/router/uboot_md5-b7a74e9668289dd68f1c637cd99dcc5c.bin ./uboot.bin
/usr/bin/dbclient: Warning: failed creating /root/.ssh: Read-only file system
Host ‘10.43.173.204’ is not in the trusted hosts file.
(fingerprint md5 69:8a:26:44:e2:5a:91:16:36:02:da:05:40:75:a9:5d)
Do you want to continue connecting? (y/n) y
root@10.43.173.204’s password:
uboot_md5-b7a74e9668289dd68f1c637cd99dcc5c.bin 100% 91KB 91.2KB/s 00:00
root@XiaoQiang:/tmp# nvram set boot_wait=on
root@XiaoQiang:/tmp# nvram set uart_en=1
root@XiaoQiang:/tmp# nvram commit
root@XiaoQiang:/tmp# mtd write /tmp/uboot.bin Bootloader
Unlocking Bootloader …
Writing from /tmp/uboot.bin to Bootloader …
root@XiaoQiang:/tmp# scp root@10.43.173.204:/root/router/MI-R3G_3.4.3.9-099.trx ./MI-R3G_3.4.3.9-099.trx
/usr/bin/dbclient: Warning: failed creating /root/.ssh: Read-only file system
Host ‘10.43.173.204’ is not in the trusted hosts file.
(fingerprint md5 69:8a:26:44:e2:5a:91:16:36:02:da:05:40:75:a9:5d)
Do you want to continue connecting? (y/n) y
root@10.43.173.204’s password:
MI-R3G_3.4.3.9-099.trx 100% 14MB 1.6MB/s 00:09
root@XiaoQiang:/tmp# ls
4781.bootcheck.log http_info oui sysinfo
MI-R3G_3.4.3.9-099.trx lock rc.done syslog-ng.ctl
TZ locks rc.timing syslog-ng.pid
arrays log resolv.conf taskmonitor
cache logexec resolv.conf.auto thunder
daemon luci-indexcache rr uboot.bin
datalist luci-modulecache run uci2dat_mt7612.log
dhcp.eth0.2.after_bound.log messages spool uci2dat_mt7620.log
dhcp.eth0.2.befor_bound.log mi_ip_conflict_pid startscene_crontab.lua.PID uploadfiles
dhcp.leases mihttpd stat_points_privacy.log web_config_list
etc mnt stat_points_rom.log web_filter_list
etm.log mt76xx.sh.log state wifi_analysis.log
fstab network.env sysapihttpd
hosts nginx_check.log sysapihttpdconf
root@XiaoQiang:/tmp# ls
4781.bootcheck.log http_info oui sysinfo
MI-R3G_3.4.3.9-099.trx lock rc.done syslog-ng.ctl
TZ locks rc.timing syslog-ng.pid
arrays log resolv.conf taskmonitor
cache logexec resolv.conf.auto thunder
daemon luci-indexcache rr uboot.bin
datalist luci-modulecache run uci2dat_mt7612.log
dhcp.eth0.2.after_bound.log messages spool uci2dat_mt7620.log
dhcp.eth0.2.befor_bound.log mi_ip_conflict_pid startscene_crontab.lua.PID uploadfiles
dhcp.leases mihttpd stat_points_privacy.log web_config_list
etc mnt stat_points_rom.log web_filter_list
etm.log mt76xx.sh.log state wifi_analysis.log
fstab network.env sysapihttpd
hosts nginx_check.log sysapihttpdconf
root@XiaoQiang:/tmp# uname -a
Linux XiaoQiang 2.6.36 #1 Fri Apr 15 17:59:34 CST 2016 mips GNU/Linux
root@XiaoQiang:/tmp# cat /proc/sys
sys/ sysvipc/
root@XiaoQiang:/tmp# cat /proc/sys/
debug/ dev/ fs/ ifb_debug/ kernel/ net/ vm/
root@XiaoQiang:/tmp# cat /proc/sys/
debug/ dev/ fs/ ifb_debug/ kernel/ net/ vm/
root@XiaoQiang:/tmp# cat /proc/
1/ 27/ 43/ 6711/ 7916/ filesystems mt7620/
10/ 2788/ 4395/ 6722/ 7954/ flowmark mtd
10981/ 28/ 4396/ 69/ 7971/ flowmark_app net/
11/ 2864/ 4445/ 7/ 8/ flowmark_mark pagetypeinfo
12/ 2876/ 4446/ 70/ 8066/ fs/ partitions
13/ 29/ 4536/ 7014/ 8169/ http_conn/ scsi/
14/ 3/ 4581/ 7015/ 83/ http_dpi/ self/
15/ 30/ 4739/ 705/ 9/ http_timeout/ show_stack
152/ 31/ 5/ 7072/ 9139/ interrupts slabinfo
154/ 32/ 500/ 7104/ 9154/ iomem softirqs
178/ 33/ 507/ 7198/ 9795/ ioports stat
1816/ 34/ 5070/ 7248/ 9798/ ipaccount/ sys/
1817/ 346/ 5129/ 7354/ 9807/ irq/ sysvipc/
190/ 35/ 5205/ 7498/ 9820/ kallsyms timer_list
2/ 3545/ 5213/ 7567/ buddyinfo kcore tty/
202/ 3547/ 5214/ 7703/ bus/ kmsg uptime
203/ 36/ 5330/ 776/ cgroups kpagecount version
22/ 3647/ 5483/ 779/ cmdline kpageflags vmallocinfo
23/ 3656/ 5546/ 780/ cpuinfo loadavg vmstat
24/ 3887/ 5618/ 7889/ crypto locks xiaoqiang/
25/ 3897/ 5882/ 7911/ devices meminfo xqfp/
26/ 391/ 6/ 7912/ diskstats misc zoneinfo
2683/ 4/ 600/ 7913/ driver/ modules
2690/ 4257/ 6174/ 7914/ execdomains mounts
root@XiaoQiang:/tmp# cat /proc/cpuinfo
system type : Ralink SoC
processor : 0
cpu model : MIPS 24Kc V5.0
BogoMIPS : 385.84
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
ASEs implemented : mips16 dsp
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available
root@XiaoQiang:/tmp# dir
-ash: dir: not found
root@XiaoQiang:/tmp# ls
4781.bootcheck.log http_info oui sysinfo
MI-R3G_3.4.3.9-099.trx lock rc.done syslog-ng.ctl
TZ locks rc.timing syslog-ng.pid
arrays log resolv.conf taskmonitor
cache logexec resolv.conf.auto thunder
daemon luci-indexcache rr uboot.bin
datalist luci-modulecache run uci2dat_mt7612.log
dhcp.eth0.2.after_bound.log messages spool uci2dat_mt7620.log
dhcp.eth0.2.befor_bound.log mi_ip_conflict_pid startscene_crontab.lua.PID uploadfiles
dhcp.leases mihttpd stat_points_privacy.log web_config_list
etc mnt stat_points_rom.log web_filter_list
etm.log mt76xx.sh.log state wifi_analysis.log
fstab network.env sysapihttpd
hosts nginx_check.log sysapihttpdconf
root@XiaoQiang:/tmp# dd if=MI-R3G_3.4.3.9-099.trx bs=4194304 count=1 2> /dev/null | dd of=MI-R3G_3.4.3.9-099.trx.part1
2> /dev/null
root@XiaoQiang:/tmp# mtd write MI-R3G_3.4.3.9-099.trx.part1 kernel1
Unlocking kernel1 …
Writing from MI-R3G_3.4.3.9-099.trx.part1 to kernel1 …
root@XiaoQiang:/tmp# dd if=MI-R3G_3.4.3.9-099.trx bs=4194304 skip=1 2> /dev/null | dd of=MI-R3G_3.4.3.9-099.trx.part2
2> /dev/null
root@XiaoQiang:/tmp# mtd write MI-R3G_3.4.3.9-099.trx.part2 rootfs0
Unlocking rootfs0 …
Writing from MI-R3G_3.4.3.9-099.trx.part2 to rootfs0 …
root@XiaoQiang:/tmp# nvram set flag_last_success=1
root@XiaoQiang:/tmp# nvram commit
root@XiaoQiang:/tmp# cd
root@XiaoQiang:~# reboot
root@XiaoQiang:~#
Connection closed by foreign host.
Disconnected from remote host(新建会话 (22)) at 15:42:38.*

展开阅读全文

没有更多推荐了,返回首页