「誤家庭における小規模ネットワーク構築/Raspberry Piセットアップ」の版間の差分
ナビゲーションに移動
検索に移動
| (同じ利用者による、間の10版が非表示) | |||
| 60行目: | 60行目: | ||
* /bootディレクトリ |
* /bootディレクトリ |
||
** cmdline.txt |
|||
** meta-data |
** meta-data |
||
** network-config |
** network-config |
||
** user-data |
** user-data |
||
=== cmdline.txt === |
|||
<pre> |
|||
... cfg80211.ieee80211_regdom=JP ds=nocloud;i=rpi-001 |
|||
</pre> |
|||
=== meta-data === |
|||
<pre> |
|||
instance-id: rpi-001 |
|||
</pre> |
|||
=== user-data === |
=== user-data === |
||
| 97行目: | 110行目: | ||
</pre> |
</pre> |
||
{| class="wikitable" |
|||
! パラメータ !! 説明 |
|||
|- |
|||
| HOST || ホスト名 |
|||
|- |
|||
| USER || ユーザ名 |
|||
|- |
|||
| PASSWD || パスワード(コマンド:openssl passwd -6) |
|||
|- |
|||
| PUBKEY || SSHのパブリックキー |
|||
|} |
|||
=== network-config === |
=== network-config === |
||
| 114行目: | 139行目: | ||
access-points: |
access-points: |
||
"SSID": |
"SSID": |
||
password: " |
password: "PSK" |
||
optional: true |
optional: true |
||
</pre> |
</pre> |
||
{| class="wikitable" |
|||
! パラメータ !! 説明 |
|||
|- |
|||
| SSID || SSID |
|||
|- |
|||
| PSK || PSK(コマンド:wpa_passphrase SSID passphrase) |
|||
|} |
|||
== 起動後 == |
|||
=== LANG === |
|||
<syntaxhighlight lang="bash"> |
|||
$ sudo dpkg-reconfigure locales |
|||
</syntaxhighlight> |
|||
2026年9月4日 (金) 04:27時点における最新版
注意事項
ハードウェア設定
| デバイス | 接続先 |
|---|---|
| USB接続のSSD | USB 3.0 port 1(※port 2だと、PARTUUIDが変わってしまう) |
イメージファイルのダウンロード
参考
ダウンロード
$ curl -O URL
| パラメータ | 説明 |
|---|---|
| URL | イメージファイルのURL(例:https://downloads.raspberrypi.com/raspios_arm64/images/raspios_arm64-2026-06-19/2026-06-18-raspios-trixie-arm64.img.xz) |
チェックサム
$ sha256sum -c hash.txt
| パラメータ | 説明 |
|---|---|
| hash.txt | チェックサムを記載したファイル(例:123287c05f27b0eebd8f65456f6369b8f6635fa50a3d440a4f9f6223bf58c8e2 2026-06-18-raspios-trixie-arm64.img.xz) |
ストレージへの書き込み
書き込み
$ xzcat RASPIOS.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
| パラメータ | 説明 |
|---|---|
| RASPIOS.img.xz | イメージファイル(例:2026-06-18-raspios-trixie-arm64.img.xz) |
| sdX | デバイス名(例:sdb) |
Raspberry Piの初期設定
cloud-init
- /bootディレクトリ
- cmdline.txt
- meta-data
- network-config
- user-data
cmdline.txt
... cfg80211.ieee80211_regdom=JP ds=nocloud;i=rpi-001
meta-data
instance-id: rpi-001
user-data
#cloud-config
manage_resolv_conf: false
hostname: HOST
manage_etc_hosts: true
packages:
- avahi-daemon
apt:
preserve_sources_list: true
conf: |
Acquire {
Check-Date "false";
};
timezone: Asia/Tokyo
keyboard:
model: pc105
layout: "jp"
user:
name: USER
shell: /bin/bash
lock_passwd: false
passwd: "PASSWD"
ssh_authorized_keys:
- "PUBKEY"
sudo: null
ssh_pwauth: false
runcmd:
- [ systemctl, enable, --now, ssh ]
| パラメータ | 説明 |
|---|---|
| HOST | ホスト名 |
| USER | ユーザ名 |
| PASSWD | パスワード(コマンド:openssl passwd -6) |
| PUBKEY | SSHのパブリックキー |
network-config
network:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp6: true
optional: true
wifis:
wlan0:
dhcp4: true
regulatory-domain: "JP"
access-points:
"SSID":
password: "PSK"
optional: true
| パラメータ | 説明 |
|---|---|
| SSID | SSID |
| PSK | PSK(コマンド:wpa_passphrase SSID passphrase) |
起動後
LANG
$ sudo dpkg-reconfigure locales