今回はRaspberry Pi 3のOSとしてRaspbianカーネルをインストールし,
第450回との違い
第450回では,
両者の大きな違いは,
Raspbianは言うまでもなくRaspberry Piシリーズに特化されたLinuxディストリビューションなので,
どちらがいいかは一長一短なので,
インストール ステージ1
Ubuntu Pi Flavour MakerのDownloadページから
ダウンロードが完了したら母艦のUbuntuでmicroSDカードを認識させ,
完了後,
インストール ステージ2
Raspberry Pi 3から起動するとコンソールログインになります。初期ユーザー名/
まずは最初にapt update
を実行します。
$ sudo apt update
続いて最低限必要なパッケージをインストールします。avahi-daemonは必須として,
$ sudo apt install avahi-daemon vim byobu
以後はRaspberry Pi 3で実行してもいいですし,
avahi-daemonパッケージがインストールされており,
$ ssh ubuntu@ubuntu-standard.local
ssh接続するメリットの一つが,
パッケージのダウンロード元がマスターサーバーになっているため,
deb http://jp.archive.ubuntu.com/ports/ xenial main restricted universe multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://jp.archive.ubuntu.com/ports/ xenial-security main restricted universe multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://jp.archive.ubuntu.com/ports/ xenial-updates restricted main multiverse universe
deb-src http://jp.archive.ubuntu.com/ubuntu/ xenial-updates restricted main multiverse universe
deb http://jp.archive.ubuntu.com/ports/ xenial-backports restricted main multiverse universe
deb-src http://jp.archive.ubuntu.com/ubuntu/ xenial-backports restricted main multiverse universe
書き換えが終わったら保存します。
リポジトリを更新し,
$ sudo apt update $ sudo apt upgrade
最初のコマンドでエラーが出た場合は,
ここまでは第450回とほぼ同じですが
$ sudo apt install raspi-config
次のコマンドを実行し,
$ sudo raspi-config
図3がraspi-configの起動直後の画面です。まずは
[5 Internationalisation Options]
続いて
[I3 Change Keyboard Layout]
最後に
ここまで設定したら最初の画面に戻ってきて
再起動後,
$ sudo apt install ubuntu-desktop gnome-session-flashback xserver-xorg-video-fbturbo dphys-swapfile
インストールには時間がかかるので,
続いて設定変更を行います。まずは/etc/
Section "Device"
Identifier "Raspberry Pi FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection
ネットワークの設定をNetwork Managerで管理する場合は,
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# The loopback network interface
auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet dhcp
次のコマンドを実行して,
$ sudo rpi-update
ここまで完了したら再起動してください。いよいよGUIでログインします。