CPUとHDD温度状況
- 2015/05/10 11:23
- カテゴリー:PC, Cubieboard
稼動10日後、CPUとHDD温度測定状況(週間分)
気温のグラフも欲しいが現状はなし、5月上旬なのに最高気温25℃あたりだった
現在は冷却FANなど可動部品は使っていないので無音である(HDDは止まっているような静かさ)
日々の生活を好き勝手につづったブログ(My blog is written by inoshita.jp)
カテゴリー「PC」の検索結果は以下のとおりです。
稼動10日後、CPUとHDD温度測定状況(週間分)
気温のグラフも欲しいが現状はなし、5月上旬なのに最高気温25℃あたりだった
現在は冷却FANなど可動部品は使っていないので無音である(HDDは止まっているような静かさ)
全部まとめて置きたいので既に記載した分も記録
セットアップは玄箱セットアップ記録とATOM D2700DC サーバ構築記録を参考にして設定
cubie@Cubian:~$ sudo passwd root
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for cubie:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
cubie@Cubian:~$
(略)
この後、sshで別PCから設定するため
# cd /etc/ssh
# cat sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
#Port 36000
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
(以下略)
ここからsshで操作
# echo $TZ
# export TZ=JST-9
# date
Sun Apr 26 19:43:26 JST 2015
# cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
# vi /etc/timezone
(変更)
Asia/Tokyo
#
# apt-get install task-japanese
・・・
# vi /etc/locale.gen
270行目のコメントを削除
ja_JP.UTF-8 UTF-8
# locale-gen
Generating locales (this might take a while)...
en_US.UTF-8... done
ja_JP.UTF-8... done
Generation complete.
# update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja"
# source /etc/default/locale
(確認)
# echo $LANG
ja_JP.UTF-8
# date
2015年 4月 26日 日曜日 20:22:32 JST
#
# free
total used free shared buffers cached
Mem: 828096 219256 608840 0 9952 164480
-/+ buffers/cache: 44824 783272
Swap: 0 0 0
# ls -l /dev/sd*
brw-rw---T 1 root disk 8, 0 4月 26 11:43 /dev/sda
brw-rw---T 1 root disk 8, 1 4月 26 11:43 /dev/sda1
brw-rw---T 1 root disk 8, 2 4月 26 11:43 /dev/sda2
brw-rw---T 1 root disk 8, 3 4月 26 11:43 /dev/sda3
# mkswap /dev/sda2
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=76e4d415-b6f2-473c-a230-fb22e40f4482
# swapon /devb/sda2
# free
total used free shared buffers cached
Mem: 828096 220272 607824 0 9972 164504
-/+ buffers/cache: 45796 782300
Swap: 2097148 0 2097148
# cat /etc/fstab
#<file system> <mount point> <type> <options> <dump> <pass>
/dev/mmcblk0p1 / ext4 defaults 0 1
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
# vi /etc/fstab
(編集)
# cat /etc/fstab
#<file system> <mount point> <type> <options> <dump> <pass>
/dev/sda1 / ext4 defaults 0 1
/dev/sda2 none swap sw 0 0
/dev/sda3 /srv ext4 defaults 0 2
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
#
ソフトウェア情報リストの更新(初期ではapt-getみたい → aptitudeコマンドではないってこと)
# apt-get update
(略)
# apt-get upgrade
パッケージリストを読み込んでいます... 0%パッケージリストを読み込んでいます... 100%パッケージリストを
読み込んでいます... 完了
依存関係ツリーを作成しています... 0% 依存関係ツリーを作成しています... 0%依存関係ツリーを作
成しています... 50%依存関係ツリーを作成しています... 50%依存関係ツリーを作成しています... 92%依存関係
ツリーを作成しています
状態情報を読み取っています... 0%状態情報を読み取っています... 0%状態情報を読み取っています... 完了
以下のパッケージはアップグレードされます:
ajenti apt apt-utils at base-files bash bind9-host ca-certificates cpio dbus
debian-archive-keyring dmsetup dpkg e2fslibs e2fsprogs exim4-base
exim4-config exim4-daemon-light file gnupg gpgv heirloom-mailx initscripts
krb5-locales libapt-inst1.5 libapt-pkg4.12 libbind9-80 libc-bin libc6
libcomerr2 libdbus-1-3 libdevmapper1.02.1 libdns88 libevent-2.0-5 libexpat1
libfreetype6 libgcrypt11 libgnutls26 libgssapi-krb5-2 libisc84 libisccc80
libisccfg82 libjpeg8 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
libldap-2.4-2 liblwres80 libmagic1 libss2 libssl1.0.0 libsystemd-login0
libtasn1-3 libx11-6 libx11-data libxfont1 libxml2 locales mime-support
multiarch-support ntpdate openssh-client openssh-server openssl perl
perl-base perl-modules python python-catcher python-exconsole
python-gevent-socketio python-imaging python-lxml python-minimal
python-reconfigure python-requests python2.7 python2.7-minimal rsyslog ssh
sudo sysv-rc sysvinit sysvinit-utils tzdata udevil unzip wget wpasupplicant
アップグレード: 90 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。
54.3 MB のアーカイブを取得する必要があります。
この操作後に追加で 949 kB のディスク容量が消費されます。
続行しますか [Y/n]? y
(略)
# shutdown -r now
一旦、リスタート
Linux Cubian 3.4.75-sun7i #35 SMP PREEMPT Sat Feb 8 02:10:31 CST 2014 armv7l
______ __ __ .______ __ ___ .__ __.
/ || | | | | _ \ | | / \ | \ | |
| ,----'| | | | | |_) | | | / ^ \ | \| |
| | | | | | | _ < | | / /_\ \ | . ` |
| `----.| `--' | | |_) | | | / _____ \ | |\ |
\______| \______/ |______/ |__| /__/ \__\ |__| \__|
http://cubian.org
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.
Last login:
Sun Apr 26 11:44:02 2015 from 192.168.24.54
$ df
ファイルシス 1K-ブロック 使用 使用可 使用% マウント位置
rootfs 16513960 978784 14696316 7% /
/dev/root 16513960 978784 14696316 7% /
devtmpfs 413924 0 413924 0% /dev
tmpfs 82812 164 82648 1% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 585040 0 585040 0% /run/shm
/dev/sda3 942855404 204512 894756536 1% /mnt
tmpfs 414048 0 414048 0% /tmp
tmpfs 414048 0 414048 0% /var/tmp
$ free
total used free shared buffers cached
Mem: 828096 89784 738312 0 9064 34156
-/+ buffers/cache: 46564 781532
Swap: 2097148 0 2097148
$
aptitudeコマンドが使えるようになっている
# aptitude install linux-headers-3.4.79-sun7i
# aptitude install linux-source-3.4.79-sun7i
# aptitude install p7zip-full
# cd /usr/src
# 7z x -so linux-source-3.4.79-sun7i.tar.7z | tar xf - -C .
# cp ../linux-headers-3.4.79-sun7i/.config .
# cp ../linux-headers-3.4.79-sun7i/Module.symvers .
(未実施)
# aptitude install samba
# vi /etc/samba/smb.conf
(略)
# service samba restart
[....] Stopping Samba daemons: nmbd smbd[ ok .
[....] Starting Samba daemons: nmbd smbd[ ok .
#
高速かつ軽量で高機能なWebサーバという振れ込みで人気の「nginx」(エンジンエックス)にも興味があるが、ひとまず慣れ親しんだapache2を導入
# aptitude install apache2
(略)
玄箱セットアップのとおり、バージョン違いにより設定項目がなくなっている部分があった
HP(http://eaccelerator.net/)ができていたので最新版(1.0になっていた)をダウンロードして、玄箱セットアップのとおり作成して設置した
玄箱セットアップのとおり設定したが起動しない
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
/etc/mysql/my.cnfの変更が問題?ログも出力されないので困った
/var/log/debugというファイルになんか関係しそうなログが出ていたが、
# tail debug
Apr 27 14:07:41 Cubian /etc/init.d/mysql[7829]: 0 processes alive and '/usr/bin/mysqladmin --defaults
-file=/etc/mysql/debian.cnf ping' resulted in
Apr 27 14:07:41 Cubian /etc/init.d/mysql[7829]: #007/usr/bin/mysqladmin: connect to server at 'localh
ost' failed
Apr 27 14:07:41 Cubian /etc/init.d/mysql[7829]: error: 'Can't connect to local MySQL server through s
ocket '/var/run/mysqld/mysqld.sock' (2)'
Apr 27 14:07:41 Cubian /etc/init.d/mysql[7829]: Check that mysqld is running and that the socket: '/v
ar/run/mysqld/mysqld.sock' exists!
Apr 27 14:07:41 Cubian /etc/init.d/mysql[7829]:
時間はEtc/UTCになっている、またログから直接の原因が判らない、/etc/mysql/debian.cnfが怪しそうでググってみる・・・判らなかった
(後に判明)→ my.cnfを修正(ミス?)したせいだった
MySQLの文字コードのデフォルトをutf8にするにはmy.cnfを以下のように編集する(赤字部が間違っていた)
[client]
default-character-set = utf8
[mysqld]
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_general_ci
[mysqldump]
default-character-set = utf8
[mysql]
default-character-set = utf8
suduを使えるユーザは事前に登録が必要(になっていた)
$ sudo aptitude update
[sudo] password for hoge:
hogeは sudoers ファイル内にありません。この事象は記録・報告されます。
$
# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
sudoグループにいればsudoが使えるようなのでusermodで登録
# usermod -G sudo hoge
# grep hoge /etc/group
sudo:x:27:hoge
再ログインしないと不可
# ps -ef
・・・
root 3347 1 0 13:08 tty1 00:00:00 /sbin/getty 38400 tty1
root 3348 1 0 13:08 tty2 00:00:00 /sbin/getty 38400 tty2
root 3349 1 0 13:08 tty3 00:00:00 /sbin/getty 38400 tty3
root 3350 1 0 13:08 tty4 00:00:00 /sbin/getty 38400 tty4
root 3351 1 0 13:08 tty5 00:00:00 /sbin/getty 38400 tty5
root 3352 1 0 13:08 tty6 00:00:00 /sbin/getty 38400 tty6
・・・
# vi /etc/inittab
(編集)必要ないので全部コメントアウト
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
おそらく以下は必要ない
# vi /etc/default/console-setup
(編集)
#ACTIVE_CONSOLES="/dev/tty[1-6]"
#
atdはatコマンドを使わないのであれば必要ない。
# update-rc.d -f atd remove
update-rc.d: using dependency based boot sequencing
#
Debian 6.0から「update-rc.d」ではなく「insserv」を使う作法に変わったのだった
# insserv -h
Usage: insserv [<options>] [init_script|init_directory]
Available options:
-h, --help This help.
-r, --remove Remove the listed scripts from all runlevels.
-f, --force Ignore if a required service is missed.
-v, --verbose Provide information on what is being done.
-p <path>, --path <path> Path to replace /etc/init.d.
-o <path>, --override <path> Path to replace /etc/insserv/overrides.
-c <config>, --config <config> Path to config file.
-n, --dryrun Do not change the system, only talk about it.
-s, --showall Output runlevel and sequence information.
-d, --default Use default runlevels a defined in the scripts
#
# insserv -r atd
# insserv -r avahi-daemon
このコマンド何らメッセージ出力がないので不安である
何とクロック調整可能(サーバで使うべきか?)
温度センサのためのパッケージをセットアップしてみると
hddtemp: OK
lm-sensors: NG
CPU温度を監視したかったのに何故・・・ググってみるとCPU温度は取得できないとのコメントがあったので悲しいことに断念(将来カーネル再構築時に考えよう)
rcの登録
# cp /opt/HotSaNIC/rrdgraph /etc/init.d
# insserv -d rrdgraph
# aptitude install bind9 dnsutils dns-browse
(略)
玄箱にセットアップしたものを全部もってきて上書き
# aptitude install ddclient
(上書き)
再起動後、ボード上の青LEDが点滅状態となる
「青のLEDはネットワーク状態を表示します。このLEDは1秒間隔で点滅する場合は、システムはネットワークに接続されていない状態です。システムがネットワークに接続完了後、このLEDは消灯します。」
とあるが、ネットワークは問題なく接続されている
LEDに関してググってみる(http://linux-sunxi.org/Cubieboard/Programming/StatusLEDs)
rcのどこかでOFFしてるのではないかと思ったが調べるのが面倒なんで強制的にOFFした
# vi /etc/rc.local
# 起動時にLED(緑・青)をOFFにする
echo 0 > /sys/class/leds/green:ph20:led1/brightness
echo 0 > /sys/class/leds/blue:ph21:led2/brightness
It's a good idea to keep the kernel and drivers, firmwares to the latest version.
$ sudo apt-get install cubian-update
$ sudo cubian-update
というのがあったので実行したら
これが・・・
# aptitude install cubian-update
以下の新規パッケージがインストールされます:
cubian-update
更新: 0 個、新規インストール: 1 個、削除: 0 個、保留: 0 個。
8,038 バイトのアーカイブを取得する必要があります。展開後に 0 バイトのディスク 領域が新たに消費されます。
取得: 1 http://packages.cubian.org/ wheezy/main cubian-update all 1.3-7 [8,038 B]
Fetched 8,038 B in 1秒 (7,806 B/s)
以前に未選択のパッケージ cubian-update を選択しています。
(データベースを読み込んでいます ... 現在 49718 個のファイルとディレクトリがイン ストールされています。)
(.../cubian-update_1.3-7_all.deb から) cubian-update を展開しています...
cubian-update (1.3-7) を設定しています ...
# cubian-update
*** Performing self-update
*** Cubian updater v1.3.6 http://cubian.org
*** Downloading Firmware/Updates (this may take a while)
*** Updating firmware
*** Updating kernel
*** Updating modules
*** Depmod 3.4.79-sun7i
*** Updating fs
*** Checking updates from server
*** Your firmware is up to date
#
終了まで随分と掛かり3時間も消費した
システムを安定化する(http://cubieboard.jp/archives/771)というのがあり、関係ないだろうと思っていたが、観るとCPU温度が表示されている
この安定化はシステムのアップデートを行ったので実行されているはずだが、実は/bootはSDカードにあるので対象となる肝心な部分が変更されてなかった
自動化対策は後に行うとして今回は手動で対応
cpuburn-sunxi(CPUが負荷が高い場合にフリーズするかどうかをチェック)というテストプログラム内に、
cat sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
があり1つではあるがCPU温度を取得している(temp2というのは無かった)
hotsanicのセンサに追加してCPU温度取得できるようにした
MySQLをインストールした別PCのDebianからの接続は問題ないのだがWindowsから接続異常となる(未決)
5/1未明から運用開始(一部のソフトは玄箱で運用)
昔のcgiプログラムが動作しないことに気付く(エラー番号500)
解決:/usr/local/bin/perl が無かった
今回は100均で見つけた小物入れをケースにした
物がコンパクトなためケースに困ることはなく逆にどれにしようかと迷う程であったが最終的に選択したのが以下の小物入れである
裏面に記載されてる品質表示によると耐熱が70℃なので少し注意が必要(原料はスチロール樹脂)
UPSに1個、CPUボードとHDDで1個使用して2段に積んで使う
UPSを組み込んだケース画像
CPUボードとHDDを組み込んだケース画像
一番上に蓋が必要で当初はアクリル版を加工しようかと考えていたがもう1個使えば安上がりということで以下のように底だけを切り出した
重ねると以下のようになる
以下の追加対応でケースを加工することになるが、現状はしばらくこのままで運用する
Cubieboard2のOSをセットアップする
参考にしたのはCubieboardコミュニティのCubieboardをはじめよう!などで、推奨されているカスタマイズされたOSがCubain(Cuebieboard+Debian)のためDebian派の管理人にはありがたい
先ずはHDD化するための情報を得ると直接HDDから起動することはできないようで、IPLシーケンスとしては内蔵フラッシュ→SDカードらしい
SDカードの次はHDDになっていれば良いのにと思うがしかたないので、
の選択肢で、2を選ぶことにした
尚、HDDはWD Red 1TB 2.5インチ(WD10JFCX)をチョイスしている(SATA6Gb Intellipower)→ 型番違いで回転数仕様(新旧版?)が異なる
①SDカードにOSセットアップ(SDカードで利用する場合の通り)
「Cubieboardをはじめよう!」のとおりSDカードにダウンロードしたCubianイメージを書き込む
※)使用したSDカードは4GBのmicroSDHCカードである(ここでは単にSDカードと記述する)
②SDカードからCubianを起動しないでUbuntuから操作
# fdisk -l /dev/sdb
ディスク /dev/sdb: 3930 MB, 3930062848 バイト
ヘッド 80, セクタ 31, シリンダ 3095, 合計 7675904 セクタ
Units = セクタ数 of 1 * 512 = 512 バイト
セクタサイズ (論理 / 物理): 512 バイト / 512 バイト
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト
ディスク識別子: 0x00012722
デバイス ブート 始点 終点 ブロック Id システム
/dev/sdb1 2048 1804287 901120 83 Linux
③SDカードをmountしてbootファイルを編集
# mount /dev/sdb1
# cd /mnt/boot
# ls -l
合計 5860
-rw-r--r-- 1 root root 50512 2月 8 2014 script.bin
-rw-r--r-- 1 root root 27737 2月 8 2014 script.fex
-rw-r--r-- 1 root root 158 2月 8 2014 uEnv.txt
-rw-r--r-- 1 root root 5912040 2月 8 2014 uImage
# cat uEnv.txt
console=tty0
root=/dev/mmcblk0p1 rootwait
extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:
1280x800p60 panic=10 consoleblank=0
# vi uEnv.txt
(編集)
root=/dev/mmcblk0p1 rootwait → root=/dev/sda1 rw rootfstype=ext4 rootwait
# cat uEnv.txt
console=tty0
root=/dev/sda1 rw rootfstype=ext4 rootwait
extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:
1280x800p60 panic=10 consoleblank=0
④CubianのrootファイルシステムをHDDへコピーするためSDカードのファイルをtar化しておく
注意)以下の操作はSDカードにスペシャルファイル(/dev/*など)が存在しないから可能
# cd /mnt
# ls -l
合計 92
drwxr-xr-x 2 root root 4096 10月 8 2013 bin
drwxr-xr-x 2 root root 4096 2月 8 2014 boot
drwxr-xr-x 2 root root 4096 6月 4 2013 dev
drwxr-xr-x 78 root root 4096 2月 8 2014 etc
drwxr-xr-x 3 root root 4096 2月 8 2014 home
drwxr-xr-x 12 root root 4096 2月 8 2014 lib
drwx------ 2 root root 16384 2月 8 2014 lost+found
drwxr-xr-x 2 root root 4096 10月 8 2013 media
drwxr-xr-x 2 root root 4096 6月 4 2013 mnt
drwxr-xr-x 2 root root 4096 10月 8 2013 opt
drwxr-xr-x 2 root root 4096 6月 4 2013 proc
drwx------ 2 root root 4096 10月 8 2013 root
drwxr-xr-x 11 root root 4096 2月 8 2014 run
drwxr-xr-x 2 root root 4096 10月 8 2013 sbin
drwxr-xr-x 2 root root 4096 6月 10 2012 selinux
drwxr-xr-x 2 root root 4096 10月 8 2013 srv
drwxr-xr-x 2 root root 4096 2月 8 2013 sys
drwxrwxrwt 5 root root 4096 2月 8 2014 tmp
drwxr-xr-x 10 root root 4096 2月 8 2014 usr
drwxr-xr-x 11 root root 4096 10月 8 2013 var
# tar cf /share/Cubain.tar .
⑤HDDに繋ぎ変えてパーティション作成、ファイルシステムを構築してSDカードから取り出したrootファイルシステム(tar)を展開
# fdisk -l /dev/sdb
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
ヘッド 255, セクタ 63, シリンダ 121601, 合計 1953525168 セクタ
Units = セクタ数 of 1 * 512 = 512 バイト
セクタサイズ (論理 / 物理): 512 バイト / 512 バイト
I/O サイズ (最小 / 推奨): 512 バイト / 512 バイト
ディスク識別子: 0xe0a1befc
デバイス ブート 始点 終点 ブロック Id システム
/dev/sdb1 2048 33556479 16777216 83 Linux
/dev/sdb2 33556480 37750783 2097152 82 Linux スワップ / Solaris
/dev/sdb3 37750784 1953525167 957887192 83 Linux
# mkfs -t ext4 /dev/sdb1
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1048576 inodes, 4194304 blocks
209715 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
128 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/128 done
Writing inode tables: 0/128 done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 0/128126/128 done
# mkfs -t ext4 /dev/sdb3
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
59875328 inodes, 239471798 blocks
11973589 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
7309 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: 0/7309 done
Writing inode tables: 0/7309 done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 0/7309 50/7309 done
# mount /dev/sdb1 /mnt
# cd /mnt
# tar xf /share/Cubain.tar
# ls -l
合計 92
drwxr-xr-x 2 root root 4096 10月 8 2013 bin
drwxr-xr-x 2 root root 4096 2月 8 2014 boot
drwxr-xr-x 2 root root 4096 6月 4 2013 dev
drwxr-xr-x 78 root root 4096 2月 8 2014 etc
drwxr-xr-x 3 root root 4096 2月 8 2014 home
drwxr-xr-x 12 root root 4096 2月 8 2014 lib
drwx------ 2 root root 16384 2月 8 2014 lost+found
drwxr-xr-x 2 root root 4096 10月 8 2013 media
drwxr-xr-x 2 root root 4096 6月 4 2013 mnt
drwxr-xr-x 2 root root 4096 10月 8 2013 opt
drwxr-xr-x 2 root root 4096 6月 4 2013 proc
drwx------ 2 root root 4096 10月 8 2013 root
drwxr-xr-x 11 root root 4096 2月 8 2014 run
drwxr-xr-x 2 root root 4096 10月 8 2013 sbin
drwxr-xr-x 2 root root 4096 6月 10 2012 selinux
drwxr-xr-x 2 root root 4096 10月 8 2013 srv
drwxr-xr-x 2 root root 4096 2月 8 2013 sys
drwxrwxrwt 5 root root 4096 2月 8 2014 tmp
drwxr-xr-x 10 root root 4096 2月 8 2014 usr
drwxr-xr-x 11 root root 4096 10月 8 2013 var
# cd /
# umount /mnt
これで準備完了
ボード上にシリアルのコンソール出力(TTLレベル)があるのでUSB変換で接続する
HDDを接続しないで電源ON
U-Boot SPL 2014.01-rc1-09161-g108ec3f (Jan 20 2014 - 05:48:16)
Board: Cubieboard2
DRAM: 1024 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600
U-Boot 2014.01-rc1-09161-g108ec3f (Jan 20 2014 - 05:48:16) Allwinner Technology
CPU: Allwinner A20 (SUN7I)
Board: Cubieboard2
I2C: ready
DRAM: 1 GiB
WARNING: Caches not enabled
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: mii0
Warning: failed to set MAC address
(略)
<6>md: ... autorun DONE.
[ 15.593516] md: ... autorun DONE.
<6>Waiting for root device /dev/sda1...
[ 15.610115] Waiting for root device /dev/sda1...
HDDは未接続なので最後は待ち状態で停止(全ログ)
SDカード経由でHDD起動できそうなのでHDDを接続して電源ON
すんなりコンソールにloginが表示された
ここでログインできないトラブルに・・・
どうやらrootはパスワードロック状態となっていて使えない
調べてみると登録されているユーザ名とパスワードはcubieで、最初にcubieでログインしてrootのパスワードを設定することになる
Debian GNU/Linux 7 Cubian ttyS0
Cubian login: cubie
Password:
Linux Cubian 3.4.75-sun7i #35 SMP PREEMPT Sat Feb 8 02:10:31 CST 2014 armv7l
______ __ __ .______ __ ___ .__ __.
/ || | | | | _ \ | | / \ | \ | |
| ,----'| | | | | |_) | | | / ^ \ | \| |
| | | | | | | _ < | | / /_\ \ | . ` |
| `----.| `--' | | |_) | | | / _____ \ | |\ |
\______| \______/ |______/ |__| /__/ \__\ |__| \__|
http://cubian.org
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.
cubie@Cubian:~$ sudo passwd root
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for cubie:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
cubie@Cubian:~$ sudo shutdown -h now
(略)
<6>[hotplug]: cpu(0) try to kill cpu(1)
<3>[hotplug]: try to kill cpu:1 failed!
[axp] send power-off command!
shutdownで電源が自動的にOFFになることを確認(全ログ)
再度起動してrootでログイン後、dfの表示
root@Cubian:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 16513960 824884 14850216 6% /
/dev/root 16513960 824884 14850216 6% /
devtmpfs 413924 0 413924 0% /dev
tmpfs 82812 164 82648 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 165600 0 165600 0% /run/shm
tmpfs 414048 4 414044 1% /tmp
tmpfs 414048 0 414048 0% /var/tmp
UPSの切り替え試験を実施するにあたって適当な負荷が無かったのでCubianが起動した状態の実機で確認した
商用からバッテリー、バッテリーから商用ともに問題なし
また、バッテリー駆動でHDDから起動できたのでスピンアップ時の電力も問題なし