ハックキットのインストール(2)

Debian LS-QVL

ハックキットのインストーラを使って Debian をインストールしてみたが、
・telnet でアクセスできなかった。
・電源SW長押しで電源OFFできなかった。

まずは、telnet でアクセスできなかった件から。

これは、おそらく eth1 問題。
LS-VL につないで、起動のログを見る。

LS-VL に接続

Jun 17 20:58:17 vl kernel: usb 1-1.1: new high speed USB device using ehci_marvell and address 4
Jun 17 20:58:17 vl kernel: usb 1-1.1: configuration #1 chosen from 1 choice
Jun 17 20:58:17 vl kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jun 17 20:58:22 vl kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4
Jun 17 20:58:22 vl kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jun 17 20:58:22 vl kernel: sd 2:0:0:0: [sdb] 488283264 512-byte logical blocks: (250 GB/232 GiB)
Jun 17 20:58:22 vl kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jun 17 20:58:22 vl kernel: sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6
Jun 17 20:58:22 vl kernel: sd 2:0:0:0: [sdb] Attached SCSI disk

マウント

root@vl:~# mdadm --assemble -scan
mdadm: /dev/md/LS-QVL-EMF42:21 has been started with 1 drive (out of 2).
mdadm: /dev/md/LS-QVL-EMF42:10 has been started with 1 drive (out of 4).
mdadm: /dev/md/LS-QVL-EMF42:1 has been started with 1 drive (out of 4).
mdadm: /dev/md/0_0 has been started with 1 drive (out of 4).
root@vl:~# ls -l /dev/md
合計 0
lrwxrwxrwx 1 root root 8 2012年06月17日 20:58 0_0 -> ../md124
lrwxrwxrwx 1 root root 8 2012年06月17日 20:58 LS-QVL-EMF42:1 -> ../md125
lrwxrwxrwx 1 root root 8 2012年06月17日 20:58 LS-QVL-EMF42:10 -> ../md126
lrwxrwxrwx 1 root root 8 2012年06月17日 20:58 LS-QVL-EMF42:21 -> ../md127
root@vl:~# mkdir /tmp/root
root@vl:~# mount /dev/md125 /tmp/root
root@vl:~#

/var/log/dmesg を見る

root@vl:/tmp/root/var/log# less dmesg
Linux version 2.6.31.8 (root@ubuntu) (gcc version 4.2.0 20070413 (prerelease)) #
2 Tue Mar 13 13:10:42 JST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
	:
	:
NIC の初期化をしているところは、、、
	:
	:
Loading Marvell Ethernet Driver:
 o Cached descriptors in DRAM
 o DRAM SW cache-coherency
 o 2 Giga ports supported
 o Single RX Queue support - ETH_DEF_RXQ=0
 o Single TX Queue support - ETH_DEF_TXQ=0
 o Receive checksum offload supported
 o Transmit checksum offload supported
 o Network Fast Processing (Routing) supported - (Disabled)
 o Driver ERROR statistics enabled
 o Driver INFO statistics enabled
 o Proc tool API enabled
 o SKB Reuse supported - (Disabled)
 o SKB Recycle supported - (Disabled)
 o Gateway support enabled
 o Using Marvell Header Mode
 o L2 IGMP support
 o Rx descripors: q0=128
 o Tx descripors: q0=532
 o Loading network interface(s):
 o register under mv88fx_eth platform
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
 o eth0, ifindex = 2, GbE port = 0
Warning: Giga 1 is Powered Off
Warning: Giga 1 is Powered Off
	:
	:
eth0 ではあるようだが、、、
なんと Powered Off

/var/log/messages を見る

気になったのは、
	:
Jun 17 18:26:16 qvl kernel: md1: unknown partition table
	:
	:
Jun 17 18:26:16 qvl kernel: md10: unknown partition table
	:
	:
Jun 17 18:26:16 qvl kernel: md0: unknown partition table
	:
	:
Jun 17 18:26:16 qvl kernel: XFS: bad magic number
Jun 17 18:26:16 qvl kernel: XFS: SB validate failed
なんか、間違っている

そうか、root fs は XFS ではなくて、EXT3 か。。。

fstab を修正する

root@vl:~/log# vi /tmp/root/etc/fstab
root@vl:~/log# cat !$
cat /tmp/root/etc/fstab
/dev/md1 / ext3 defaults,noatime 0 0
proc /proc proc defaults 0 0
/dev/md10 swap swap defaults 0 0
/dev/md0 /boot ext3 defaults,noatime 0 0
#/dev/sda6 /mnt/disk1 xfs defaults,noatime 0 0
root@vl:~/log#
root fs がマウントできなくて、 初期化ができないため、 ネットワークが上がってこない。。。

なんて、甘くはないわな

ログを仕込む

/etc/rc.local にログを仕込む
root@vl:/tmp/root# cat etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/sbin/ifconfig -a>> /root/log
exit 0
root@vl:/tmp/root#

HDD を LS-QVL に戻して再起動

やっぱり、ネットワークは上がってこない

HDD を LS-VL に接続

仕込んだログを見る
root@vl:/tmp/root# cat root/log
eth1 Link encap:Ethernet HWaddr 4c:e6:76:e7:0f:42
 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:532
 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
 Interrupt:11
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)
root@vl:/tmp/root#
やっぱり eth1

/etc/network/interface の修正

eth1 にする
root@vl:/tmp/root# vi etc/network/interfaces
	:
	:
root@vl:/tmp/root# cat !$
cat etc/network/interfaces
######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# See the interfaces(5) manpage for information on what options are
# available.
######################################################################
# We always want the loopback interface.
#
auto lo
iface lo inet loopback
# To use dhcp:
#
# auto eth0
# iface eth0 inet dhcp
# Static IP setup: (broadcast and gateway are optional)
#
auto eth1
iface eth1 inet static
 address 192.168.2.56
 network 192.168.2.0
 netmask 255.255.255.0
 broadcast 192.168.2.255
 gateway 192.168.2.96
root@vl:/tmp/root#

HDD を LS-QVL に戻して再起動

yasunari@qube:~$ telnet qvl
Trying 192.168.2.56...
Connected to qvl.yamasita.jp.
Escape character is '^]'.
Linux 2.6.31.8 (qube.yamasita.jp) (pts/0)
qvl login: guest
Password:
Linux qvl 2.6.31.8 #2 Tue Mar 13 13:10:42 JST 2012 armv5tel
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No directory, logging in with HOME=/
guest@qvl:/$ cat /proc/buffalo/board_info
BoardId=83
BoardName=MVLSQV
guest@qvl:/$
アイゲティット!
ToDo:

にじゅうまる:電源SW長押で電源が落ちるようにする
にじゅうまる: 動作確認
しろまる:X を動かす
しろさんかく:ハックキットに反映する





ハックキットのインストール
ハックの記録
LinkStation/玄箱 をハックしよう
電源SWで電源が落ちるようにする

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市

AltStyle によって変換されたページ (->オリジナル) /