メッセージ欄

分類 【NetBSD】 で検索

一覧で表示する

GW3.5MX2-SLAN/CBのflashを更新する
2008/02/07(木) 24:32 NetBSD はてブ情報 はてブに登録 はてブ数

吸い出したイメージをTFTPで食わせるのをやってみました。

ポイントとしてはNAS側のIPアドレスが192.168.2.71としてTFTPしにくるので、それにあわせて192.168.2.1なTFTPサーバを立ててやりました。
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: Y

1: Download by X-modem
2: Download by TFTP
2
TFTP Server IP Address: 192.168.2.1
Image Path and name(EX. /images/zImage): kernel.img
Waiting to receive file  ....
-
Raw file loaded 0x01000000-0x0117ffff, assumed entry at 0x01000000

Do not power-off this device while flash programming is proceeding!!
Are you sure to program Kernel code (Y/N) ? Y
Erase flash ...
... Erase from 0x70020000-0x701a0000: ........................
OK!
... Program from 0x01000000-0x01180000 at 0x70020000: ........................
OK!
Update FIS ...
... Erase from 0x707f0000-0x70800000: .
... Program from 0x00400000-0x00410000 at 0x707f0000: .
OK!
Upgrade Kernel code successfully!
tart Copy 1572864 bytes from 0x70020000 to 0x1600000

ということで、なんか吸い出したkernelでブートしました。

が、なんか前と違うような。エラーが多発?

OBS266復活
2008/02/03(日) 28:50 NetBSD はてブ情報 はてブに登録 はてブ数

とりあえず、全部NFS上に置くことにしました。

ルートパーティションもswapもなんでもかんでも。

変更したのは本体のflashに書き込まれたkernelだけですね。

これなら、OBS266も安心。

OBS266のHDDがクラッシュ
2008/01/28(月) 27:26 NetBSD はてブ情報 はてブに登録 はてブ数

反応がないのでシリアルにつないでみたけれど、やっぱり反応がなく、やむなく再起動。

で、起動時にHDDから異音とエラーメッセージが。

tftp経由で起動してHDDをマウントするも失敗。

ddでできるだけ吸い出そうとするも失敗。

こりゃ、ご臨終ですね。

まぁ、メールのスプールはNFS越しに置いていたので実害はないけど、復旧するのどうしよう。

もう、手持ちのHDDで空いてるのないかも。
obs266# dd if=/dev/wd0c of=broken.img bs=512 conv=sync,noerror 
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 5 of 0-31 (wd0 bn 5; cn 0 tn 0 sn 5), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 5 of 0-31 (wd0 bn 5; cn 0 tn 0 sn 5)
wd0: (obsolete (address mark not found))
dd: /dev/wd0c: Input/output error
0+0 records in
0+0 records out
0 bytes transferred in 49.294 secs (0 bytes/sec)
dd: /dev/wd0c: Input/output error
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 17 of 0-31 (wd0 bn 17; cn 0 tn 0 sn 17), retrying
wd0: (uncorrectable data error)
wd0c: error reading fsbn 23 of 0-31 (wd0 bn 23; cn 0 tn 0 sn 23)
wd0: (obsolete (address mark not found))
dd: /dev/wd0c: Input/output error
1+0 records in
1+0 records out
512 bytes transferred in 99.663 secs (5 bytes/sec)
dd: /dev/wd0c: Input/output error
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 8 of 0-31 (wd0 bn 8; cn 0 tn 0 sn 8), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 12 of 0-31 (wd0 bn 12; cn 0 tn 0 sn 12)
wd0: (obsolete (address mark not found))
dd: /dev/wd0c: Input/output error
2+0 records in
2+0 records out
1024 bytes transferred in 150.483 secs (6 bytes/sec)
dd: /dev/wd0c: Input/output error
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 29 of 0-31 (wd0 bn 29; cn 0 tn 0 sn 29), retrying
wd0: (obsolete (address mark not found))
wd0c: error reading fsbn 26 of 0-31 (wd0 bn 26; cn 0 tn 0 sn 26)
wd0: (uncorrectable data error)
dd: /dev/wd0c: Input/output error
3+0 records in
3+0 records out
1536 bytes transferred in 202.357 secs (7 bytes/sec)
dd: /dev/wd0c: Input/output error
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 0 of 0-31 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
wd0: (obsolete (address mark not found))
wd0: soft error (corrected)
hptide0:1:0: lost interrupt
        type: ata tc_bcount: 16384 tc_skip: 0
wd0c: error reading fsbn 32 of 32-63 (wd0 bn 32; cn 0 tn 0 sn 32), retrying
wd0: (obsolete (address mark not found))

GW3.5MX2-SLAN/CBのLinuxでコマンド実行
2008/01/15(火) 27:40 NetBSD はてブ情報 はてブに登録 はてブ数

rootはパスワードなしでログインできますね。BusyBoxでがんばってますね。

いろいろコマンドを実行した結果を貼付けておきます。
nas login: root


BusyBox v1.00-rc3 (2007.10.31-02:20+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

nas> cd /
nas> ls
system      volume2     tmp         mnt         home        usr         bin
tmpmnt      volume1     root        lib         dev         sbin        lost+found
sys         var         proc        initrd      etc         linuxrc
nas> ls bin
zcat      umount    sleep     pwd       mount     ln        gzip      echo      cp        cat       busybox
vi        touch     sh        ps        mkdir     kill      gunzip    df        chown     ash
usleep    tar       sed       ping      ls        ip        grep      dd        chmod     adduser
uname     sync      rm        mv        login     hostname  false     date      chgrp     addgroup
nas> ls sbin
hotplug             sfdisk              e2fsck              swapon              insmod
mDNSResponderPosix  losetup             dosfsck             swapoff             init
AVH-IPv4LL          loumount            mkdosfs             route               ifup
brctl               lomount             upnpdevice          rmmod               ifdown
rt61apd             mdadm               klogd               reboot              ifconfig
smtpblast           smartctl            killall5            poweroff            halt
dhcpd               hdparm              udhcpc              mkswap              getty
setsid              mke2fs              syslogd             lsmod               fdisk
nas> ls /usr/bin
ntpdate  time     passwd   expr     cut      bzcat    awk
tty      test     killall  du       crontab  bunzip2  [
nas> ls /usr/sbin
iwconfig  iwpriv    thttpd    telnetd   inetd     crond
nas> uname -a
Linux nas 2.6.10_dev-versatile926ejs #34 Wed Oct 31 10:19:33 CST 2007 armv4tl unknown
nas> mount
usbfs on /proc/bus/usb type usbfs (rw)
nas> ifconfig -a
eth0      Link encap:Ethernet  HWaddr 7A:B4:F5:00:19:35
          inet addr:192.168.100.206  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:60 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1460 (1.4 KiB)  TX bytes:1437 (1.4 KiB)
          Interrupt:1

eth1      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:1

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

nas>
nas> cat /proc/cpuinfo
Processor       : FA52Xid(wb) rev 1 (v4l)
BogoMIPS        : 69.83
Features        : swp half thumb
CPU implementer : 0x66
CPU architecture: 4
CPU variant     : 0x0
CPU part        : 0x526
CPU revision    : 1
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format B
Cache format    : Harvard
I size          : 8192
I assoc         : 2
I line length   : 16
I sets          : 256
D size          : 4096
D assoc         : 2
D line length   : 16
D sets          : 128

Hardware        : Sword sl2312
Revision        : 0000
Serial          : 0000000000000000
nas> cat /proc/meminfo
MemTotal:        61716 kB
MemFree:         31272 kB
Buffers:         16384 kB
Cached:           7572 kB
SwapCached:          0 kB
Active:           5448 kB
Inactive:        20172 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        61716 kB
LowFree:         31272 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           2984 kB
Slab:             3472 kB
CommitLimit:     30856 kB
Committed_AS:     5904 kB
PageTables:        208 kB
VmallocTotal:   188416 kB
VmallocUsed:      8620 kB
VmallocChunk:  4104192 kB
nas>
nas> cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 /dev/vc/0
  4 tty
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 36 netlink
 90 mtd
128 ptm
136 pts
180 usb
204 ttySL

Block devices:
  1 ramdisk
  7 loop
  8 sd
  9 md
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
254 mdp
nas>
nas> cat /proc/modules
rt2561ap 239280 0 - Live 0xbf01b000
uhci_hcd 27280 0 - Live 0xbf013000
ohci_hcd 14760 0 - Live 0xbf00e000
ehci_hcd 24132 0 - Live 0xbf007000
loop 21648 0 - Live 0xbf000000
nas>
nas> cat iomem
00000000-03ffffff : System RAM
  00021000-002718d7 : Kernel text
  00272000-0032fb93 : Kernel data
22000000-2200004f : serial_sl2312
53000000-53000fff : sl2312-ohci
  53000000-53000fff : ohci_hcd
f2400000-f2400038 : irq_handler
nas>
nas> cat mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "RedBoot"
mtd1: 00180000 00010000 "Kernel"
mtd2: 00200000 00010000 "Ramdisk"
mtd3: 00420000 00010000 "Application"
mtd4: 00010000 00010000 "VCTL"
mtd5: 00020000 00010000 "CurConf"
mtd6: 00010000 00010000 "FIS directory"
nas>
nas> ps auxww
  PID  Uid     VmSize Stat Command
    1 root        544 S   init
    2 root            SW< [ksoftirqd/0]
    3 root            SW< [desched/0]
    4 root            SW< [events/0]
    5 root            SW< [khelper]
   10 root            SW< [kthread]
   21 root            SW< [kblockd/0]
   34 root            SW  [khubd]
   75 root            SW  [pdflush]
   76 root            SW  [pdflush]
   78 root            SW< [aio/0]
   77 root            SW  [kswapd0]
  890 root            SW  [eth0]
  912 root       1084 S   /usr/sausalito/sbin/cced
  946 root        620 S   /usr/sbin/inetd
 1086 root        588 S   /sbin/udhcpc -n -s /etc/dhcpcd.script -i eth0
 1135 root        452 S   /usr/sausalito/handlers/base/bonjour/linkChg
 1161 root        652 S   /usr/sbin/crond
 1184 root        752 S   /sbin/syslogd
 1273 root        488 S   /usr/sausalito/sbin/storudp
 1276 root        528 S   /usr/sausalito/handlers/base/power/powermgmt
 1293 root        652 S   /usr/sbin/crond
 1299 root        832 S   /usr/sbin/thttpd -C /etc/thttpd.conf
 1307 root        804 S   -ash
 1367 root        636 R   ps auxww
nas>
nas> ls /etc
localtime      UPnP.xml       resolv.conf    rc             nat4.sh        host.conf      VERSION
dhcpd.conf     sysconfig      rc.usb         ptable         nat2.sh        group_desc     ImageInfo
HOSTNAME       rc.d           rc.start       protocols      nat.sh         group          pam.d
RT2661.bin     shells         rc.network     profile        mtab           ftpusers       syslog.conf
RT2561S.bin    setbridge.sh   rc.curconf     printcap       ld.so.conf     fstab
RT2561.bin     setautoip.sh   rc.conf        pppoe.sh       inetd.conf     exports
rt2561.conf    services       rc.RD.start    passwd         hosts.allow    dhcpcd.script
thttpd.conf    securetty      rc.HD.start    nsswitch.conf  hosts          crontab
nas> cat /etc/inetd.conf
telnet  stream  tcp     nowait  root    /usr/sbin/telnetd       telnetd
nas>
nas> cat /etc/passwd
root::0:0:root:/root:/bin/ash
lp:x:4:7:lp:/var/spool/lpd:/bin/sh
nobody:x:65535:65535:nobody:/nonexist:/bin/sh
guest::65534:65535:Guest:/nonexist:/bin/sh
admin:$1$$CoERg7ynjYLsj2j4glJ34.:500:100:admin: 2:
guest-share:$1$$qRPK7m23GJusamGpoGLby/:501:101:User for guest share:A@:/bin/badsh
nas>
nas> halt
The system is going down NOW !!
Sending SIGTERM to all processes.
nas> udhcpc[1086]: Received SIGTERM
stop wait
Sending SIGKILL to all processes.
The system is halted. Press Reset or turn off power
md: stopping all md devices.
md: md0 switched to read-only mode.
System halted.
arch_power_off

GW3.5MX2-SLAN/CBのRedBoot
2008/01/15(火) 27:06 NetBSD はてブ情報 はてブに登録 はてブ数

ブートローダはRedBootのようですね。メニューを見ると次の八つの機能を持っています。
  1. カーネルの起動 (Start the Kernel Code)
    まぁ普通に起動するってことですね。
  2. イメージのリストを表示 (List Image)
    flashに格納されている複数のイメージをリストで表示します。
  3. イメージの消去 (Delete Image)
    やったことないのですがきっとイメージを消去するのでしょう。
  4. 新規イメージの作成 (Create New Image)
    やったことないですが文字どおりの機能でしょう。
  5. IPアドレスの設定 (Set IP adderss)
    なぜかうまく動きません。
  6. MACアドレスの設定 (Setting MAC address)
    動くっぽいですが必要に迫られていないのでやっていません。
  7. ブートプログラムの更新 (Upgrade Boot)
    まさにこのRedBootを更新するのでしょうから怖くてやってません。
  8. カーネルの更新 (Upgrade Kernel)
    きっとNetBSDのカーネルを与えるために用意されているのでしょう。しかし、更新してしまうと、古いのはなくなっちゃうんでしょうかね。うーむ。
Link Down
Link Up (0000)
Storlink EMAC address = 7ab4f5001935
Ethernet eth0: MAC address 7a:b4:f5:00:19:35&#129;EIP: 192.168.2.71, Default server: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Storlink release, version S000.9018 - built 17:22:11, Jul 15 2005

Platform: Storlink Sword (ARM9)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

Use Internal PCI Clock
Processor: SL3316a3
IDE0 Enable
AHB Bus Clock:116MHz    Ratio:3/2
RAM: 0x00000000-0x04000000, 0x00049250-0x03fef000 available
FLASH: 0x70000000 - 0x70800000, 135 blocks of 0x00010000 bytes each.
==> enter ^C to abort booting within 3 seconds ......
^C
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: 2

Name                   FLASH addr      Mem addr    Datalen     Entry point
BOOT              0x70000000-7001FFFF  0x70000000  0x00020000  0x70000000
FIS directory     0x707F0000-707FFFFF  0x707F0000  0x00001400  0x00000000
Kern              0x70020000-7019FFFF  0x01600000  0x00180000  0x01600000
Ramdisk           0x701A0000-7039FFFF  0x00800000  0x00200000  0x00000000
Application       0x703A0000-707BFFFF  0x00000000  0x00420000  0x00000000
CurConf           0x707D0000-707EFFFF  0x00000000  0x00020000  0x00000000
VCTL              0x707C0000-707CFFFF  0x00000000  0x00010000  0x00000000

                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: 5

ÎþFIS entry missed!
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: 6

entry num 9
MAC1: 7AB4F5001935
MAC2: 7AB4F5000000
MAC1:
MAC2:
Are you sure to modify MAC(Y/N) ? N

Aborted by user!
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: X

1: Download by X-modem
2: Download by TFTP
2
TFTP Server IP Address:
Image Path and name(EX. /images/zImage):
Waiting to receive file  ....
Invalid host: <Not a string: 0x16DEC>
NO Data Received!
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: Y

1: Download by X-modem
2: Download by TFTP

1: Download by X-modem
2: Download by TFTP
2
TFTP Server IP Address:
Image Path and name(EX. /images/zImage):
Waiting to receive file  ....
Invalid host: <Not a string: 0x16DEC>
NO Data Received!
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: ^C

                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: