sudo mkdir -p ~/rpi_mnt pi@raspberrypi4:~ $ sudo losetup -f -P --show /mnt/runimg/new_raspberry1_srerver_min.img /dev/loop0 pi@raspberrypi4:~ $ sudo mount /dev/loop0p2 -o rw ~/rpi_mnt pi@raspberrypi4:~ $ cd ~/rpi_mnt pi@raspberrypi4:~/rpi_mnt $ sudo mount --bind /dev ~/rpi_mnt/dev/ pi@raspberrypi4:~/rpi_mnt $ sudo mount --bind /sys ~/rpi_mnt/sys/ pi@raspberrypi4:~/rpi_mnt $ sudo mount --bind /proc ~/rpi_mnt/proc/ pi@raspberrypi4:~/rpi_mnt $ sudo mount --bind /dev/pts ~/rpi_mnt/dev/pts pi@raspberrypi4:~/rpi_mnt $ sudo mkdir -p /media/netdir/source/raspberrypi/4-07 pi@raspberrypi4:~/rpi_mnt $ sudo mkdir -p ~/rpi_mnt/mnt/compile pi@raspberrypi4:~/rpi_mnt $ sudo mount --bind /media/netdir/source/raspberrypi/4-07 ~/rpi_mnt/mnt/compile pi@raspberrypi4:~/rpi_mnt $ cd ~/rpi_mnt pi@raspberrypi4:~/rpi_mnt $ sudo chroot . bin/bash root@raspberrypi4:/# root@raspberrypi4:/# ls -l total 88 drwxr-xr-x 2 root root 4096 Sep 26 09:14 bin drwxr-xr-x 2 root root 4096 Jan 2 22:41 boot drwxr-xr-x 17 root root 3960 Jan 4 22:44 dev drwxr-xr-x 114 root root 12288 Jan 3 18:21 etc drwxr-xr-x 3 root root 4096 Sep 26 09:09 home drwxr-xr-x 16 root root 4096 Jan 3 17:44 lib drwx------ 2 root root 16384 Sep 26 09:30 lost+found drwxr-xr-x 2 root root 4096 Sep 26 09:05 media drwxr-xr-x 6 root root 4096 Jan 3 18:21 mnt drwxr-xr-x 4 root root 4096 Sep 26 09:16 opt dr-xr-xr-x 150 root root 0 Jan 1 1970 proc drwx------ 5 root root 4096 Jan 3 18:21 root drwxr-xr-x 4 root root 4096 Sep 26 09:05 run drwxr-xr-x 2 root root 4096 Jan 3 17:44 sbin drwxr-xr-x 3 root root 4096 Jan 3 18:21 srv dr-xr-xr-x 12 root root 0 Jan 4 22:39 sys dr-xr-xr-x 9 nobody root 4096 Jan 3 18:21 tftpboot drwxrwxrwt 7 root root 4096 Jan 4 13:33 tmp drwxr-xr-x 11 root root 4096 Sep 26 09:15 usr drwxr-xr-x 11 root root 4096 Sep 26 09:31 var root@raspberrypi4:/# echo 00:00:00 00:00:00 root@raspberrypi4:/# date Sat 04 Jan 2020 10:44:16 PM JST root@raspberrypi4:/# root@raspberrypi4:/# root@raspberrypi4:/# ls -l /etc/samba/smb.conf -rw-r--r-- 1 root root 53904 Jan 3 17:25 /etc/samba/smb.conf root@raspberrypi4:/# root@raspberrypi4:/# rm -f /etc/samba/smb.conf root@raspberrypi4:/# cd /etc/samba/ root@raspberrypi4:/etc/samba# scp -p pi@raspberry1:/etc/samba/smb.conf ./ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:WroIin668/UrRMpq7czcjhKghPBV2E7L29t5yclz84M. Please contact your system administrator. Add correct host key in /root/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /root/.ssh/known_hosts:3 remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R "raspberry1" ECDSA host key for raspberry1 has changed and you have requested strict checking. Host key verification failed. root@raspberrypi4:/etc/samba# ssh-keygen -f "/root/.ssh/known_hosts" -R "raspberry1" # Host raspberry1 found: line 3 /root/.ssh/known_hosts updated. Original contents retained as /root/.ssh/known_hosts.old root@raspberrypi4:/etc/samba# ssh-keygen -f "/root/.ssh/known_hosts" -R "raspberry1"cp -p pi@raspberry1:/etc/samba/smb.conf ./ The authenticity of host 'raspberry1 (192.168.1.251)' can't be established. ECDSA key fingerprint is SHA256:WroIin668/UrRMpq7czcjhKghPBV2E7L29t5yclz84M. Are you sure you want to continue connecting (yes/no)? Host key verification failed. root@raspberrypi4:/etc/samba# scp -p pi@raspberry1:/etc/samba/smb.conf ./ The authenticity of host 'raspberry1 (192.168.1.251)' can't be established. ECDSA key fingerprint is SHA256:WroIin668/UrRMpq7czcjhKghPBV2E7L29t5yclz84M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'raspberry1' (ECDSA) to the list of known hosts. Warning: the ECDSA host key for 'raspberry1' differs from the key for the IP address '192.168.1.251' Offending key for IP in /root/.ssh/known_hosts:3 Are you sure you want to continue connecting (yes/no)? yes pi@raspberry1's password: smb.conf 0% 0 0.0KB/s --:-- ETAsmb.conf 100% 10KB 5.0MB/s 00:00 root@raspberrypi4:/etc/samba# ls -l /etc/samba/smb.conf -rw-r--r-- 1 root root 10538 Jan 4 15:14 /etc/samba/smb.conf root@raspberrypi4:/etc/samba# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/loop0p2 ext4 3.7G 3.5G 81M 98% / udev devtmpfs 1.8G 0 1.8G 0% /dev nas-27-59-FD:/data/tmp/source/raspberrypi/4-07 nfs 5.5T 3.7T 1.9T 67% /mnt/compile root@raspberrypi4:/etc/samba# root@raspberrypi4:/etc/samba# compile finish bash: compile: command not found root@raspberrypi4:/etc/samba# exit exit pi@raspberrypi4:~/rpi_mnt $ cd pi@raspberrypi4:~ $ sudo umount ~/rpi_mnt/mnt/compile pi@raspberrypi4:~ $ sudo umount ~/rpi_mnt/dev/pts pi@raspberrypi4:~ $ sudo umount ~/rpi_mnt/proc pi@raspberrypi4:~ $ sudo umount ~/rpi_mnt/sys pi@raspberrypi4:~ $ sudo umount ~/rpi_mnt/dev pi@raspberrypi4:~ $ sudo umount ~/rpi_mnt pi@raspberrypi4:~ $ sudo losetup -d /dev/loop0 pi@raspberrypi4:~ $