Squeeze のインストール(22)LS-CL で再々々確認

Debian LS-CL

続いて、LS-CL 1.11 で確認する。もういい加減にしたひ

準備(それ以外 の場合)

標準ファームに root でログインできるようにします

済み

標準ファームで起動

ハックキットのファイルを置きます

エクスプローラで share/hackkit に hackkit_squeeze_110103.tar.gz と hackkit_squeeze_110110.sh とを置く。
mkimage は以前に置いたものがある。

ログイン

シリアルコンソールがあるが、telnet してログイン
BUFFALO INC. LinkStation series

LS-CL701 login: root
No mail.
root@LS-CL701:~# cd /mnt/disk1/share/hackkit/
root@LS-CL701:/mnt/disk1/share/hackkit# ls
hackkit_config                 hackkit_squeeze_110110.sh
hackkit_config.sample          mkimage
hackkit_squeeze_110103.tar.gz
root@LS-CL701:/mnt/disk1/share/hackkit#

時計を合わせる

root@LS-CL701:/mnt/disk1/share/hackkit# date
Wed Jan 12 18:54:50 JST 2011
root@LS-CL701:/mnt/disk1/share/hackkit#
あってる

インストールする HDD の準備

先日インストールに使った HDD を使うので、パーティションは設定済

(1) ハックキットをインストールする HDD を USB で接続します。

root@LS-CL701:/mnt/disk1/share/hackkit# cd
root@LS-CL701:~# tail -f /var/log/messages
	:
	:
Jan 12 18:58:19 LS-CL701 kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2
Jan 12 18:58:19 LS-CL701 kernel: usb 1-1: configuration #1 chosen from 1 choice
Jan 12 18:58:19 LS-CL701 kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jan 12 18:58:24 LS-CL701 kernel: scsi 2:0:0:0: Direct-Access     WDC WD50  WD-WCASY2179139 3B01 PQ: 0 ANSI: 2 CCS
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB)
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Jan 12 18:58:25 LS-CL701 kernel:  sdb: sdb1 sdb2 sdb3 sdb4
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Jan 12 18:58:25 LS-CL701 kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 12 18:58:29 LS-CL701 kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Jan 12 18:58:29 LS-CL701 kernel: kjournald starting.  Commit interval 5 seconds
Jan 12 18:58:29 LS-CL701 kernel: EXT3 FS on sdb1, internal journal
Jan 12 18:58:29 LS-CL701 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan 12 18:58:35 LS-CL701 kernel: NET: Registered protocol family 5
Jan 12 18:58:39 LS-CL701 nmbd[1266]: [2011/01/12 18:58:39, 0] nmbd/nmbd.c:terminate(58)
Jan 12 18:58:39 LS-CL701 nmbd[1266]:   Got SIGTERM: going down...

(2) /mnt/usbdisk1 に自動的にマウントされた場合はアンマウントします。

root@LS-CL701:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/sda2              4993984    381820   4612164   8% /
/dev/ram1                15360       112     15248   1% /mnt/ram
/dev/sda1               996052    172568    823484  17% /boot
/dev/disk1_6         304565696    346500 304219196   0% /mnt/disk1
/dev/usbdisk1_1         241116     15147    213521   7% /mnt/usbdisk1
root@LS-CL701:~# umount /mnt/usbdisk1/
root@LS-CL701:~#

(3) sdb にパーティションを切ります。

root@LS-CL701:~# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1               1          31      248976  83 Linux
/dev/sdb2              32         281     2008125  83 Linux
/dev/sdb3             282         313      257040  82 Linux swap
/dev/sdb4             314       60801   485869860  83 Linux
root@LS-CL701:~#
設定済

インストール

カスタマイズ

hackkit_config が置いてある。
root@LS-CL701:~# cd /mnt/disk1/share/hackkit/
root@LS-CL701:/mnt/disk1/share/hackkit# cat hackkit_config
ADDRESS=192.168.2.47
HOSTNAME=tate
root@LS-CL701:/mnt/disk1/share/hackkit#

インストーラの実行

root@LS-CL701:/mnt/disk1/share/hackkit# sh hackkit_squeeze_110110.sh
PRODUCTID = 0x0000000F
MACHINE LSCL
formating hard drive ...
mke2fs 1.40.5 (27-Jan-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
62248 inodes, 248976 blocks
12448 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
31 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
meta-data=/dev/sdb2              isize=256    agcount=8, agsize=62753 blks
         =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=502024, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0
Setting up swapspace version 1, size = 263204864 bytes
meta-data=/dev/sdb4              isize=256    agcount=16, agsize=7591716 blks
         =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=121467456, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=32768, version=1
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0
	:
	:
lib/modules/2.6.22.7/modules.inputmap
lib/modules/2.6.22.7/modules.dep.bin
lib/modules/2.6.22.7/modules.symbols.bin
lib/modules/2.6.22.7/modules.pcimap
lib/modules/2.6.22.7/modules.isapnpmap
creating usb ...
update-rc.d: using dependency based boot sequencing
checking /dev/sdb1
fsck 1.40.5 (27-Jan-2008)
e2fsck 1.40.5 (27-Jan-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 11/62248 files (9.1% non-contiguous), 14036/248976 blocks
mounting /boot ...
copying /boot ...
initrd.buffalo
uImage.buffalo
editing initrd ...
110523+1 records in
110523+1 records out
gunziping /mnt/debinst/boot/initrd.gz ...
gziping /mnt/debinst/boot/initrd ... wait 5 minutes
Image Name:   initrd
Created:      Wed Jan 12 19:06:44 2011
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    7038028 Bytes = 6873.07 kB = 6.71 MB
Load Address: 0x00000000
Entry Point:  0x00000000
unmount /boot ...
root@LS-CL701:/mnt/disk1/share/hackkit#

電源 OFF

ハックキットで起動

HDD の交換(LS-WSGL, LS-QL 以外)

起動

シリアルコンソールをつないだ
---- in hackkit linuxrc ---
XFS mounting filesystem sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 120K
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
udev requires a kernel >= 2.6.26, not started. ... failed!
 failed!
Activating swap...Adding 257032k swap on /dev/sda3.  Priority:-1 extents:1 across:257032k
done.
Cleaning up ifupdown....
Setting up networking....
Loading kernel modules...done.
Activating lvm and md swap...done.
Checking file systems...fsck from util-linux-ng 2.17.2
/dev/sda1: clean, 13/62248 files, 23019/248976 blocks
/sbin/fsck.xfs: XFS file system.
done.
Mounting local filesystems...kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda4
done.
Activating swapfile swap...done.
Cleaning up temporary files....
Configuring network interfaces...eth reg(9) val=0x0300
eth0: link down
done.
Cleaning up temporary files....
Setting kernel variables ...done.
startpar: service(s) returned failure: udev ... failed!
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_marvell ehci_marvell.4523: Marvell Orion EHCI
ehci_marvell ehci_marvell.4523: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.4523: irq 17, io base 0xf1050100
ehci_marvell ehci_marvell.4523: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_marvell ehci_marvell.167817: Marvell Orion EHCI
ehci_marvell ehci_marvell.167817: new USB bus registered, assigned bus number 2
ehci_marvell ehci_marvell.167817: irq 12, io base 0xf10a0100
ehci_marvell ehci_marvell.167817: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Starting enhanced syslogd: rsyslogd.
Starting internet superserver: inetd.
Starting periodic command scheduler: cron.
eth0: link up, full duplex, speed 1 Gbps

Debian GNU/Linux squeeze/sid tate ttyS0

tate login:

動作確認

LED の確認

LED が点灯

ログイン

Debian GNU/Linux squeeze/sid tate ttyS0

tate login: guest
Password:
Linux tate 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl

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@tate:/$

root になる

guest@tate:/$ su - root
Password:
root@tate:~#

時計を合わせる

手順には追加した方が良さそう。。。
root@tate:~# date
Thu Jan  1 09:01:42 JST 1970
root@tate:~# date 011219102011
Wed Jan 12 19:10:00 JST 2011
root@tate:~#

ファン制御スクリプトの確認

root@tate:~# cat /usr/local/sbin/fancontrol
#!/bin/sh
# 3G LinkStation Fancontrol script.
# (C) Copyright Yasunari YAMASHITA 2007-2011. All Rights Reserved.

get_curtemp()
{
        #       # smartctl -A -d marvell /dev/sda
        #       194 Temperature_Celsius     0x0022   116   079   000    Old_age   Always       -       31
        #       194 Temperature_Celsius     0x0022   181   163   000    Old_age   Always       -       19 (Lifetime Min/Max 17/25)

        CURTEMP=`smartctl -A -d marvell /dev/sda -s on  | grep '^194 ' | awk '{print $10}'`
}
set_fan_speed()
{
        echo $FANSPEED > /proc/buffalo/gpio/fan/control
        echo fan_set_speed $FANSPEED
}

PATH=$PATH:/usr/sbin

# stop -> LOW |- slow -> MID |- fast -> HIGH |- full
HIGH=45
MID=40
LOW=30

if [ -f /etc/fancontrol.conf ]
then
        . /etc/fancontrol.conf
fi

get_curtemp
echo $CURTEMP

if [ $CURTEMP -gt $HIGH ] # full
then
        FANSPEED=full
        set_fan_speed
elif [ $CURTEMP -gt $MID ] # fast
then
        FANSPEED=fast
        set_fan_speed
elif [ $CURTEMP -gt $LOW ] # slow
then
        FANSPEED=slow
        set_fan_speed
else                       # stop
        FANSPEED=stop
        set_fan_speed
fi
root@tate:~# sh !$
sh /usr/local/sbin/fancontrol
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
22
fan_set_speed slow
root@tate:~#
ん?
何で、LOW の 30 ℃より低いのに、 stop ではなくて、slow ????
また作り直し??

デバッグ。

root@tate:~# sh -x !$
sh -x /usr/local/sbin/fancontrol
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin
+ HIGH=45
+ MID=40
+ LOW=30
+ [ -f /etc/fancontrol.conf ]
+ . /etc/fancontrol.conf
+ HIGH=40
+ MID=30
+ LOW=20
+ get_curtemp
+ smartctl -A -d marvell /dev/sda -s on
+ grep ^194
+ awk {print $10}
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
+ CURTEMP=23
+ echo 23
23
+ [ 23 -gt 40 ]
+ [ 23 -gt 30 ]
+ [ 23 -gt 20 ]
+ FANSPEED=slow
+ set_fan_speed
+ echo slow
+ echo fan_set_speed slow
fan_set_speed slow
root@tate:~#
なるほど。/etc/fancontrol.conf に LOW=20 と書いていたのか、、、
って、インストーラが作ったまま。 スクリプトのデフォルトと設定ファイルのデフォルトとが違うけど、、、
まーえーか。

USB メモリの認識

root@tate:~# tail -f /var/log/messages
Jan 12 19:12:11 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:12:11 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:13:15 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:13:15 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:13:15 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:13:15 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:15:01 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:15:01 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:15:01 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
Jan 12 19:15:01 tate kernel: program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
うるさいなぁ、、、
usb 1-1: new full speed USB device using ehci_marvell and address 2
Jan 12 19:17:35 tate kernel: usb 1-1: new full speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
Jan 12 19:17:35 tate kernel: usbscsi2 : SCSI emulation for USB Mass Storage devices
 1-1: configuration #1 chosen from 1 choice
Jan 12 19:17:35 tate kernel: scsi2 : SCSI emulation for USB Mass Storage devices
scsi 2:0:0:0: Direct-Access     eUSB     Memory Stick     5.06 PQ: 0 ANSI: 2
Jan 12 19:17:41 tate kernel: scsi 2:0:0:0: Direct-Access     eUSB     Memory Stick     5.06 PQ: 0 ANSI: 2
sd 2:0:0:0: [sdb] 126912 512-byte hardware sectors (65 MB)
Jan 12 19:17:42 tate kernel: sd 2:0:0:0: [sdb] 1sd 2:0:0:0: [sdb] Write Protect is off
26912 512-byte hsd 2:0:0:0: [sdb] Assuming drive cache: write through
ardware sectors (65 MB)
Jan 12 19:17:42 tate kernel: sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] 126912 512-byte hardware sectors (65 MB)
Jan 12 19:17:42 tate kernel: sd 2:0:0:0: [sdb] 1sd 2:0:0:0: [sdb] Write Protect is off
26912 512-byte hsd 2:0:0:0: [sdb] Assuming drive cache: write through
ardware sectors  sdb:(65 MB)
Jan 12 19:17:42 tate kernel: sd 2:0:0:0: [sdb] Write Protect is off
 sdb1
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 12 19:17:42 tate kernel: sdb: sdb1
Jan 12 19:17:42 tate kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk
Jan 12 19:17:42 tate kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0

usb 1-1: USB disconnect, address 2
Jan 12 19:17:49 tate kernel: usb 1-1: USB disconnect, address 2

OK

プリンタの認識(LS-GL 以外)

Jan 12 19:18:25 tate kernel: usb 1-1: new high speed USB device using ehci_marvell and address 3
Jan 12 19:18:26 tate kernel: usb 1-1: configuration #1 chosen from 1 choice
Jan 12 19:18:26 tate kernel: drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007

usb 1-1: USB disconnect, address 3
Jan 12 19:18:43 tate kernel: usbdrivers/usb/class/usblp.c: usblp0: removed
 1-1: USB disconnect, address 3
Jan 12 19:18:43 tate kernel: drivers/usb/class/usblp.c: usblp0: removed
OK

リブートの確認

root@tate:~# shutdown -r now

Broadcast message from root@tate (ttyS0) (Wed Jan 12 19:19:14 2011):
	:
	:
eth0: link up, full duplex, speed 1 Gbps

Debian GNU/Linux squeeze/sid tate ttyS0

tate login:

シャットダウンの確認

Debian GNU/Linux squeeze/sid tate ttyS0

INIT: Sending processeUsing makefile-style concurrent boot in runlevel 0.
Stopping internet superserver: inetd.
Asking all remaining processes to terminate...done.
All processes ended within 1 seconds....done.
Stopping enhanced syslogd: rsyslogd.
Saving the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Deconfiguring network interfaces...done.
Cleaning up ifupdown....
Deactivating swap...done.
Unmounting local filesystems...done.
Will now halt.
md: stopping all md devices.
sd 0:0:0:0: [sda] Synchronizing SCSI cache
System halted.
BuffaloChangePowerStatusBeforeHalt > Check power status. MagicKey = 0x3a
Orion1   CPU =  Low

Checking DATA BUS
Checking ADDRESS BUS

> Checking hardware info ...
=== CPU-ID       : 0x00005182 ===
=== Strap status : 0x01000030 ===
=== H/W boardId  :       0x43 ===
=== boardId      :       0x1e ===
=== micon_support:        off ===
> OK.
=== BUFFALO LS-CL/CHL U-Boot. ===
 ** LOADER **
 ** BUFFALO BOARD: BUFFALO_BOARD_LS_CL LE (CFG_ENV_ADDR=fffff000)


U-Boot 1.1.1 (Sep 16 2008 - 14:54:32) Marvell version: 1.12.1 - TINY
Buffalo Version: 1.22-1.00

DRAM CS[0] base 0x00000000   size 128MB
DRAM Total size 128MB
[256kB@fffc0000] Flash: 256 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done

Soc: 88F5182 A2
CPU: ARM926 (Rev 0) running @ 400Mhz
--------------------------- init_board_info(0)
Orion 1 streaming disabled
SysClock = 200Mhz , TClock = 166Mhz


USB 0: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Using 88E1118 phy
buffalo_change_power_status > Read 0x3a
buffalo_IsStopAtUbootStatus > MagicKey=0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Read 0x3a
buffalo_change_power_status > Writing 0x5c

Please Press HDD power button to continue ...
	:	
	:	
OK.

LS-CL
バッファローダイレクト
楽天市場
amazon


Squeeze のインストール(21)LS-QL で再々々確認
ハックの記録
LinkStation/玄箱 をハックしよう

Squeeze のインストール(23)LS-XHL で再々々確認

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