sudo mkdir -p ~/rpi_mnt pi@raspberrypi4:~ $ sudo losetup -f -P --show /mnt/runimg/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 3940 Jan 4 13:31 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 154 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 1 1970 sys dr-xr-xr-x 9 nobody root 4096 Jan 3 18:21 tftpboot drwxrwxrwt 7 root root 4096 Jan 3 18:21 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 01:31:20 PM JST root@raspberrypi4:/# root@raspberrypi4:/# root@raspberrypi4:/# pwd / root@raspberrypi4:/# cd /var/cache/apt/archives root@raspberrypi4:/var/cache/apt/archives# ls -l total 53244 -rw-r--r-- 1 root root 39352 Mar 13 2019 attr_1%3a2.4.48-4_armhf.deb -rw-r--r-- 1 root root 586940 Jun 23 2019 bind9_1%3a9.11.5.P4+dfsg-5.1_armhf.deb -rw-r--r-- 1 root root 421568 Jun 23 2019 bind9utils_1%3a9.11.5.P4+dfsg-5.1_armhf.deb -rw-r--r-- 1 root root 56664 Feb 21 2019 binfmt-support_2.2.0-2_armhf.deb -rw-r--r-- 1 root root 9766 Dec 3 2013 chkconfig_11.4.54.60.1debian1_all.deb -rw-r--r-- 1 root root 5396 Mar 24 2019 dns-root-data_2019031302_all.deb -rw-r--r-- 1 root root 360740 Jun 23 2019 dnsutils_1%3a9.11.5.P4+dfsg-5.1_armhf.deb -rw-r--r-- 1 root root 1871400 Sep 3 2018 gparted_0.32.0-2_armhf.deb -rw-r--r-- 1 root root 20204 Feb 13 2019 ibverbs-providers_22.1-1_armhf.deb -rw-r--r-- 1 root root 60992 Jan 26 2019 insserv_1.18.0-2_armhf.deb -rw-r--r-- 1 root root 460764 Dec 18 2018 isc-dhcp-server_4.4.1-2_armhf.deb -rw-r--r-- 1 root root 83276 Nov 25 2018 libapr1_1.6.5-1_armhf.deb -rw-r--r-- 1 root root 81748 Apr 26 2019 libaprutil1_1.6.1-4_armhf.deb -rw-r--r-- 1 root root 58612 Jan 3 2019 libatkmm-1.6-1v5_2.28.0-2_armhf.deb -rw-r--r-- 1 root root 226168 Feb 8 2019 libboost-atomic1.67.0_1.67.0-13_armhf.deb -rw-r--r-- 1 root root 244512 Feb 8 2019 libboost-iostreams1.67.0_1.67.0-13_armhf.deb -rw-r--r-- 1 root root 429920 Feb 8 2019 libboost-regex1.67.0_1.67.0-13_armhf.deb -rw-r--r-- 1 root root 228432 Feb 8 2019 libboost-system1.67.0_1.67.0-13_armhf.deb -rw-r--r-- 1 root root 260128 Feb 8 2019 libboost-thread1.67.0_1.67.0-13_armhf.deb -rw-r--r-- 1 root root 57760 Jan 3 2019 libcairomm-1.0-1v5_1.12.2-4_armhf.deb -rw-r--r-- 1 root root 379620 Apr 12 2019 libcephfs2_12.2.11+dfsg1-2.1+rpi1_armhf.deb -rw-r--r-- 1 root root 2523788 Apr 20 2019 libgfapi0_5.5-3_armhf.deb -rw-r--r-- 1 root root 2506104 Apr 20 2019 libgfrpc0_5.5-3_armhf.deb -rw-r--r-- 1 root root 2487852 Apr 20 2019 libgfxdr0_5.5-3_armhf.deb -rw-r--r-- 1 root root 637764 Jan 3 2019 libglibmm-2.4-1v5_2.58.0-2_armhf.deb -rw-r--r-- 1 root root 2723856 Apr 20 2019 libglusterfs0_5.5-3_armhf.deb -rw-r--r-- 1 root root 230092 Jan 26 2019 libgpgme11_1.12.0-6_armhf.deb -rw-r--r-- 1 root root 691664 Feb 11 2019 libgtkmm-2.4-1v5_1%3a2.24.5-4_armhf.deb -rw-r--r-- 1 root root 43536 Feb 13 2019 libibverbs1_22.1-1_armhf.deb -rw-r--r-- 1 root root 234764 Jun 23 2019 libirs161_1%3a9.11.5.P4+dfsg-5.1_armhf.deb -rw-r--r-- 1 root root 234000 Jun 23 2019 libirs-export161_1%3a9.11.5.P4+dfsg-5.1_armhf.deb -rw-r--r-- 1 root root 254016 Jun 23 2019 libisccfg-export163_1%3a9.11.5.P4+dfsg-5.1_armhf.deb -rw-r--r-- 1 root root 51356 Jan 3 2019 libpangomm-1.4-1v5_2.42.0-2_armhf.deb -rw-r--r-- 1 root root 2337136 Apr 12 2019 librados2_12.2.11+dfsg1-2.1+rpi1_armhf.deb -rw-r--r-- 1 root root 102956 Jun 3 2015 libreadline5_5.2+dfsg-3_armhf.deb -rw-r--r-- 1 root root 45568 Nov 2 2018 libserf-1-1_1.3.9-7_armhf.deb -rw-r--r-- 1 root root 62092 Jan 3 2019 libsigc++-2.0-0v5_2.10.1-2_armhf.deb -rw-r--r-- 1 root root 1174148 Aug 1 13:08 libsvn1_1.10.4-1+deb10u1_armhf.deb -rw-r--r-- 1 root root 52648 May 13 2019 libutf8proc2_2.3.0-1_armhf.deb -rw-r----- 1 root root 0 Sep 26 09:31 lock -rw-r--r-- 1 root root 107476 Apr 12 2019 nfs-kernel-server_1%3a1.3.4-2.5_armhf.deb drwx------ 2 _apt root 4096 Jan 3 17:46 partial -rw-r--r-- 1 root root 463212 Jun 5 2018 policycoreutils_2.8-1_armhf.deb -rw-r--r-- 1 root root 155856 Feb 27 2019 pxelinux_3%3a6.04~git20190206.bf6db5b4+dfsg1-1_all.deb -rw-r--r-- 1 root root 65132 Jul 26 2018 python3-ply_3.11-3_all.deb -rw-r--r-- 1 root root 90096 Dec 23 2018 python-dnspython_1.16.0-1_all.deb -rw-r--r-- 1 root root 275348 Jan 26 2019 python-gpg_1.12.0-6_armhf.deb -rw-r--r-- 1 root root 33128 Apr 8 2019 python-ldb_2%3a1.5.1+really1.4.6-3_armhf.deb -rw-r--r-- 1 root root 1793956 Sep 5 04:57 python-samba_2%3a4.9.5+dfsg-5+deb10u1+rpi1_armhf.deb -rw-r--r-- 1 root root 16012 Dec 20 2018 python-tdb_1.3.16-2+b1_armhf.deb -rw-r--r-- 1 root root 69444 Sep 3 13:08 qemu_1%3a3.1+dfsg-8+deb10u2_armhf.deb -rw-r--r-- 1 root root 15767968 Sep 3 13:08 qemu-user-static_1%3a3.1+dfsg-8+deb10u2_armhf.deb -rw-r--r-- 1 root root 1009768 Sep 5 04:57 samba_2%3a4.9.5+dfsg-5+deb10u1+rpi1_armhf.deb -rw-r--r-- 1 root root 169840 Sep 5 04:57 samba-common_2%3a4.9.5+dfsg-5+deb10u1+rpi1_all.deb -rw-r--r-- 1 root root 569796 Sep 5 04:57 samba-common-bin_2%3a4.9.5+dfsg-5+deb10u1+rpi1_armhf.deb -rw-r--r-- 1 root root 344812 Sep 5 04:57 samba-dsdb-modules_2%3a4.9.5+dfsg-5+deb10u1+rpi1_armhf.deb -rw-r--r-- 1 root root 400424 Sep 5 04:57 samba-vfs-modules_2%3a4.9.5+dfsg-5+deb10u1+rpi1_armhf.deb -rw-r--r-- 1 root root 94160 Dec 20 2018 selinux-utils_2.8-1+b1_armhf.deb -rw-r--r-- 1 root root 418920 Sep 5 04:57 smbclient_2%3a4.9.5+dfsg-5+deb10u1+rpi1_armhf.deb -rw-r--r-- 1 root root 11174 Jul 8 2016 sshpass_1.06-1_armhf.deb -rw-r--r-- 1 root root 20836 Apr 29 2017 ssl-cert_1.0.39_all.deb -rw-r--r-- 1 root root 984636 Aug 1 13:08 subversion_1.10.4-1+deb10u1_armhf.deb -rw-r--r-- 1 root root 1237312 Feb 27 2019 syslinux-common_3%3a6.04~git20190206.bf6db5b4+dfsg1-1_all.deb -rw-r--r-- 1 root root 26860 Dec 20 2018 tdb-tools_1.3.16-2+b1_armhf.deb -rw-r--r-- 1 root root 17244 Dec 19 2018 tftp_0.17-22_armhf.deb -rw-r--r-- 1 root root 16388 Dec 19 2018 tftpd_0.17-22_armhf.deb -rw-r--r-- 1 root root 27816 Sep 29 2018 update-inetd_4.49_all.deb -rw-r--r-- 1 root root 1005252 Jun 18 2019 vim_2%3a8.1.0875-5_armhf.deb -rw-r--r-- 1 root root 5774604 Jun 16 2019 vim-runtime_2%3a8.1.0875-5_all.deb -rw-r--r-- 1 root root 136996 Mar 16 2019 vsftpd_3.0.3-12_armhf.deb -rw-r--r-- 1 root root 809028 Mar 9 2019 xfsprogs_4.20.0-1_armhf.deb -rw-r--r-- 1 root root 122812 Mar 12 2018 xinetd_1%3a2.3.15.3-1_armhf.deb root@raspberrypi4:/var/cache/apt/archives# apt-get remove tftp tftpd Reading package lists... 0%Reading package lists... 100%Reading package lists... Done Building dependency tree... 0%Building dependency tree... 0%Building dependency tree... 50%Building dependency tree... 50%Building dependency tree Reading state information... 0%Reading state information... 0%Reading state information... Done The following packages will be REMOVED: tftp tftpd 0 upgraded, 0 newly installed, 2 to remove and 132 not upgraded. After this operation, 82.9 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 98120 files and directories currently installed.) Removing tftp (0.17-22) ... Removing tftpd (0.17-22) ... Running in chroot, ignoring request. Processing triggers for man-db (2.8.5-2) ... root@raspberrypi4:/var/cache/apt/archives# root@raspberrypi4:/var/cache/apt/archives# scp scp -p pi@raspberry1:/var/cache/apt/archives/tftp* ./scp -p pi@raspberry1:/var/cache/apt/archives/tftp* ./ The authenticity of host 'raspberry1 (192.168.1.251)' can't be established. ECDSA key fingerprint is SHA256:8Cz+xDzeHoMXrg+2ESRLVM8B5k3u/xSMFLkUs+KMzGo. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'raspberry1,192.168.1.251' (ECDSA) to the list of known hosts. pi@raspberry1's password: tftp_0.17-18_armhf.deb 0% 0 0.0KB/s --:-- ETAtftp_0.17-18_armhf.deb 100% 17KB 5.8MB/s 00:00 tftpd_0.17-18_armhf.deb 0% 0 0.0KB/s --:-- ETAtftpd_0.17-18_armhf.deb 100% 16KB 6.3MB/s 00:00 root@raspberrypi4:/var/cache/apt/archives# ls -dpkg -i tftp_0.17-18_armhf.deb Selecting previously unselected package tftp. (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 98104 files and directories currently installed.) Preparing to unpack tftp_0.17-18_armhf.deb ... Unpacking tftp (0.17-18) ... Setting up tftp (0.17-18) ... Processing triggers for man-db (2.8.5-2) ... root@raspberrypi4:/var/cache/apt/archives# dpkg -i tftpd_0.17-18_armhf.deb Selecting previously unselected package tftpd. (Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 98112 files and directories currently installed.) Preparing to unpack tftpd_0.17-18_armhf.deb ... Unpacking tftpd (0.17-18) ... Setting up tftpd (0.17-18) ... Note: xinetd currently is not fully supported by update-inetd. Please consult /usr/share/doc/xinetd/README.Debian and itox(8). update-inetd: warning: cannot add service, /etc/inetd.conf does not exist Running in chroot, ignoring request. Processing triggers for man-db (2.8.5-2) ... root@raspberrypi4:/var/cache/apt/archives# root@raspberrypi4:/var/cache/apt/archives# root@raspberrypi4:/var/cache/apt/archives# compile finish bash: compile: command not found root@raspberrypi4:/var/cache/apt/archives# 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:~ $