2月14日にリリースされたUbuntu 18.
Raspberry Pi 3とUbuntu
Raspberry Pi 3
そんな状況を見かねたからかどうかはわかりませんが,
そればかりか64bit版であるARM64に対応したインストールイメージもリリースされました。ただし今回は32bit版であるARMHFを使用します。本連載の内容はARM64でもARMHFでも同様のはずですが,
Ubuntu WikiのRaspberryPiの内容をベースに,
今回検証するRasPi3はModel B+にしますが,
用意するもの
用意するものは前述のとおりRasPi3 Model 3B+,
事前準備
ホストPCで前述のRaspberryPiのページからubuntu-18.
ダウンロードしたアーカイブを右クリックして,
すると
ホストPCで必要な作業は済んだので,
初期設定
無事にブートできると,
ログイン後DHCPで割り当てられたIPアドレスが表示されるため,
$ ssh ubuntu@ubuntu.local
ロケールとキーボードとリポジトリの設定
ロケールとキーボードの設定はリモートでやったほうが楽なため,
$ sudo locale-gen ja_JP.UTF-8 $ sudo dpkg-reconfigure -f noninteractive locales $ echo "LANG=ja_JP.UTF-8" | sudo tee /etc/default/locale $ sudo timedatectl set-timezone Asia/Tokyo
キーボードレイアウトの変更は,
XKBLAYOUT="us"
を
XKBLAYOUT="jp"
に書き換え,
$ sudo dpkg-reconfigure -f noninteractive keyboard-configuration
パッケージのダウンロードサーバーを国内ミラーに切り替え,
deb http://jp.archive.ubuntu.com/ports/ bionic main restricted universe multiverse #deb-src http://jp.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse deb http://jp.archive.ubuntu.com/ports/ bionic-security main restricted universe multiverse #deb-src http://jp.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse deb http://jp.archive.ubuntu.com/ports/ bionic-updates restricted main multiverse universe #deb-src http://jp.archive.ubuntu.com/ubuntu/ bionic-updates restricted main multiverse universe deb http://jp.archive.ubuntu.com/ports/ bionic-backports restricted main multiverse universe #deb-src http://jp.archive.ubuntu.com/ubuntu/ bionic-backports restricted main multiverse universe
完了したら忘れずに次のコマンドを実行してパッケージのアップデートを行ってください。
$ sudo apt update $ sudo apt upgrade
一旦ここで再起動しましょう。