LoginSignup
5
5

More than 3 years have passed since last update.

Raspberry Pi OS 64bit 版のインストールと初期設定

Last updated at Posted at 2020-06-14

これは何?

Raspberry Pi 4 に64bit 版 Raspberry Pi OS をインストールした際の、自分用の備忘録です。
USB bootにしております。

OSの情報などは、以下のとおりです。

$ uname -a
Linux Raspi4 5.4.42-v8+ #1319 SMP PREEMPT Wed May 20 14:18:56 BST 2020 aarch64 GNU/Linux
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ vcgencmd bootloader_config
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0
DHCP_TIMEOUT=45000
DHCP_REQ_TIMEOUT=4000
TFTP_FILE_TIMEOUT=30000
ENABLE_SELF_UPDATE=1
DISABLE_HDMI=0以下のコマンドで
SD_BOOT_MAX_RETRIES=1
USB_MSD_BOOT_MAX_RETRIES=1
BOOT_ORDER=0xf41
$ vcgencmd bootloader_version
May 27 2020 18:47:29
version d648db3968cd31d4948341e09cb8a925c49d2ea1 (release)
timestamp 1590601649

知られている問題

このページで議論されています。

イメージの入手からインストール

eepromの入手

イメージのZipファイルの直リンク

イメージは、Etcherで書き込みます。

rpi-eeprom

eepromの各バージョンのダウンロードはこちらから。

rpi-eeprom

eepromの設定

こちらのとおり。

んで、最後に以下のコマンドでかきこみを行います。

$ sudo rpi-eeprom-config --out pieeprom-new.bin --config bootconf.txt pieeprom.bin

インストール後の設定

日本語入力

mozcを使います。

$ sudo apt install fcitx-mozc

Alt-`で、日本語入力に切り替える設定としています。

日本語フォントのインストール

$ sudo apt install fonts-noto-cjk
$ sudo  apt install fonts-ipafont fonts-ipaexfont fonts-ricty-diminished

Vim

$ sudo apt install vim

Nocaps

$ sudo vi /etc/default/keyboard

で、XKBOPTIONS=ctrl:nocapsを追加します。

VNC

RealVNCはデフォルトで動かないみたいなので、
tightvncserverをインストール。

libbcm_host.so32bit版OSからコピーすれば、動くみたいですが、試していません。

/etc/init.d/vncbootを以下の内容で作成して、実行権限をつける。

#! /bin/sh    

### BEGIN INIT INFO
# Provides: vncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.
### END INIT INFO

# /etc/init.d/vncboot

USER=pi
HOME=/home/pi

export USER HOME

case "$1" in
    start)
        echo "Starting VNC Server"
        #Insert your favoured settings for a VNC session
        su $USER -c '/usr/bin/vncserver :1 -geometry 1920x1080 -depth 24'
        ;;

    stop)
        echo "Stopping VNC Server"
        su $USER -c '/usr/bin/vncserver -kill :1'
        ;;

    *)
        echo "Usage: /etc/init.d/vncboot {start|stop}"
        exit 1
        ;;
esac

exit 0
$ tightvncserver

で起動して、パスワードなんかを設定する。

$ sudo update-rc.d vncboot defaults

再起動して、

$ netstat -nlt
稼働中のインターネット接続 (サーバのみ)
Proto 受信-Q 送信-Q 内部アドレス            外部アドレス            状態
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN
()

で、ポート5901で起動していることを確認。

Bokeh

$ python -m venv env
$ source env/bin/activate
$ pip3 install bokeh

で、以下のエラーが。

(略)
error: invalid command 'bdist_wheel'

Google先生に聞くと、以下のようにすれば良いみたい。

$ pip3 install python-language-server
$ sudo apt-get install libjpeg-dev
$ pip3 install bokeh
5
5
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
5