07-26-2020, 01:31 AM
It's possible to install 32-bit Debian with debootstrap into a directory and then log into it with chroot. Also possible with systemd-nspawn. Also, with Docker.
Chroot is probably the easiest to understand, and is useful to learn when you need to recover an unbootable system.
This will download Debian/testing into a directory, I don't know which Debian version Raspbian is based on, so you can change that, probably to better match the library versions.
Then you need to mount some directories, you only need to do this every time you reboot:
This will mount some needed directories into the chroot, I've written it in a single line so it's easier to find in history with CTRL-R.
By this point you are ready to log into your Debian:
You can add your own user, too, with adduser username. Then the login would be with su - username.
Chroot is probably the easiest to understand, and is useful to learn when you need to recover an unbootable system.
Code:
sudo mkdir /debian-armhf
sudo debootstrap --arch armhf testing /debian-armhf
This will download Debian/testing into a directory, I don't know which Debian version Raspbian is based on, so you can change that, probably to better match the library versions.
Then you need to mount some directories, you only need to do this every time you reboot:
Code:
for f in {proc,sys,dev}; do sudo mount --bind /${f} /debian-armhf/${f}; done
This will mount some needed directories into the chroot, I've written it in a single line so it's easier to find in history with CTRL-R.
By this point you are ready to log into your Debian:
Code:
sudo chroot /debian-armhf su -
You can add your own user, too, with adduser username. Then the login would be with su - username.