sed -i "s|^\(eval.\+\)$|#\1|g" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ sed -i "s|^\(export DISPLAY.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "s|^\(eval.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "s|^\(sleep.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "s|^\(lxpanelctl.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ ls -l /media/netdir/source/raspberrypi total 0 drwxrwxrwx+ 1 systemd-network users 18 Dec 6 19:53 3 drwxrwxrwx+ 1 99 99 18 Feb 9 21:53 4-01_rasp drwxrwxrwx+ 1 99 99 18 Feb 10 18:45 4-02_readynas drwxrwxrwx+ 1 root root 18 Mar 4 20:08 4-04_docker_readynas drwxrwxrwx+ 1 root root 18 Mar 4 21:58 4-05_chroot_readynas drwxrwxrwx+ 1 99 99 18 Dec 6 19:46 org pi@raspberry48:~ $ mkdir -p /media/netdir/source/raspberrypi/4-05_chroot_readynas pi@raspberry48:~ $ inset_line=`grep -n systemd-nspawn /home/pi/vdesktop/vdesktop | tail -1 | cut -f 1 -d:` pi@raspberry48:~ $ let inset_line2=inset_line+1 pi@raspberry48:~ $ sed -i "${inset_line2}iumount \${mntpnt}/mnt/compile" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ sed -i "${inset_line}imount --bind /media/netdir/source/raspberrypi/4-05_chroot_readynas \${mntpnt}/mnt/compile" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ sed -i "${inset_line}imkdir -p \${mntpnt}/mnt/compile" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ ls -l /mnt/runimg total 18797568 -rwxrwxrwx+ 1 99 99 4555014144 Jan 7 22:32 2019-04-08-raspbian-stretch_chroot.img -rwxrwxrwx+ 1 systemd-timesync 98 3481272320 Feb 9 23:45 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 drwxrwxrwx+ 1 root root 160 Dec 19 22:41 bak -rw-rw-rw-+ 1 99 99 1728053248 Mar 5 00:10 readynas_compile_tool2.img -rw-rw-rw-+ 1 99 99 2173698048 Jan 8 23:25 readynas_compile_tool.img pi@raspberry48:~ $ sudo /home/pi/vdesktop/vdesktop /mnt/runimg/2019-04-08-raspbian-stretch-make-new.img Message from Botspot: Questions or suggestions? https://www.raspberrypi.org/forums/viewtopic.php?&t=251757 OK, looks like you specified a disk image. /dev/loop0 Your cursor color will be blue until the container is terminated. Booting in 5 seconds. Spawning container virtualdesktop on /media/pi/vdesktop. Press ^] three times within 1s to kill container. systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN) Detected virtualization systemd-nspawn. Detected architecture arm. Welcome to Raspbian GNU/Linux 9 (stretch)! Set hostname to . Failed to install release agent, ignoring: No such file or directory [ OK ] Listening on Journal Socket. [UNSUPP] Starting of dev-serial1.device not supported. [DEPEND] Dependency failed for Configure Bluetooth Modems connected by UART. hciuart.service: Job hciuart.service/start failed with result 'dependency'. [ OK ] Listening on /dev/initctl Compatibility Named Pipe. [ OK ] Started Forward Password Requests to Wall Directory Watch. [ OK ] Listening on Syslog Socket. [ OK ] Created slice User and Session Slice. [ OK ] Reached target Swap. [ OK ] Created slice System Slice. Mounting RPC Pipe File System... Starting Set the console keyboard layout... [ OK ] Created slice system-autologin.slice. Starting Remount Root and Kernel File Systems... [ OK ] Listening on Journal Socket (/dev/log). Starting Journal Service... Starting Restore / save the current clock... [ OK ] Reached target Slices. [ OK ] Mounted RPC Pipe File System. [ OK ] Started Journal Service. [FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details. Starting Flush Journal to Persistent Storage... [ OK ] Started Restore / save the current clock. [ OK ] Started Set the console keyboard layout. [ OK ] Reached target Local File Systems (Pre). [ OK ] Reached target Local File Systems. Starting Raise network interfaces... Starting Tell Plymouth To Write Out Runtime Data... Starting Preprocess NFS configuration... Starting Set console font and keymap... Starting Show Plymouth Boot Screen... [ OK ] Started Set console font and keymap. [ OK ] Started Preprocess NFS configuration. [ OK ] Reached target NFS client services. [ OK ] Reached target Remote File Systems (Pre). [ OK ] Reached target Remote File Systems. [ OK ] Started Tell Plymouth To Write Out Runtime Data. [ OK ] Started Flush Journal to Persistent Storage. Starting Create Volatile Files and Directories... [ OK ] Started Show Plymouth Boot Screen. [ OK ] Started Forward Password Requests to Plymouth Directory Watch. [ OK ] Reached target Encrypted Volumes. [ OK ] Reached target Paths. [ OK ] Started Create Volatile Files and Directories. [ OK ] Reached target System Time Synchronized. Starting Update UTMP about System Boot/Shutdown... [ OK ] Started Update UTMP about System Boot/Shutdown. [ OK ] Reached target System Initialization. [ OK ] Listening on triggerhappy.socket. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Started Daily apt download activities. [ OK ] Started Daily apt upgrade and clean activities. [ OK ] Reached target Timers. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting LSB: Resize the root filesystem to fill partition... Starting Check for v3d driver... Starting triggerhappy global hotkey daemon... Starting LSB: Autogenerate and use a swap file... Starting rng-tools.service... Starting Login Service... [ OK ] Started Regular background program processing daemon. Starting System Logging Service... [ OK ] Started D-Bus System Message Bus. Starting dhcpcd on all interfaces... Starting Disable WiFi if country not set... Starting WPA supplicant... Starting LSB: Switch to ondemand cpu governor (unless shift key is pressed)... Starting Avahi mDNS/DNS-SD Stack... [ OK ] Started triggerhappy global hotkey daemon. [ OK ] Started System Logging Service. [ OK ] Started Check for v3d driver. [FAILED] Failed to start rng-tools.service. See 'systemctl status rng-tools.service' for details. [ OK ] Started Disable WiFi if country not set. [ OK ] Started Login Service. [ OK ] Started Raise network interfaces. [ OK ] Started LSB: Switch to ondemand cpu governor (unless shift key is pressed). [ OK ] Started dhcpcd on all interfaces. [ OK ] Started LSB: Autogenerate and use a swap file. [FAILED] Failed to start Avahi mDNS/DNS-SD Stack. See 'systemctl status avahi-daemon.service' for details. [FAILED] Failed to start LSB: Resize the root filesystem to fill partition. See 'systemctl status resize2fs_once.service' for details. [ OK ] Started WPA supplicant. [ OK ] Reached target Network. Starting Permit User Sessions... [ OK ] Reached target Network is Online. Starting Daily apt download activities... Starting /etc/rc.local Compatibility... [ OK ] Started Permit User Sessions. Starting Light Display Manager... My IP address is 192.168.1.248 [ OK ] Started /etc/rc.local Compatibility. Starting Hold until boot process finishes up... Starting Terminate Plymouth Boot Screen... Raspbian GNU/Linux 9 raspberrypi console raspberrypi login: root Password: Last login: Thu Jan 2 10:16:57 JST 2020 on console Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@raspberrypi:~# ls -l total 0 root@raspberrypi:~# echo 00:00:00 00:00:00 root@raspberrypi:~# date Sun 22 Mar 22:50:42 JST 2020 root@raspberrypi:~# root@raspberrypi:~# root@raspberrypi:~# root@raspberrypi:~# root@raspberrypi:~# compile finish -bash: compile: command not found root@raspberrypi:~# shutdown -h now Sending SIGTERM to remaining processes... Sending SIGKILL to remaining processes... Process 331 (plymouthd) has been marked to be excluded from killing. It is running from the root file system, and thus likely to block re-mounting of the root file system to read-only. Please consider moving it into an initrd file system instead. Powering off. Container virtualdesktop has been shut down. The machine has exited, but you can still access the guest. Press Ctrl+C to unmount /media/pi/vdesktop ^C Preparing to exit... Unmounted and exiting... pi@raspberry48:~ $ sed -i "s|^#\+\(eval.\+\)$|\1|g" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ sed -i "s|^#\+\(export DISPLAY.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "s|^#\+\(eval.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "s|^#\+\(sleep.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "s|^#\+\(lxpanelctl.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberry48:~ $ sed -i "${inset_line}d" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ sed -i "${inset_line}d" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $ sed -i "${inset_line2}d" /home/pi/vdesktop/vdesktop pi@raspberry48:~ $