sudo mkdir -p /mnt/runimg pi@raspberry4:~ $ sudo mount --bind /media/netdir/raspbrreyPi/mnt_runimg /mnt/runimg pi@raspberry4:~ $ ls -l /mnt/runimg/ total 85492736 -rwxrwxrwx+ 1 99 99 4555014144 Jan 7 22:32 2019-04-08-raspbian-stretch_chroot.img -rwxrwxrwx+ 1 systemd-timesync 98 3481272320 Mar 23 22:09 2019-04-08-raspbian-stretch-make-new.img -rwxrwxrwx+ 1 root root 3481272320 Dec 30 09:55 2019-04-08-raspbian-stretch-make-old.img -rwx------+ 1 99 99 3829399552 Jan 26 21:38 2019-09-26-raspbian-buster_jin.img -rw-r--r--+ 1 root root 5934940160 Apr 13 22:23 2020-02-13-raspbian-buster_jin-make.img -rw-rw-rw-+ 1 root root 31180455936 Apr 14 20:39 aarch64_bak.img -rw-rw-rw-+ 1 root root 31180455936 Apr 14 20:39 aarch64.img drwxrwxrwx+ 1 root root 160 Dec 19 22:41 bak -rw-rw-rw-+ 1 99 99 1728053248 Mar 25 22:50 readynas_compile_tool2.img -rw-rw-rw-+ 1 99 99 2173698048 Jan 8 23:25 readynas_compile_tool.img pi@raspberry4:~ $ sudo mkdir -p ~/rpi_mnt pi@raspberry4:~ $ sudo losetup -f -P --show /mnt/runimg/aarch64.img /dev/loop0 pi@raspberry4:~ $ sudo mount /dev/loop0p2 -o rw ~/rpi_mnt pi@raspberry4:~ $ cd ~/rpi_mnt pi@raspberry4:~/rpi_mnt $ sudo mount /dev/loop0p1 -o rw ~/rpi_mnt/boot/ pi@raspberry4:~/rpi_mnt $ sudo mount --bind /dev ~/rpi_mnt/dev/ pi@raspberry4:~/rpi_mnt $ sudo mount --bind /sys ~/rpi_mnt/sys/ pi@raspberry4:~/rpi_mnt $ sudo mount --bind /proc ~/rpi_mnt/proc/ pi@raspberry4:~/rpi_mnt $ sudo mount --bind /dev/pts ~/rpi_mnt/dev/pts pi@raspberry4:~/rpi_mnt $ sudo mkdir -p /media/netdir/source/raspberrypi/4-08_new_raspi pi@raspberry4:~/rpi_mnt $ sudo mkdir -p ~/rpi_mnt/mnt/compile pi@raspberry4:~/rpi_mnt $ sudo mount --bind /media/netdir/source/raspberrypi/4-08_new_raspi ~/rpi_mnt/mnt/compile pi@raspberry4:~/rpi_mnt $ cd ~/rpi_mnt pi@raspberry4:~/rpi_mnt $ sudo chroot . bin/bash chroot: failed to run command ¡®bin/bash¡¯: Exec format error pi@raspberry4:~/rpi_mnt $ cd ~/rpi_mnt pi@raspberry4:~/rpi_mnt $ ls -l total 56 lrwxrwxrwx 1 root root 7 Apr 14 20:11 bin -> usr/bin drwxr-xr-x 3 root root 3584 Jan 1 1970 boot drwxr-xr-x 2 root root 4096 Apr 14 20:12 debootstrap drwxr-xr-x 18 root root 4040 Apr 14 20:41 dev drwxr-xr-x 27 root root 4096 Apr 14 20:12 etc drwxr-xr-x 2 root root 4096 Feb 2 02:09 home lrwxrwxrwx 1 root root 7 Apr 14 20:11 lib -> usr/lib drwx------ 2 root root 16384 Apr 14 19:59 lost+found drwxr-xr-x 3 root root 4096 Apr 14 20:41 mnt dr-xr-xr-x 195 root root 0 Jan 1 1970 proc drwx------ 2 root root 4096 Feb 2 02:09 root drwxr-xr-x 2 root root 4096 Feb 2 02:09 run lrwxrwxrwx 1 root root 8 Apr 14 20:11 sbin -> usr/sbin dr-xr-xr-x 12 root root 0 Apr 14 19:56 sys drwxrwxrwt 2 root root 4096 Feb 2 02:09 tmp drwxr-xr-x 9 root root 4096 Apr 14 20:11 usr drwxr-xr-x 11 root root 4096 Apr 14 20:11 var pi@raspberry4:~/rpi_mnt $ root@raspberry4: -bash: root@raspberry4:: command not found pi@raspberry4:~/rpi_mnt $ ls -l total 56 lrwxrwxrwx 1 root root 7 Apr 14 20:11 bin -> usr/bin drwxr-xr-x 3 root root 3584 Jan 1 1970 boot drwxr-xr-x 2 root root 4096 Apr 14 20:12 debootstrap drwxr-xr-x 18 root root 4040 Apr 14 20:41 dev drwxr-xr-x 27 root root 4096 Apr 14 20:12 etc drwxr-xr-x 2 root root 4096 Feb 2 02:09 home lrwxrwxrwx 1 root root 7 Apr 14 20:11 lib -> usr/lib drwx------ 2 root root 16384 Apr 14 19:59 lost+found drwxr-xr-x 3 root root 4096 Apr 14 20:41 mnt dr-xr-xr-x 196 root root 0 Jan 1 1970 proc drwx------ 2 root root 4096 Feb 2 02:09 root drwxr-xr-x 2 root root 4096 Feb 2 02:09 run lrwxrwxrwx 1 root root 8 Apr 14 20:11 sbin -> usr/sbin dr-xr-xr-x 12 root root 0 Apr 14 19:56 sys drwxrwxrwt 2 root root 4096 Feb 2 02:09 tmp drwxr-xr-x 9 root root 4096 Apr 14 20:11 usr drwxr-xr-x 11 root root 4096 Apr 14 20:11 var pi@raspberry4:~/rpi_mnt $ root@raspberry4:echo 00:00:10 -bash: root@raspberry4:echo: command not found pi@raspberry4:~/rpi_mnt $ date Tue 14 Apr 2020 08:44:14 PM JST pi@raspberry4:~/rpi_mnt $ root@raspberry4: pi@raspberry4:~/rpi_mnt $ pi@raspberry4:~/rpi_mnt $ pi@raspberry4:~/rpi_mnt $ su - root Password: root@raspberry4:~# root@raspberry4:~# root@raspberry4:~# compile finish -bash: compile: command not found root@raspberry4:~# exit logout pi@raspberry4:~/rpi_mnt $ cd pi@raspberry4:~ $ sudo umount ~/rpi_mnt/mnt/compile pi@raspberry4:~ $ sudo umount ~/rpi_mnt/dev/pts pi@raspberry4:~ $ sudo umount ~/rpi_mnt/proc pi@raspberry4:~ $ sudo umount ~/rpi_mnt/sys pi@raspberry4:~ $ sudo umount ~/rpi_mnt/dev pi@raspberry4:~ $ sudo umount ~/rpi_mnt/boot pi@raspberry4:~ $ sudo umount ~/rpi_mnt pi@raspberry4:~ $ sudo losetup -d /dev/loop0 pi@raspberry4:~ $