Categories
Tech Tips

How to reset lost root password on Raspberry Pi running Arch Linux

Assumption: SD is not encrypted

Plug SD onto another working computer, look for the “cmdline.txt” file and edit it by appending “init=/bin/sh” after “rootwait”. Save the file, remove the SD and plug it back to the RPi and boot.

You’ll be dropped into a shell. Change your passwd, then hit CTRL-ALT-DEL to trigger a reboot. Switch off the RPi when the shutdown completes, just before the boot starts. Unplug the SD and plug it onto the other working computer. Remove “init=/bin/sh” from “cmdline.txt” file.

Plug the SD back onto the RPi, boot and you can now login with the newly reset password.

Leave a Reply

Your email address will not be published. Required fields are marked *