CB4 試す2

イメージが新しいのが出ていたので linaro-server をインストール

micro SD にイメージ展開

http://dl.cubieboard.org/model/cc-a80/Image/ubuntu-linaro/

# 7za e linaro-server-cb4-card-vga-v2.0.img.7z

7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=ja_JP.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)

Processing archive: linaro-server-cb4-card-vga-v2.0.img.7z

Extracting  linaro-server-cb4-card-vga-v2.0.img

Everything is Ok

Size:       889192448
Compressed: 188975205
# dd if=./linaro-server-cb4-card-vga-v2.0.img of=/dev/sde

USB Mouse(はいらないけど)、USB Keyboard、VGAをCB4に挿して、micro sdを差し込んでブート

コンソールが現れる。

http://dl.cubieboard.org/model/cc-a80/Image/ubuntu-linaro-server/v2.0/README

  • DHCPでふられてるIPアドレス確認
  • linaro/linaroでSSHログイン
  • rootパスワード変更(デフォルト cubieboard)
  • /etc/network/interface の eth0 分を編集
  • auto eth0
    iface eth0 inet static
    # allow-hotplug eth0 ここコメントアウト
    address 192.168.0.50
    netmask 255.255.255.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
  • apache2, mysql , irqbalance サービス止める(# update-rc.d -f <service name> remove)
  • wlan の設定
  • #this is open wifi setting."your-ssid-here" and "your-passwd-here" should been replase with yours and remove the annotation
    
    auto wlan0
    iface wlan0 inet dhcp
    #pre-up ip link set wlan0 up
    #pre-up iwconfig wlan0 essid 12345-SSID
    wpa-ssid 12345-SSID
    wpa-psk MYPASSWORD
    
    #auto br0
    #iface br0 inet dhcp
    #bridge_ports eth0 wlan0
    
  • ifup eth0 や ifup wlan0 で有効化
  • mysql-server-core.5.5 , mysql-server-5.5 を apt-get remove , dpkg –purge
  • apache2 , apache2-bin , apache2-data も apt-get remove , dpkg –purge
  • apt-get install git

 

WiFi

The name of WIFI drive module is bcmdhd ,you can use command "lsmod " see that it has been loading .
Use command "iwlist wlan0 scan" can find the WIFI hotspot you want to connect .
Add the ssid and passwd into /etc/network/interfaces .

Beacuse first connect ,after reboot the board ,maybe need type:

#ifconfig wlan0 down
#ifconfig wlan0 up
#/etc/init.d/networking restart

Zabbix on a docker container (Inside CoreOS) .. setup log

  • CoreOS:607.0.0 (/etc/os-release)
  • Docker:version 1.5.0, build a8a31ef-dirty
  • Image:phusion/baseimage   0.9.16
  • Zabbix 2.4
core@coreos0 ~ $ docker run -itd --name zabbix -p 8081:80 phusion/baseimage:latest /bin/bash
58e286c670b84e57ecb6eca767d061f7b738940359c03cbcfe9b11f032dee4ad

core@coreos0 ~ $ docker exec -it zabbix bash

root@58e286c670b8:/# dpkg-reconfigure tzdata

Current default time zone: 'Asia/Tokyo'
Local time is now:      Sun Apr  5 11:45:31 JST 2015.
Universal Time is now:  Sun Apr  5 02:45:31 UTC 2015.

# apt-get update
# apt-get install wget
# wget http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_2.4-1+trusty_all.deb
# dpkg -i zabbix-release_2.4-1+trusty_all.deb
Selecting previously unselected package zabbix-release.
(Reading database ... 16802 files and directories currently installed.)
Preparing to unpack zabbix-release_2.4-1+trusty_all.deb ...
Unpacking zabbix-release (2.4-1+trusty) ...
Setting up zabbix-release (2.4-1+trusty) ...

# apt-get update

# apt-get install zabbix-server-mysql zabbix-frontend-php

* Input MySQL Admin root/root
* Input for zabbix-server-mysql root/root
* 途中アボートするので、MySQLを手動で立ち上げ(service mysql start)て、retry

root@58e286c670b8:/etc/apache2/conf-available# cd
root@58e286c670b8:~# ls -ltr /etc/apache2/conf-available/
total 24
-rw-r--r-- 1 root root 2190 Jan 3 2014 security.conf
-rw-r--r-- 1 root root 189 Jan 3 2014 other-vhosts-access-log.conf
-rw-r--r-- 1 root root 3224 Jan 3 2014 localized-error-pages.conf
-rw-r--r-- 1 root root 315 Jan 3 2014 charset.conf
-rw-r--r-- 1 root root 455 Jan 7 2014 serve-cgi-bin.conf
lrwxrwxrwx 1 root root 23 Apr 5 02:15 zabbix.conf -> /etc/zabbix/apache.conf

-rw-r--r-- 1 root root 2190 Jan 3 2014 security.conf
-rw-r--r-- 1 root root 189 Jan 3 2014 other-vhosts-access-log.conf
-rw-r--r-- 1 root root 3224 Jan 3 2014 localized-error-pages.conf
-rw-r--r-- 1 root root 315 Jan 3 2014 charset.conf
-rw-r--r-- 1 root root 455 Jan 7 2014 serve-cgi-bin.conf
lrwxrwxrwx 1 root root 23 Apr 5 02:15 zabbix.conf -> /etc/zabbix/apache.conf
root@58e286c670b8:/etc/apache2/conf-available# more zabbix.conf
# Define /zabbix alias, this is the default
<IfModule mod_alias.c>
Alias /zabbix /usr/share/zabbix
</IfModule>

<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value date.timezone Asia/Tokyo
</Directory>

<Directory "/usr/share/zabbix/conf">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>

<Directory "/usr/share/zabbix/api">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>

<Directory "/usr/share/zabbix/include">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>

<Directory "/usr/share/zabbix/include/classes">
Order deny,allow
Deny from all
<files *.php>
Order deny,allow
Deny from all
</files>
</Directory>

service mysql start
service mysql status
service apache2 start
service apache2 status

root@58e286c670b8:~# ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 02:17 ? 00:00:00 /bin/bash
root 19 0 0 02:18 ? 00:00:00 bash
root 93 0 0 02:19 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql 443 93 1 02:19 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --l
root 511 0 0 02:19 ? 00:00:00 [debian-start] <defunct>
root 649 0 1 02:19 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 653 649 0 02:19 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 654 649 0 02:19 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 655 649 0 02:19 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 656 649 0 02:19 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 657 649 0 02:19 ? 00:00:00 /usr/sbin/apache2 -k start
root 661 19 0 02:19 ? 00:00:00 ps -ef

http://coreos.tk.net:8081/
Access      http://coreos.tk.net:8081/zabbix

    • Pre-Requisites => all ok
    • DB connection => ok

Zabbix server name “empty”

  • Pre-Installation sumary
  • Install => OK => Finish

 

Login : Admin/zabbix

root@58e286c670b8:/# service zabbix-server start

ここまで、docker commit しておく

あとは、/etc/my_init.d 以下にスクリプト用意

 

::::::::::::::
01_mysqld
::::::::::::::
#!/bin/sh
exec /usr/bin/mysqld_safe > /dev/null 2>&1 &
::::::::::::::
02_apache2
::::::::::::::
#!/bin/sh
exec apache2ctl start
::::::::::::::
03_zabbix-server
::::::::::::::
#!/bin/sh
exec  /usr/sbin/zabbix_server

docker run 時に /sbin/my_init 指定してオシマイ。

UIを日本語にしたいなら、 apt-get install language-pack-ja しとく
ロケール変更は、右上のProfileから。

CB4 試す

オクタコアのCB4を購入

micro SD にイメージ展開

http://dl.cubieboard.org/model/cc-a80/Image/ubuntu-linaro/

$ 7za e  linaro-desktop-cb4-card-hdmi-v0.4.img.7z
# dd if=./linaro-desktop-cb4-card-hdmi-v0.4.img of=/dev/sde

差し込んでブート

ペンギン8匹!

pen8

rootパスワードとsshdの設定はいつもどおりにツーツーにしておき、ネットワーク設定、ロケール(/etc/default/locale)をja_JP.UTF-8に変更しておく

このイメージは Ubuntu 14.04 trusty ベース

root@cubieboard4:~# lsb_release -a
No LSB modules are available.
Distributor ID: Linaro
Description: Linaro 14.04
Release: 14.04
Codename: trusty

なんかこれまでの、RasPi、CB2、CB3 よりも全然速い気がする。ちょっとベンチしてみたい。

 

備忘録 20140131

 

acer の安いPCをほったらかにしにしてたので、情報を置いておく

Ubuntu 14.04 LTS ,

一応、X入れ、Xfce

 apt-get install wpasupplicant wiress-tools
 apt-get install wpasupplicant wireless-tools
 apt-get install firefox
 apt-get install xfce4

 

NTP設定

無線LAN設定(自分の)

Docker 用として使いたいので

apt-get install docker.io

 

以下、Docどおり

https://docs.docker.com/installation/ubuntulinux/

入れ終わって動くか確認

docker run -i -t ubuntu /bin/bash

 

デタッチ(Ctrl-p , Ctrl-q)して、削除までのコマンドリスト

docker ps
docker stop
docker ps -a 
docker images
docker images -t
docker rm <container id>
docker ps -a
docker rmi <image id>
docker images

 

 

統計検定2級挑戦 -2014-

このブログでは自分の好き勝手にいろんな内容の記事を載っけてますが、今回は「統計学」についてです。

統計検定というのがあるのをご存知でしょうか。

統計検定ページ

2011年に発足したばかりの新しい検定です。2014年にこの検定を受けてみました。自分は理系の4大を出ているのでめざすとこはまず「2級」に設定しました。自分もそうでしたが受けている方の体験記は参考になりましたので、こちらで自分も紹介してみようとおもいました。結果からもうしあげますと、2014年の11月の試験で合格できたのですが6月に一度落ちて悔しい思いもしました。そんなことも踏まえてつらつら書いてみます。

序章

まず自分のステータスとしては、今はIT企業が15年目ですが、データ分析は主業務としていません。ものすごくざっくりいうとシステムエンジニアというタイプになります。大学は理系ですが、統計・確率は勉強していません。しかも高校生のときは確率は数学野中で一番不得意な分野、というか嫌いでした。そんな自分が「統計検定2級」を得たのはだいぶがんばったなと感じてます。

Continue reading “統計検定2級挑戦 -2014-”

Cubieboard2 へ lubuntu

イメージをuSDへ焼く

http://dl.cubieboard.org/software/a20-cubieboard/lubuntu/

[root@sarah Lubuntu]# dd if=cb-a20-lubuntu-desktop-card-v105.img of=/dev/sde bs=1M
3781+1 レコード入力
3781+1 レコード出力
3965190144 バイト (4.0 GB) コピーされました、 494.273 秒、 8.0 MB/秒
[root@sarah Lubuntu]#
 
 cubieboard2 へ挿入して起動

HDMI出力からGUIがあがってくる。

SSHでログイン linaro / linaro

[root@sarah ~]# ssh 192.168.0.243 -l linaro
linaro@192.168.0.243's password:
The programs included with the Linaro system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Linaro comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Welcome to Linaro 13.04 (GNU/Linux 3.4.43+ armv7l)
* Documentation: https://wiki.linaro.org/
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
linaro@cubieboard2:~$
root@cubieboard2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Linaro
Description: Linaro 13.04
Release: 13.04
Codename: quantal
root@cubieboard2:~#

Cubieboard2 へ Fedora 20 を

セットアップは Fedora 19 のときとおなじ。

https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/

初期起動の際に、停止してしまったので、手動で再起動してから、初期セットアップ画面をすませる。

 

HDMI から VGA へ

 

SELinuxfirewalld とめた後は出力を HDMI から VGA へ(fedora 20 イメージのREADMEに記載あり)

/boot/uEnv.txt  を編集

 

■変更前

loglevel=5
root=/dev/mmcblk0p3 ro rootwait rootfstype=ext4
extraargs=console=ttyS0,115200 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 sunxi_fb_mem_reserve=20 sunxi_no_mali_mem_reserve

 

■変更後

console=tty0
loglevel=5
root=/dev/mmcblk0p3 ro rootwait rootfstype=ext4
extraargs=console=ttyS0,115200 disp.screen0_output_type=4 disp.screen0_output_mode=1920x1080 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 sunxi_fb_mem_reserve=20 sunxi_no_mali_mem_reserve

これでVGAから画面が出る

 

「j5 create」 USB to Ether をつなげる

さすだけで認識 eth1

[root@cubie2 ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0b95:772b ASIX Electronics Corp. AX88772B
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@cubie2 ~]# dmesg |grep eth1
[ 9.370015] asix 2-1:1.0: eth1: register 'asix' at usb-sw-ehci-1, ASIX AX88772 USB 2.0 Ethernet, 00:05:1b:a4:67:15
[ 17.092004] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 17.179360] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 17.180999] asix 2-1:1.0: eth1: link down
[ 18.845268] asix 2-1:1.0: eth1: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 28.008098] eth1: no IPv6 routers present

[root@cubie2 ~]# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 16
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pg
Wake-on: p
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
[root@cubie2 ~]#

/etc/sysconfig/network-scripts/{ifcfg-eth0,ifcfg-eth1} を設定する

[root@sarah network-scripts]# more ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.0.220
GATEWAY=192.168.0.1
USERCTL=no
[root@sarah network-scripts]# more ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=no
[root@sarah network-scripts]#

/etc/sysconfig/network の HOSTNAME 記載

HOSTNAME=cubie2.tk.net
NETWORKING=yes
NETWORKING_IPV6=no

容量拡張

[root@cubie2 ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.24).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/mmcblk0: 29.5 GiB, 31674335232 bytes, 61863936 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00017d5b
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1953 1001953 500000+ 83 Linux
/dev/mmcblk0p2 1001954 2001953 500000 83 Linux
/dev/mmcblk0p3 2001954 7861328 2929687+ 83 Linux
Command (m for help): n
Partition type:
 p primary (3 primary, 0 extended, 1 free)
 e extended
Select (default e): p
Selected partition 4
First sector (7861329-61863935, default 7862272):
Last sector, +sectors or +size{K,M,G,T,P} (7862272-61863935, default 61863935):
Created a new partition 4 of type 'Linux' and of size 25.8 GiB.
Command (m for help): p
Disk /dev/mmcblk0: 29.5 GiB, 31674335232 bytes, 61863936 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00017d5b
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1953 1001953 500000+ 83 Linux
/dev/mmcblk0p2 1001954 2001953 500000 83 Linux
/dev/mmcblak0p3 2001954 7861328 2929687+ 83 Linux
/dev/mmcblk0p4 7862272 61863935 27000832 83 Linux
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

 

/ の拡張

「/」のあまりが非常に少ないそのため、以下を実施

 

  • 一度「/」データを別のLinuxマシンに退避
  • 「/」の部分をパーティション切りなおし(fdisk)
  • ファイルシステム再構築、データの戻し
  • fstab は uuid 指定になっているのでデバイス指定に変更(例:/dev/mmcblk0p3  / ext4    defaults,noatime 0 0)
  • cubieboard2 へ SD 挿入し起動

 

fstab を変更せずに起動すると、uuid 相違のせいで read only でマウントされ何もできない

uuid 指定でもいい、以下のようにわかる

 

[tk@cubie2 ~]$ cd /dev/disk/by-uuid/
[tk@cubie2 by-uuid]$ ls
002f517d-f711-4b81-a4e7-23462f9f3eba 30A1-07B2 57f8f4bc-abf4-655f-bf67-946fc0f9f25b 85943324-a3c5-424d-8410-051fca5f0e92
0705-07B2 36096ef7-da5c-4578-8490-e3be1a1b3ee9 67501962-ff2f-4eae-afb2-83d4181d387c
[tk@cubie2 by-uuid]$ ls -l
total 0
lrwxrwxrwx 1 root root 15 Jan 1 2010 002f517d-f711-4b81-a4e7-23462f9f3eba -> ../../mmcblk0p4
lrwxrwxrwx 1 root root 11 Jan 1 2010 0705-07B2 -> ../../nandk
lrwxrwxrwx 1 root root 11 Jan 1 2010 30A1-07B2 -> ../../nandi
lrwxrwxrwx 1 root root 15 Jan 1 2010 36096ef7-da5c-4578-8490-e3be1a1b3ee9 -> ../../mmcblk0p3
lrwxrwxrwx 1 root root 11 Jan 1 2010 57f8f4bc-abf4-655f-bf67-946fc0f9f25b -> ../../nandh
lrwxrwxrwx 1 root root 15 Jan 1 2010 67501962-ff2f-4eae-afb2-83d4181d387c -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 Jan 1 2010 85943324-a3c5-424d-8410-051fca5f0e92 -> ../../mmcblk0p1
[tk@cubie2 by-uuid]$

 

fstab 例

UUID=36096ef7-da5c-4578-8490-e3be1a1b3ee9  / ext4    defaults,noatime 0 0

Run Level 変更

ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

CubieTruck (Cubieboard3)

とりあえずFedora-19でインストール

http://dl.cubieboard.org/software/a20-cubietruck/fedora/
1、別PCにSDカード挿入
2、マウントされてしまってたら、アンマウント
3、イメージの書き込み

[root@sarah CubieTruck]# xzcat Fedora-19-a10-armhfp-r3.img.xz > /dev/sde
[root@sarah CubieTruck]# sync

4、SDカード、抜き差し

[root@sarah CubieTruck]# df
ファイルシステム 1K-ブロック 使用 使用可 使用% マウント位置
rootfs 20398084 12529384 6832508 65% /
/dev/root 20398084 12529384 6832508 65% /
/dev 1024416 592 1023824 1% /dev
/dev/sda1 102740 25388 72136 27% /boot
none 1024416 108 1024308 1% /dev/shm
/dev/sda5 940416968 280892288 649970584 31% /home
/dev/sde3 6247828 2217988 3966364 36% /media/rootfs
/dev/sde1 484312 41664 437648 9% /media/uboot
[root@sarah CubieTruck]#

5、u-boot を「cubietruck」で書き込み

[root@sarah CubieTruck]# /media/uboot/select-board.sh cubietruck
Are you sure you want to install the spl, u-boot and kernel for cubietruck from /media/uboot/boards onto /dev/sde ?
Press enter to continue, CTRL+C to cancel
Installing spl, u-boot and kernel for cubietruck onto /dev/sde ...
251+1 レコード入力
251+1 レコード出力
257636 バイト (258 kB) コピーされました、 0.0907537 秒、 2.8 MB/秒
128+0 レコード入力
128+0 レコード出力
131072 バイト (131 kB) コピーされました、 0.100976 秒、 1.3 MB/秒
Done
[root@sarah CubieTruck]#

6、SDカードを cubietruck にいれてブート(cubieboard1,2のときと違い、解像度が1920×1080に合わせられてる)
7、ロケーション、ネットワーク設定、root パスワード等設定
8、reboot
9、Firewall無効化

# systemctl disable firewalld
# systemctl stop firewalld

10、SELinux 無効化
11、yum update
12、reboot

 

Cubieboard2 を試す (cubieez_1.0 A20 version)

新しいのが出たので入れなおし。

 

インストール・初期設定

ダウンロード

 

[root@sarah Cubieboard2]# 7za e cubieez_1.0.0_A20.7z

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=ja_JP.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)

Processing archive: cubieez_1.0.0_A20.7z

Extracting cubieez_1.0.0_A20.img

Everything is Ok

Size: 1955594240
Compressed: 462695610

[root@sarah Cubieboard2]# dd if=./cubieez_1.0.0_A20.img of=/dev/sde
3819520+0 レコード入力
3819520+0 レコード出力
1955594240 バイト (2.0 GB) コピーされました、 686.935 秒、 2.8 MB/秒

ボードに挿入しブート

  1.  Expand Filesystem => 実行
  2. Change User Password => root
  3. Enable Boot to Desktop => そのまま
  4. Internationalisation Options
  5. Change Locale(ja.JP.UTF-8、USとESも選ばれる)、Time Zoneは「Tokyo」、Keyboard Layoutは「Hewlett-Packard Internet Keyboard」でJPレイアウトにしとく
  6. Advaned Option =>Hostname変更、SSHを有効化
  7. 「Finish」 reboot

 

ネットワーク設定</etc/network/interfaces>

iface eth0 inet static
 address 192.168.0.220
 netmask 255.255.255.0
 gateway 192.168.0.1
 dns-search tk.net
 dns-nameservers 192.168.0.1

DNS</etc/resolv.conf>

# Generated by NetworkManager
#nameserver 8.8.8.8
nameserver 192.168.0.1

ホスト名</etc/hostname>

root@cubie2:~# cat /etc/hostname
cubie2

NTP編集

root@cubie2:~# /etc/init.d/ntp stop
[ ok ] Stopping NTP server: ntpd.
root@cubie2:~# vi /etc/ntp.conf
root@cubie2:~# cd /etc/
root@cubie2:/etc# cp ntp.conf ntp.conf.20140505
root@cubie2:/etc# vi ntp.conf
(server 192.168.0.1 iburst)
root@cubie2:/etc# /etc/init.d/ntp start
[ ok ] Starting NTP server: ntpd.
root@cubie2:/etc# ntpq -p
 remote refid st t when poll reach delay offset jitter
==============================================================================
 192.168.0.1 .INIT. 16 u - 64 0 0.000 0.000 0.000
root@cubie2:/etc#

 

アップグレード・パッケージ追加

 

apt-get update
apt-get upgrade
apt-get install host
apt-get install ntpdate
apt-get install libusb-1.0

 

VGA設定

 

こちら と同じように実施

 

Kernel

root@cubie2:~# uname -r
3.4.43-sun7i
root@cubie2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.5 (wheezy)
Release: 7.5
Codename: wheezy
root@cubie2:~#

SSDの認識

root@cubie2:~# cat /sys/block/sda/queue/rotational
0
root@cubie2:~# cat /sys/block/sda/queue/scheduler
[noop] deadline cfq
root@cubie2:~#

もとから、noop IOスケジューラに設定されている。

 

F2FS

Kernel 3.8でないと駄目ー

f2fs-toolsをビルドするので以下いれた、あとベンチも。

 

apt-get install uuid
apt-get install uuid-dev
apt-get install bonnie++

 

mkfs.f2fs の実行までログ

http://sourceforge.net/projects/f2fs-tools/

 

root@cubie2:~# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
root@cubie2:~/f2fs-tools#
root@cubie2:~/f2fs-tools# autoreconf --install
root@cubie2:~/f2fs-tools# apt-get install uuid
root@cubie2:~/f2fs-tools# apt-get install uuid-dev
root@cubie2:~/f2fs-tools# ./configure
root@cubie2:~/f2fs-tools# make
root@cubie2:~/f2fs-tools# ./mkfs/mkfs.f2fs -l f2fs /dev/sda1
F2FS-tools: mkfs.f2fs Ver: 1.2.0 (2014-04-07)
Info: Label = f2fs
Info: sector size = 512
Info: total sectors = 234439600 (in 512bytes)
Info: zone aligned segment0 blkaddr: 256
Info: Discarding device
Info: format successful
root@cubie2:~/f2fs-tools#

Cubieboard2 SSD 接続

ADATAを接続してみる

Cubieez 0.1 RC2 (A20 version) でもつなげるだけで、認識されました。

root@cubieez:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.1 (wheezy)
Release: 7.1
Codename: wheezy
root@cubieez:~# uname -a
Linux cubieez 3.3.0+ #1 SMP PREEMPT Sat Jul 20 11:39:49 CEST 2013 armv7l GNU/Linux
root@cubieez:~#

 

root@cubieez:~# dmesg |grep -i sd
[ 2.906210] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 2.916365] [mmc-msg] sdc0 Probe: base:0xf003c000 irq:64 sg_cpu:ffdf5000(4fc00000) ret 0.
[ 4.400709] [mmc-msg] sdc0 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.409669] [mmc-msg] sdc0 power on
[ 4.430692] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.522580] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.534380] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.566127] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.575566] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.587360] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 4.623116] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 4.632463] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 4.697070] [mmc-msg] sdc0 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 4.706611] mmc0: new high speed SDHC card at address 59b4
[ 4.712923] mmcblk0: mmc0:59b4 USD 29.4 GiB
[ 12.943889] ata1.00: ATA-8: ADATA SSD S510 120GB, 3.3.2, max UDMA/133
[ 12.971889] scsi 0:0:0:0: Direct-Access ATA ADATA SSD S510 1 3.3. PQ: 0 ANSI: 5
[ 12.983112] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[ 12.991753] sd 0:0:0:0: [sda] Write Protect is off
[ 12.996578] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 13.006216] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 13.020837] sda: sda1
[ 13.029234] sd 0:0:0:0: [sda] Attached SCSI disk
root@cubieez:~#

 

root@cubieez:~# fdisk -l /dev/sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x49e2fd2f

Device Boot Start End Blocks Id System
/dev/sda1 1 234441647 117220823+ ee GPT
root@cubieez:~#

 

root@cubieez:~# hdparm -T -t /dev/sda1

/dev/sda1:
 Timing cached reads: 820 MB in 2.00 seconds = 409.56 MB/sec
 Timing buffered disk reads: 312 MB in 3.06 seconds = 101.99 MB/sec