yasunari@qube:/mnt/disk1/share/hackkit/current$ diff -u hackkit_squeeze_1101{10,12}.sh
--- hackkit_squeeze_110110.sh 2011年01月10日 23:22:58.210876366 +0900
+++ hackkit_squeeze_110112.sh 2011年01月12日 00:26:28.977137792 +0900
@@ -313,9 +313,9 @@
# stop -> LOW |- slow -> MID |- fast -> HIGH |- full
-HIGH=40
-MID=30
-LOW=20
+HIGH=45
+MID=40
+LOW=30
EOF
echo '*/5 * * * * nice /bin/sh /usr/local/sbin/fancontrol 2>/dev/null 1>/dev/null'> var/spool/cron/crontabs/root
yasunari@qube:/mnt/disk1/share/hackkit/current$
これぐらいな差なら、全機種で再テストするほどでもない。
Last login: Sun Dec 26 09:57:11 2010 from x31l.yamasita.jp root@LS-XHL8DF:~#
root@LS-XHL8DF:~# date Wed Jan 12 22:46:10 JST 2011 root@LS-XHL8DF:~#あってる
root@LS-XHL8DF:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4993984 512784 4481200 10% / udev 10240 112 10128 1% /dev /dev/ram1 15360 140 15220 1% /mnt/ram /dev/sda1 996052 208720 787332 21% /boot /dev/disk1_6 187419036 537396 186881640 0% /mnt/disk1 /dev/usbdisk1_1 992036 30944 911096 3% /mnt/usbdisk1 root@LS-XHL8DF:~# umount /mnt/usbdisk1/ root@LS-XHL8DF:~#
root@LS-XHL8DF:~# parted -s /dev/sdb print Model: WDC WD16 WD-WCANM4151553 (scsi) Disk /dev/sdb: 160GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1024MB 1024MB ext3 primary 2 1024MB 6144MB 5120MB xfs primary 3 6144MB 7168MB 1024MB linux-swap primary 4 7168MB 160GB 153GB xfs primary root@LS-XHL8DF:~#
root@LS-XHL8DF:~# cd /mnt/disk1/share/hackkit/ root@LS-XHL8DF:/mnt/disk1/share/hackkit# cat hackkit_config ADDRESS=192.168.2.49 HOSTNAME=brick root@LS-XHL8DF:/mnt/disk1/share/hackkit#
root@LS-XHL8DF:/mnt/disk1/share/hackkit# sh hackkit_squeeze_110112.sh PRODUCTID = 0x00000011 MACHINE LSXHL formating hard drive ... mke2fs 1.40.5 (27-Jan-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 62720 inodes, 249995 blocks 12499 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=260046848 8 block groups 32768 blocks per group, 32768 fragments per group 7840 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 34 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. meta-data=/dev/sdb2 isize=256 agcount=8, agsize=156250 blks = sectsz=512 attr=0 data = bsize=4096 blocks=1250000, 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 = 1023995904 bytes meta-data=/dev/sdb4 isize=256 agcount=16, agsize=2332670 blks = sectsz=512 attr=0 data = bsize=4096 blocks=37322720, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=18223, version=1 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 : : ib/modules/2.6.31.8-svn22059/modules.dep lib/modules/2.6.31.8-svn22059/modules.order lib/modules/2.6.31.8-svn22059/modules.ofmap lib/modules/2.6.31.8-svn22059/modules.symbols lib/modules/2.6.31.8-svn22059/modules.seriomap 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/62720 files (9.1% non-contiguous), 6399/249995 blocks mounting /boot ... copying /boot ... initrd.buffalo uImage.buffalo editing initrd ... 170752+1 records in 170752+1 records out gunziping /mnt/debinst/boot/initrd.gz ... gziping /mnt/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Wed Jan 12 22:49:41 2011 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 10875393 Bytes = 10620.50 kB = 10.37 MB Load Address: 0x00000000 Entry Point: 0x00000000 unmount /boot ... root@LS-XHL8DF:/mnt/disk1/share/hackkit#
Linux 2.6.31.8-svn22059 (x31l.yamasita.jp) (pts/1) brick login: guest Password: Linux brick 2.6.31.8-svn22059 #67 Mon Sep 13 09:42:55 JST 2010 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@brick:/$
guest@brick:/$ su - root Password: root@brick:~#
root@brick:~# date Wed Jan 12 22:55:22 JST 2011 root@brick:~#あってる。
root@brick:~# cat /etc/fancontrol.conf
#
# 3G LinkStation Fancontrol script configuration file
# (C) Copyright Yasunari YAMASHITA 2007-2011. All Rights Reserved.
# stop -> LOW |- slow -> MID |- fast -> HIGH |- full
HIGH=45
MID=40
LOW=30
root@brick:~# 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@brick:~# crontab -l
*/5 * * * * nice /bin/sh /usr/local/sbin/fancontrol 2>/dev/null 1>/dev/null
root@brick:~# sh /usr/local/sbin/fancontrol
22
fan_set_speed stop
root@brick:~#
よさそう。
root@brick:~# tail -f /var/log/messages : : Jan 12 22:56:53 brick kernel: usb 1-1: new full speed USB device using ehci_marvell and address 2 Jan 12 22:56:53 brick kernel: usb 1-1: configuration #1 chosen from 1 choice Jan 12 22:56:53 brick kernel: scsi2 : SCSI emulation for USB Mass Storage devices Jan 12 22:56:59 brick kernel: scsi 2:0:0:0: Direct-Access eUSB Memory Stick 5.06 PQ: 0 ANSI: 2 Jan 12 22:56:59 brick kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Jan 12 22:56:59 brick kernel: sd 2:0:0:0: [sdb] 126912 512-byte logical blocks: (64.9 MB/61.9 MiB) Jan 12 22:56:59 brick kernel: sd 2:0:0:0: [sdb] Write Protect is off Jan 12 22:57:00 brick kernel: sdb: sdb1 Jan 12 22:57:00 brick kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk Jan 12 22:57:09 brick kernel: usb 1-1: USB disconnect, address 2OK
Jan 12 22:57:51 brick kernel: usb 1-1: new high speed USB device using ehci_marvell and address 3 Jan 12 22:57:51 brick kernel: usb 1-1: configuration #1 chosen from 1 choice Jan 12 22:57:51 brick kernel: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0007 Jan 12 22:57:57 brick kernel: usb 1-1: USB disconnect, address 3 Jan 12 22:57:57 brick kernel: usblp0: removedOK
root@brick:~# shutdown -r now : :OK
ようやく Squeeze の動作確認完了。ふ〜