sudo mkdir -p ~/rpi_mnt pi@raspberrypi48:~ $ sudo losetup -f -P --show /mnt/runimg/2019-04-08-raspbian-stretch_chroot.img /dev/loop0 pi@raspberrypi48:~ $ sudo mount /dev/loop0p2 -o rw ~/rpi_mnt pi@raspberrypi48:~ $ cd ~/rpi_mnt pi@raspberrypi48:~/rpi_mnt $ sudo mount --bind /dev ~/rpi_mnt/dev/ pi@raspberrypi48:~/rpi_mnt $ sudo mount --bind /sys ~/rpi_mnt/sys/ pi@raspberrypi48:~/rpi_mnt $ sudo mount --bind /proc ~/rpi_mnt/proc/ pi@raspberrypi48:~/rpi_mnt $ sudo mount --bind /dev/pts ~/rpi_mnt/dev/pts pi@raspberrypi48:~/rpi_mnt $ sudo mkdir -p undefined/undefined pi@raspberrypi48:~/rpi_mnt $ sudo mkdir -p ~/rpi_mnt/mnt/compile pi@raspberrypi48:~/rpi_mnt $ sudo mount --bind undefined/undefined ~/rpi_mnt/mnt/compile pi@raspberrypi48:~/rpi_mnt $ cd ~/rpi_mnt pi@raspberrypi48:~/rpi_mnt $ sudo chroot . bin/bash root@raspberrypi48:/# root@raspberrypi48:/# ls -l total 80 drwxr-xr-x 2 root root 4096 Apr 8 2019 bin drwxr-xr-x 2 root root 4096 Apr 8 2019 boot drwxr-xr-x 18 root root 4040 Jan 7 13:10 dev drwxr-xr-x 110 root root 4096 Dec 29 00:26 etc drwxr-xr-x 3 root root 4096 Apr 8 2019 home drwxr-xr-x 16 root root 4096 Apr 8 2019 lib drwx------ 2 root root 16384 Apr 8 2019 lost+found drwxr-xr-x 3 root root 4096 Dec 29 00:07 media drwxr-xr-x 3 root root 4096 Dec 29 00:06 mnt drwxr-xr-x 4 root root 4096 Apr 8 2019 opt dr-xr-xr-x 186 root root 0 Jan 1 1970 proc drwx------ 3 root root 4096 Dec 28 23:56 root drwxr-xr-x 5 root root 4096 Apr 8 2019 run drwxr-xr-x 2 root root 4096 Apr 8 2019 sbin drwxr-xr-x 2 root root 4096 Apr 8 2019 srv dr-xr-xr-x 12 root root 0 Jan 1 1970 sys drwxrwxrwt 3 root root 4096 Dec 31 07:26 tmp drwxr-xr-x 3 root root 4096 Jan 7 13:10 undefined drwxr-xr-x 11 root root 4096 Apr 8 2019 usr drwxr-xr-x 11 root root 4096 Apr 8 2019 var root@raspberrypi48:/# echo 00:00:00 00:00:00 root@raspberrypi48:/# date Tue Jan 7 13:10:41 GMT 2020 root@raspberrypi48:/# root@raspberrypi48:/# root@raspberrypi48:/# root@raspberrypi48:/# u cat /etc/apt/sources.list deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi root@raspberrypi48:/# root@raspberrypi48:/# root@raspberrypi48:/# root@raspberrypi48:/# compile finish bash: compile: command not found root@raspberrypi48:/# exit exit pi@raspberrypi48:~/rpi_mnt $ cd pi@raspberrypi48:~ $ sudo umount ~/rpi_mnt/mnt/compile pi@raspberrypi48:~ $ sudo umount ~/rpi_mnt/dev/pts pi@raspberrypi48:~ $ sudo umount ~/rpi_mnt/proc pi@raspberrypi48:~ $ sudo umount ~/rpi_mnt/sys pi@raspberrypi48:~ $ sudo umount ~/rpi_mnt/dev pi@raspberrypi48:~ $ sudo umount ~/rpi_mnt pi@raspberrypi48:~ $ sudo losetup -d /dev/loop0 pi@raspberrypi48:~ $