How to launch as single user mode raspberrypi

2025-04-17 linux raspi
  1. Access the SD Card via another device(like MacBook).
  2. Append init=/bin/sh on the last of cmdline.txt.
  3. Boot with the modified SD Card.
  4. Execute mount -o remount, rw /.
  5. Do recovery like passwd piuser and shutdown.
  6. (After ejecting the SD Card)Remove init=/bin/sh from cmdline.txt.