LoginSignup
17
14

More than 5 years have passed since last update.

Raspberry Pi 3 の Ubuntu を設定する

Last updated at Posted at 2018-01-03

大切な前置き

この設定は Raspberry Pi に Ubuntu 16.04 を設定する場合の話です。Raspbianはしりません。MATEでもありません。ここにあるUbuntu 16.04です。

u-bootは切っておく

この記事の Booting the official Pi 2 image on the Pi 3 に従って、ubootからvmlinuzに変えておく。やっとかないと apt-get upgrade で起動しなくなる。

/boot/firmware/config.txtの下記はコメントアウト

config.txt
#kernel=uboot.bin

下記を追記

config.txt
kernel=vmlinuz
initramfs initrd.img followkernel

device_tree_addressもコメントアウト

config.txt
# set extended DT area
#device_tree_address=0x100
device_tree_end=0x8000

再起動して上がる事を確認する。起動時にフルカラー表示が出ればOK

apt-get upgradeしておく

有線LANをつないで、このタイミングやっておくのが無難

sudo apt-get update
sudo apt-get upgrade

再起動しておく

WiFiを設定する

この段階で ifconfig -a しても wlan0 は表示されなくなってしまっているので、このページの対処に従ってKernel Moduleを復活させておく

cd /lib/firmware/brcm/
sudo wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.bin
sudo wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.txt

設定後に再起動すると ifconfig -a したとき wlan0 が表示されるようになる

sudo apt-get install wireless-tools wpasupplicant

で設定に必要なツール類をインストールする。その後にSSIDとpassphraseを流し込む。下記のコマンドで括弧ごと自分のSSIDとpassに置き換える

sudo sh -c "wpa_passphrase [SSID] [passphrase] >> /etc/wpa_supplicant/wpa_supplicant.conf"

/etc/network/interfaces  は下記のようにwlan0に関連する行を追記する。今回はDHCPとしている。

interfaces
# The loopback network interface
auto lo
iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet dhcp
    wireless-power off
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

これで、再起動時にWiFiを掴むようになる

おまけ:オフライン起動の高速化

オフラインで起動しようとすると A start job is running for raise network interfaces とか出て5分も待たされるので15秒くらいに縮める。

/etc/dhcp/dhclient.conftimeoutを下記のようにでもしておけば15秒になる

dhclient.conf
timeout 15

おまけ:液晶の最適設定

RaspberryPiの液晶は買いまくったけど、SPI接続はUbuntu 16.04では使い方が解らなかったので却下。HDMIの製品から選ぶ。OSOYOOだとこれとか使えない

こっちなら使える。でも、1920x1280は対応入力解像度であって実解像度は低い。ケースは綺麗なんだけど全体が覆われて Raspberry Pi 3 は放熱出来なくてつらい。

こっちがおすすめ。これは安っぽいけど外壁が無いので放熱できる

設定どちらも下記が、読める字の限界設定だと思う。
/boot/firmware/config.txtの下記を変更する

config.txt
# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=14

以上、毎回解らなくなって時間を浪費するのでメモとして残しておく

17
14
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
17
14