開機後觀察檔案系統
admin@RT-N66U:/tmp/home/root# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 26.1M 26.1M 0 100% /
tmpfs 117.1M 700.0K 116.4M 1% /tmp
devfs 117.1M 0 117.1M 0% /dev
/dev/mtdblock4 1.0M 444.0K 580.0K 43% /jffs
根目錄滿了,而/jffs剩下空間只有580K,小於iperf的1.3M因此也不能夠用...
但是掛載/dev/mtdblock4給了很好的暗示,代表應該有其他比較大的空間,觀察一下/proc
admin@RT-N66U:/# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "pmon"
mtd1: 01fa0000 00020000 "linux"
mtd2: 01a31aec 00020000 "rootfs"
mtd3: 00020000 00020000 "nvram"
mtd4: 00100000 00020000 "jffs2"
馬上就知道應該會有mtdblock0,1,2,3,4五個空間,
mtd1 是系統,mtd2應該一開始開機要的root filesystem,mtd3存放nvram(也就是所有的設定)的資料,mtd4就是放置jffs用來放置syslog。
觀察一下每個空間大小
admin@RT-N66U:/# fdisk -l /dev/mtdblock0 /dev/mtdblock1 /dev/mtdblock2 /dev/mtdblock3 /dev/mtdblock4
Disk /dev/mtdblock0: 0 MB, 262144 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock1: 33 MB, 33161216 bytes
255 heads, 63 sectors/track, 4 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock2: 27 MB, 27466240 bytes
255 heads, 63 sectors/track, 3 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock3: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock4: 1 MB, 1048576 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
admin@RT-N66U:/jffs# mount /dev/mtdblock2 /jffs/mtdblock2
admin@RT-N66U:/jffs# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 26.1M 26.1M 0 100% /
tmpfs 117.1M 824.0K 116.3M 1% /tmp
devfs 117.1M 0 117.1M 0% /dev
/dev/mtdblock4 1.0M 444.0K 580.0K 43% /jffs
/dev/mtdblock1 31.6M 1.1M 30.6M 3% /jffs/mtdblock1
/dev/mtdblock2 26.1M 26.1M 0 100% /jffs/mtdblock2
把每個空間都掛起來,mtd2放的就是系統,而且是滿的放不了東西。
mtd1的內容則跟mtd4一樣,因此猜測開機後會把mtd1裡面的東西複製到mtd4上面。
因此我最後做的事情就是把iperf執行檔放到mtd4上面去,重新開機... 然後就被~搞~死~了~~~
原本不想要刷機,想說用原廠的韌體稍微加點東西就好,沒想到最後還是被弄壞
目前無法開機的原因不明,用factory reset也無法回復,看起來還是必須要拿去修
附錄:Asus RT-N66U正常目錄下面的檔案
admin@RT-N66U:/tmp/home/root# ls /
asus_jffs dev lib proc sys var
bin etc mmc rom sysroot www
cifs1 home mnt root tmp
cifs2 jffs opt sbin usr
admin@RT-N66U:/tmp/home/root# ls /tmp
dhcp6c notify syslog.log
etc ppp syslog.log-1
filter.default pptp_connected udhcpc
filter_ipv6.default pptpd upnpc_xml.log
filter_rules redirect_rules upnpicon
home resolv.conf usb.log
miniupnpc.log resolv.dnsmasq var
mnt settings webs_upgrade.log
nat_rules share wpa_cli
nat_rules_eth0_eth0 smb.log zcip
admin@RT-N66U:/tmp/home/root# ls /dev
1-1 mtd1ro null ptyp5 root ttyp3 ttypf
1-1.4 mtd2 nvram ptyp6 sda ttyp4 urandom
console mtd2ro port ptyp7 sg0 ttyp5 usb1
full mtd3 ppp ptyp8 shm ttyp6 usb2
gpio mtd3ro printers ptyp9 tty ttyp7 usbdev1.1
kmem mtd4 ptmx ptypa ttyS0 ttyp8 usbdev1.2
kmsg mtd4ro pts ptypb ttyS1 ttyp9 usbdev1.3
log mtdblock0 ptyp0 ptypc ttyS2 ttypa usbdev2.1
mem mtdblock1 ptyp1 ptypd ttyS3 ttypb zero
mtd0 mtdblock2 ptyp2 ptype ttyp0 ttypc
mtd0ro mtdblock3 ptyp3 ptypf ttyp1 ttypd
mtd1 mtdblock4 ptyp4 random ttyp2 ttype
admin@RT-N66U:/tmp/home/root# ls /jffs
syslog.log syslog.log-1 usericon
2015-12-20 更新
還好N66U沒有那麼容易變磚。1. 先按住WPS,然後再打開電源,機器會重新跑到一個最初始的狀態。
2. 連線到http://192.168.1.1 就會是AsusTek - CFE miniWeb Server,在這邊把原廠的firmware給上傳
3. 重開機後等約十分鐘,就回復到最初始的狀態
沒有留言:
張貼留言