[Solved] How to enter Recovery Mode?

Ask questions about Arch Linux ARM. Please search before making a new topic.

[Solved] How to enter Recovery Mode?

Postby DrJ » Mon Jun 30, 2025 2:10 pm

Gentlemen!

I needed to reset the root password on an RPi 4 running ArchLinux ARM as it is lost along with any other password. On Arch/x86 I edit the grub menu for this .. to enter bash at startup.
On Arch/ARM I do not have grub, i.e. that fails.

I can - of course - get hold of the sdcard holding the system and mount it on a different computer. I have already tried to append init=/sbin/bash in cmdline.txt on the boot partition ... but that results in a blank screen ... followd by "no cable connected" message from the monitor.

Any ideas to get some prompt to issue a "passwd" command with root permissions?

Cheers
Last edited by DrJ on Mon Jul 07, 2025 10:08 am, edited 1 time in total.
DrJ
 
Posts: 4
Joined: Sun Mar 03, 2024 10:10 am

Re: How to enter Recovery Mode?

Postby graysky » Mon Jun 30, 2025 3:49 pm

If you have a 2nd uSD card, you can image that, and then use it to chroot into the partition to change the password. (use arch-chroot from arch-install-scripts).
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: How to enter Recovery Mode?

Postby DrJ » Tue Jul 01, 2025 9:21 am

Thank you very much for your reply, @graysky ... I will give it a go and report ..
Cheers
DrJ
 
Posts: 4
Joined: Sun Mar 03, 2024 10:10 am

Re: How to enter Recovery Mode?

Postby DrJ » Mon Jul 07, 2025 10:07 am

I tried that but had difficulties as I could not mount the target rootfs via usb and did not have a second sdcard slot ...
So my solution was to take the sdcard serving as a boot device (and holding the root fs) out of the RPi and to stick it into my larger pc and have it mounted there. I edited /etc/passwd to remove the x for a qualified user ... resulting in an empty password for it.
After having being back on the RPi first thing to do was - of course - to set the password for that user ... and noting it down this time. ;)

Thanks for your attention and support ...
Cheers
DrJ
 
Posts: 4
Joined: Sun Mar 03, 2024 10:10 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 36 guests