# Raspberry Pi OS (formerly Raspbian)のインストール

**URL:** https://forum.ficusonline.com/t/topic/69
**Category:** Raspberry Pi
**Created:** [2017 年 1 月 14 日午前 2:02 UTC](https://forum.ficusonline.com/t/topic/69 "2017-01-14T02:02:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2017 年 1 月 14 日午前 2:02 UTC](https://forum.ficusonline.com/t/topic/69/1 "2017-01-14T02:02:37Z")

</div>

**注）**  **Raspbian** は **Raspberry Pi OS** として引継がれています。OSイメージのSDカードへ書込は以下の **`Imager`** により行います。

 ![rpi_imager](https://forum.ficusonline.com/uploads/default/original/2X/5/50d67cd060ae866268b0605c43657a95ece6e590.png)

### Imagerのインストール

```auto
$ sudo apt install rpi-imager

```

まず初めに、Advanced MenuからSSH設定（特にRaspberry Pi OS Liteを使用する場合には必須の作業です）とワイヤレス（使用する場合）設定を行い、それからOSとストレージの選定を行います。

[https://www.raspberrypi.com/documentation/computers/getting-started.html#using-raspberry-pi-imager](https://www.raspberrypi.com/documentation/computers/getting-started.html#using-raspberry-pi-imager)

> **[How to Set Up a Headless Raspberry Pi, Without Ever Attaching a Monitor](https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html)**
>
> By tweaking a few files on its microSD card, you can set your Raspberry Pi for remote access without ever attaching a monitor or keyboard.

> **[Raspberry Pi OS](https://en.wikipedia.org/wiki/Raspberry_Pi_OS)**
>
> Raspberry Pi OS is a Unix-like operating system developed for the Raspberry Pi line of single-board computers. Based on Debian, a Linux distribution, it is maintained by Raspberry Pi Holdings and optimized for the Pi's hardware, with low memory requirements and support for both 32-bit and 64-bit architectures. Originally released in July 2012 under the name Raspbian, it was introduced shortly after the launch of the first Raspberry Pi model.
> The operating system is compatible with all Raspberry ...

 ![Screenshot from 2023-09-04 22-37-10](https://forum.ficusonline.com/uploads/default/original/2X/5/5ef1f3cc4e64ba0daac9d61ee2fb82f460948c6a.png)

### Setting up a Headless Raspberry Pi

ImagerのAdvanced-Settings  
[https://www.raspberrypi.com/documentation/computers/configuration.html#setting-up-a-headless-raspberry-pi](https://www.raspberrypi.com/documentation/computers/configuration.html#setting-up-a-headless-raspberry-pi)

* * *

現地点でのRaspbianではセキュリティー上の問題多発を理由にデフォルトでsshが無効となっています。

sshは以下リリースノートで示された手順で有効にできます。  
[http://downloads.raspberrypi.org/raspbian/release\_notes.txt](http://downloads.raspberrypi.org/raspbian/release_notes.txt)

> 2016-11-25:
> 
> - SSH disabled by default; can be enabled by creating a file with name “ssh” in boot partition

＜主な条件＞

- SDカードへの書き込み環境：Ubuntu16.04
- インストールするOS：Raspbian-Jessie-Lite(2017-01-11)
- 起動マシン：Raspberry Pi2

 ![](https://forum.ficusonline.com/uploads/default/original/1X/7aaf5076d832292449d1c68f1419876a1436aaed.png)

**1.SDカードへのインストール**

まずSDカードをGPartedでFAT32形式でフォーマットします（フォルダ名は任意）。標準のディスクユーティリティよりもGPartedによるフォーマットを推奨します。

インストール手順に従いSDカードにインストールします。SDカードのマウント先名称をきちんと確認します（GPartedを起動するとmmcblk0というマウント名が表示されます）。

インストールはSDカードを **アンマウントした状態** で行います。

インストールが終了したら一度SDカードを取り外してUbuntuPCに再セットします。

**2.bootディレクトリへのアクセスとファイルの作成**

bootディレクトリがマウントされるのでbootディレクトリ内の任意のテキストファイルをsshとしてコピーします。重要なのはsshという名称のファイルであって内容は何でも構いません（空ファイルでもOK）。  
このファイルは初回起動時sshを有効後自動削除されます。

> ```
> cd /media/your_user_name/boot
> 
> ```

> ```
> sudo cp config.txt ssh
> 
> ```

**3.ワイヤレス設定**

ワイヤレスで接続する場合は以下設定ファイルを編集します。

SDカードを再セットするとboot以外にシステムディレクトリがマウントされます。このマウントされたディレクトリにアクセスします。システムディレクトリ名を確認します。

> ```
> ls /media/your_user_name
> 
> ```

```
boot 0xxxxxxxxxxx......

```

0xxxxxxxxxxx…がシステムディレクトリです。

> cd /media/your\_user\_name/0xxxxxxxxxxx…

Wifiアクセスポイント設定を編集します。アクセスポイント名とパスフレーズなどをnetworkの項目に追加して下さい。

> sudo pico etc/wpa\_supplicant/wpa\_supplicant.conf

```
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
	ssid="your_access_point"
	psk="access_point_password"
	proto=RSN
    key_mgmt=WPA-PSK 
	pairwise=CCMP TKIP
	group=CCMP TKIP
}

```

network項目の内容についてはルータの設定により異なりますので各々確認して下さい。  
[https://wiki.archlinuxjp.org/index.php/WPA\_supplicant](https://wiki.archlinuxjp.org/index.php/WPA_supplicant)

**4.SDカードのRaspberry Piへのセット・起動**

SDカードをRaspberry Piにセットして起動します。デフォルトのホストネームがraspberrypiなので念の為同一ネットワーク内のPCターミナルから

> ping raspberrypi

でIPアドレスの確認とネットワークが確立されているか確認します。

ssh接続を試みます。

> ssh pi@xx.xx.xx.xx

または、

> ssh pi@raspberrypi

標準のパスワードraspberryを入力します。

ssh接続が確立されたら次のコマンドでパスワードを変更します。

> passwd

**5.wpa\_passphraseによるパスワード暗号化**

上記3のネットワーク設定の項目では生のパスワードを入力しました。これを暗号化します。

> wpa\_passphrase your\_access\_point access\_point\_password

psk=xxxxxxxxxxxxxxxxxxxxxxx に書換えて下さい。

---

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2023 年 9 月 5 日午前 2:57 UTC](https://forum.ficusonline.com/t/topic/69/2 "2023-09-05T02:57:58Z")

</div>

## Raspberry Pi OS Dockerインストール

### apt-repositoryを追加してインストール

> **[Install using the apt repository - Raspberry Pi OS (32-bit / armhf)](https://docs.docker.com/engine/install/raspberry-pi-os/#install-using-the-repository)**
>
> Raspberry Pi OS 32-bit (armhf) Deprecation | Learn how to install Docker Engine on a 32-bit Raspberry Pi OS system. These instructions cover the different installation methods, how to uninstall, and next steps. Note that 32-bit support will be...

---

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2023 年 9 月 7 日午前 4:45 UTC](https://forum.ficusonline.com/t/topic/69/3 "2023-09-07T04:45:44Z")

</div>

`Imager`でインストールすることができるOSは以下の通りです。用途別に選択することができます。

 ![Screenshot from 2023-09-07 13-40-38](https://forum.ficusonline.com/uploads/default/original/2X/0/0cec38092f5e398d170944af807d315f8b711d8b.png)

**Other general-purposes OS**

 ![Screenshot from 2023-09-07 13-40-07](https://forum.ficusonline.com/uploads/default/original/2X/7/7dcb33e32dc1ae0a34a7fc659ae8dce2646c0552.png)

**Media player OS**

 ![Screenshot from 2023-09-07 13-40-48](https://forum.ficusonline.com/uploads/default/original/2X/2/27094ec78324f0b9b244833589fad7078fd1f53b.png)

**Other specific-purposes OS**

 ![Screenshot from 2023-09-07 13-41-06](https://forum.ficusonline.com/uploads/default/original/2X/5/523cb4eec295014d779608ec5c81c2a5a13726e7.png)
