chroot into raspberry pi

Talk about other linux distributions, or even other OSes.
Post Reply
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

chroot into raspberry pi

Post by mimosa »

I forgot my password so couldn't ssh into my headless pi. Problem solved by generating a new password and hash

Code: Select all

openssl passwd -1 'password'
and editing /etc/shadow

But I'm sure I remember chrooting into the mounted SD card. This was the first avenue I explored, and the solution commonly suggested uses qemu-user-static:
https://wiki.debian.org/RaspberryPi/qemu-user-static
However, this doesn't appear to be straightforward in Slackware (I have qemu installed and can't find that thing, though this old slackbuild from alienbob looks as though it builds it:
https://docs.slackware.com/howtos:emulators:binfmt_misc)

I have a niggling feeling there is a much easier way and I have just forgotten it.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: chroot into raspberry pi

Post by gapan »

I think that qemu-*-static is probably only available in newer versions of qemu, we have 2.6.0 in the repos now. I can see that the package for qemu-user-static in the debian repositories is now built from the qemu-3.1 source tarball.

But a simple workaround would be to use this docker image I think:
https://hub.docker.com/r/multiarch/qemu-user-static/
Image
Image
Post Reply