LoginSignup
5
4

More than 5 years have passed since last update.

NanoPi + Armbian

Last updated at Posted at 2017-01-03

Armbianとは

NanoPiやらBananaPiやらOrangePi などのPiボード。その他にもOlimex Lime とかpcDuinoとかの、Piの名前のつかないArmでLinuxが動作するボードがたくさんある。

Armbianはそういったボードに共通で使えるディストリビューション。
DebianベースのバージョンとUbuntuベースのバージョンがある。

今回は、NanoPiの公式ディストリビューションがい ろいろダメなので、こちらに乗り換えるつもりで試してみた。

Armbianをダウンロード。

htps://www.armbian.com

ここから辿っていきます。

ここを見ると、

Armbian_5.20_Nanopineo_Debian_jessie_3.4.112.7z 15-Sep-2016 06:01 297M
Armbian_5.20_Nanopineo_Ubuntu_xenial_3.4.112.7z 15-Sep-2016 06:05 321M

ということで、

Armbian_5.20_Nanopineo_Debian_jessie_3.4.112.7z

をダウンロードしました。イメージ小さくていい感じです。

解凍すると以下のように増えます。

-rw-rw-r--  1 nanbuwks nanbuwks 298M  1月  2 00:38 Armbian_5.20_Nanopineo_Debian_jessie_3.4.112.7z
-rw-r--r--  1 nanbuwks nanbuwks 1.5G  9月 15 13:00 Armbian_5.20_Nanopineo_Debian_jessie_3.4.112.img
-rw-r--r--  1 nanbuwks nanbuwks  819  9月 15 13:00 Armbian_5.20_Nanopineo_Debian_jessie_3.4.112.img.asc
-rw-r--r--  1 nanbuwks nanbuwks  19K  9月 15 13:00 armbian.txt
-rw-r--r--  1 nanbuwks nanbuwks  819  9月 15 13:00 armbian.txt.asc
-rw-r--r--  1 nanbuwks nanbuwks  115  9月 15 13:00 sha256sum

ちゃんとイメージのハッシュなどもあって好印象です。

SDカードに書き込んで、sshでログインしてみました。
ユーザーはroot,パスワードは1234です。

$ ssh root@192.168.11.6
root@192.168.11.6's password: 
You are required to change your password immediately (root enforced)
 _   _                   ____  _   _   _            
| \ | | __ _ _ __   ___ |  _ \(_) | \ | | ___  ___  
|  \| |/ _` | '_ \ / _ \| |_) | | |  \| |/ _ \/ _ \ 
| |\  | (_| | | | | (_) |  __/| | | |\  |  __/ (_) |
|_| \_|\__,_|_| |_|\___/|_|   |_| |_| \_|\___|\___/ 


Welcome to ARMBIAN Debian GNU/Linux 8 (jessie) 3.4.112-sun8i 
System load:   0.10             Up time:       1 min        
Memory usage:  7 % of 494Mb     IP:            192.168.11.6
CPU temp:      44°C            
Usage of /:    9% of 15G        

Last login: Mon Jan  2 16:49:53 2017 from 192.168.11.5
Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
Sorry, passwords do not match
Connection to 192.168.11.6 closed.

パスワード変更しろと出てますね。ミスったらキックアウトされるなど、まじめな作りこみをしていて良いです。

正常にパスワード変更したらこの後一般ユーザ作るスクリプトが動作します。
(後略)

USBネットワークアダプタを刺して見る

無線LAN

IODATA WN-G300U


[  162.799039] ehci_irq: highspeed device connect
[  163.060186] usb 4-1: new high-speed USB device number 4 using sunxi-ehci
[  163.470066] usb 4-1: reset high-speed USB device number 4 using sunxi-ehci
[  163.648868] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[  163.652580] Registered led device: rt2800usb-phy0::radio
[  163.653085] Registered led device: rt2800usb-phy0::assoc
[  163.653557] Registered led device: rt2800usb-phy0::quality
[  163.653930] usbcore: registered new interface driver rt2800usb

Buffalo WLI-UC-G300HP

切れかけのUSBケーブルで給電している状態だと、刺した途端フリーズ。
ちょっとはまともなケーブルに入れ替えたら、フリーズは回避できてけど・・・


[   76.104495] ehci_irq: highspeed device connect
[   76.370258] usb 4-1: new high-speed USB device number 3 using sunxi-ehci

自動でネットワークアダプタとして認識するところまではいきませんでした。

有線LAN

BUFFALOのLUA3-U2-ATX


[   55.298575] ehci_irq: highspeed device connect
[   55.560249] usb 4-1: new high-speed USB device number 3 using sunxi-ehci
[   56.054703] asix 4-1:1.0: eth1: register 'asix' at usb-sunxi-ehci-1, ASIX AX88772 USB 2.0 Ethernet, b0:c7:45:5f:31:cf

OKです。

安い有線LANアダプタ


[   46.395642] ehci_irq: highspeed device connect
[   46.600232] ehci_irq: highspeed device disconnect
[   46.600272] ohci_irq: fullspeed or lowspeed device connect
[   47.020259] usb 8-1: new full-speed USB device number 2 using sunxi-ohci
[   47.380197] qf9700 8-1:1.0: eth1: register 'qf9700' at usb-sunxi-ohci-1, QF9700 USB Ethernet, 00:e0:4c:53:44:58
[   47.380359] usbcore: registered new interface driver qf9700
[   47.383871] usbcore: registered new interface driver dm9601

OKです。

armbianのネットワーク設定ファイル

ネットワーク設定はおなじみの /etc/network/interfaces


# Wired adapter #1
allow-hotplug eth0
#no-auto-down eth0
iface eth0 inet dhcp
#       hwaddress ether # if you want to set MAC manually
#       pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838

# Wired adapter #2
#allow-hotplug eth1
#iface eth1 inet dhcp
#       hwaddress ether # if you want to set MAC manually
#       pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838

# Wireless adapter #1
#allow-hotplug wlan0
#iface wlan0 inet dhcp
#       wpa-ssid SSID
#       wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# to generate proper encrypted key: wpa_passphrase yourSSID yourpassword

# Local loopback
auto lo
iface lo inet loopback

いい感じに作りこまれてます。

ちょっと触って固定アドレス設定にしました

# Wired adapter #1
allow-hotplug eth0
#no-auto-down eth0
#iface eth0 inet dhcp
#       hwaddress ether # if you want to set MAC manually
#       pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838
iface eth0 inet static

address 192.168.101.100
netmask 255.255.255.0
gateway 192.168.101.1
dns-nameservers 192.168.101.1

おまけ

インストール後、一度目のログオンはうまくいきましたが数分でフリーズ、その後何度ログオンしなおしても、最初のユーザ作成スクリプトが動作してしまい、調子が変でした。

あれれー? と思っていたらSDカードが不良でした。

以下はUbuntuPCに刺した時のdmesg.

[ 1152.174202] mmc0: card never left busy state
[ 1152.174213] mmc0: error -110 whilst initialising SD card
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4