Skip to content

Instantly share code, notes, and snippets.

@ww24
Last active July 1, 2019 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ww24/98b7c0b8cb4e8837d00c4785c9a34bbe to your computer and use it in GitHub Desktop.
Save ww24/98b7c0b8cb4e8837d00c4785c9a34bbe to your computer and use it in GitHub Desktop.
Raspberry Pi 3 (raspbian) でパスワードを忘れたときのリセット方法

1. cmdline.txt

別のマシンで microSD の boot パーティションをマウントして cmdline.txt を編集

次のオプションを末尾に追記 (改行しない)

 init=/bin/bash

2. Raspberry Pi 3 の起動

microSD を挿入して普通に起動

デフォルトで /dev/mmcblk0p2 が書き込み禁止でマウントされているため、書き込み可で再マウントする その後、パスワード変更を行う

root@(none):/# mount -o rw,remount /dev/mmcblk0p2

root@(none):/# pwconv
root@(none):/# pwsswd pi

3. 再び cmdline.txt

追記した init=/bin/bash を削除して、 Raspberry Pi 3 に挿入して起動したら完了 ✅

参考

Raspbianでパスワード忘れた場合のリセット手段

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment