説明例2

いくつかのページを参考にしながらまとめてみました。
呪文の意味がよくわかってないので無駄な部分があるのかもしれません。

  • 用意するもの (Windows環境)
  1. first.html, second.html (下記参照)
  2. PuTTY (telnet/SSHクライアント)
  3. linux.bin
  4. openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
  5. out.hex
  6. HFS (HTTP File Server)
  7. TFTPサーバ
  8. viの操作説明
  • 手順
  1. 有線LANのIPアドレスを
    IP: 169.254.255.2
    Subnet mask: 255.255.255.0
    Gateway: 169.254.255.1
    DNS: 169.254.255.1
    に設定
  2. PCとLa FoneraをLANケーブルで接続
  3. 設定ページでFirmware Version: 0.7.1 r1 かそれ以前であることを確認
    (r2以降の場合は適当なページを参照のこと)
  4. ブラウザからfirst.htmlとsecond.htmlをsubmit
  5. puttyからsshで169.254.255.1にログイン
    user: root / PW: admin
  6. mv /etc/init.d/dropbear /etc/init.d/S50dropbear
  7. vi /etc/firewall.user
  8. 以下の行のコメントを解除
    # iptables -t nat -A prerouting_rule -i $WAN -p tcp -dport 22 -j ACCEPT
    # iptables -A input_rule -i $WAN -p tcp -dport 22 -j ACCEPT
  9. 保存して終了
  10. vi /bin/thinclient
  11. 以下の行をコメントアウト
    . /tmp/.thinclient.sh
  12. 代わりに以下の行を挿入
    cp /tmp/.thinclient.sh /tmp/thinclient-$(date '+%Y%m%d-%H%M')
  13. 保存して終了
  14. HFSを起動して
    openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
    out.hex
    の2つのファイルを送信できるようにする
  15. wget http://169.254.255.2/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
  16. mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
  17. Writing from openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma to vmlinux.bin.l7 ... [w]で2分くらいかかる
  18. reboot
  19. 再起動までに2分ほどかかる
  20. PuTTYでrestart session
  21. user: root / PW: adminでログイン
  22. wget http://169.254.255.2/out.hex
  23. mtd -e "RedBoot config" write out.hex "RedBoot config"
  24. La Foneraの電源を切る
  25. 有線LANのIPアドレスを
    IP: 192.168.1.2
    Subnet mask: 255.255.255.0
    Gateway: 192.168.1.254
    DNS: 192.168.1.254
    に設定
  26. TFTPサーバを起動しlinux.binが入っているフォルダに指定する
  27. La Foneraの電源を入れる
  28. PuTTYから192.168.1.254 9000にtelnet
  29. RedBoot> ip_address -l 192.168.1.254 -h 192.168.1.2
  30. RedBoot> load -r -v -b 0x80041000 linux.bin
  31. RedBoot> fis init
  32. RedBoot> fis create linux
  33. 15分待つ(45分以上かかる場合もあるらしい)
  34. 次の通り入力
    RedBoot> fconfig
    Run script at boot: true
    Boot script:
    .. fis load -l vmlinux.bin.l7
    .. exec
    Enter script, terminate with empty line
    >> fis load -l linux
    >> exec
    >>
    Boot script timeout (1000ms resolution): 10
    Use BOOTP for network configuration: false
    Gateway IP address:
    Local IP address: 192.168.1.254
    Local IP address mask: 255.255.255.0
    Default server IP address:
    Console baud rate: 9600
    GDB connection port: 9000
    Force console for special debug messages: false
    Network debug at boot time: false
    Update RedBoot non-volatile configuration - continue (y/n)? y
    ... Erase from 0xa87e0000-0xa87f0000: .
    ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
  35. RedBoot>reset
  36. PCのIPアドレスの設定を自動取得に戻す
  37. 192.168.1.1
    ID: root / PW:admin

first.html

<html>
<head></head>
<body>
<center>
<form method="post" action="http://169.254.255.1/cgi-bin/webif/connection.sh" enctype="multipart/form-data">
<input name="username" value="$(/usr/sbin/iptables -I INPUT 1 -p tcp -dport 22 -j ACCEPT)" size="68">
<input type="submit" name="submit" value="Submit">
</form>
</center>
</body>
</html>

second.html

<html>
<head></head>
<body>
<center>
<form method="post" action="http://169.254.255.1/cgi-bin/webif/connection.sh" enctype="multipart/form-data">
<input name="username" value="$(/etc/init.d/dropbear)" size="68"><input type="submit" name="submit" value="Submit">
</form>
</center>
</body>
</html>

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-04-02 (金) 23:56:13 (119d)