sed -i "s|^\(eval.\+\)$|#\1|g" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ sed -i "s|^\(export DISPLAY.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "s|^\(eval.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "s|^\(sleep.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "s|^\(lxpanelctl.\+\)$|#\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ ls -l /media/netdir/source/raspberrypi total 0 drwxrwxrwx+ 1 systemd-network users 18 Dec 6 19:53 3 drwxrwxrwx+ 1 pi pi 18 Dec 30 09:59 4-01 drwxrwxrwx+ 1 pi pi 18 Dec 30 15:26 4-02 drwxrwxrwx+ 1 pi pi 18 Dec 30 20:46 4-03 drwxrwxrwx+ 1 systemd-timesync 98 18 Dec 31 15:39 4-04 drwxrwxrwx+ 1 99 99 18 Jan 1 21:05 4-05 drwxrwxrwx+ 1 99 99 18 Jan 2 08:03 4-06 drwxrwxrwx+ 1 pi pi 18 Jan 2 11:08 4-07 drwxrwxrwx+ 1 99 99 18 Dec 6 19:46 org pi@raspberrypi4:~ $ mkdir -p /media/netdir/source/raspberrypi/4-07 pi@raspberrypi4:~ $ inset_line=`grep -n systemd-nspawn /home/pi/vdesktop/vdesktop | tail -1 | cut -f 1 -d:` pi@raspberrypi4:~ $ let inset_line2=inset_line+1 pi@raspberrypi4:~ $ sed -i "${inset_line2}iumount \${mntpnt}/mnt/compile" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ sed -i "${inset_line}imount --bind /media/netdir/source/raspberrypi/4-07 \${mntpnt}/mnt/compile" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ sed -i "${inset_line}imkdir -p \${mntpnt}/mnt/compile" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ ls -l /mnt/runimg total 46259752 -rwxrwxrwx+ 1 systemd-network users 1939865600 Dec 21 22:50 2012-07-15-wheezy-raspbian.img -rwxrwxrwx+ 1 systemd-network users 1939865600 Dec 21 00:08 2013-02-09-wheezy-raspbian.img -rwxrwxrwx+ 1 systemd-network users 2962227200 Dec 20 23:26 2013-12-20-wheezy-raspbian.img -rwx------+ 1 99 99 8956451117 Jan 1 23:29 2017-07-05-raspbian-jessie_compile-armel.img -rwxrwxrwx+ 1 99 99 4555014144 Dec 31 22:50 2019-04-08-raspbian-stretch_chroot.img -rwxrwxrwx+ 1 systemd-timesync 98 3481272320 Jan 2 10:18 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 2 22:04 2019-09-26-raspbian-buster_jin.img -rwx------+ 1 99 99 3829399552 Sep 26 01:31 2019-09-26-raspbian-buster_test.img drwxrwxrwx+ 1 root root 160 Dec 19 22:41 bak -rw-r--r--+ 1 systemd-timesync 98 867172352 Dec 27 22:23 Debian-testing-armmp_2019-12-27T221219.img -rw-r--r--+ 1 99 99 764411904 Dec 23 10:06 Raspbian-stretch-rpix_2019-12-22T225115.img -rw-rw-rw-+ 1 99 99 8589934592 Jan 1 19:02 raspi-test-armel.img -rw-rw-rw-+ 1 99 99 2173698048 Jan 2 13:14 test2.img pi@raspberrypi4:~ $ sudo /home/pi/vdesktop/vdesktop /mnt/runimg/2019-09-26-raspbian-buster_test.img OK, looks like you specified an .img file. e2fsck 1.44.5 (15-Dec-2018) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information rootfs: 106605/217296 files (0.2% non-contiguous), 716178/868352 blocks /mnt/runimg/2019-09-26-raspbian-buster_test.img mounted on /mnt/virtualdesktop Your cursor color will be blue until the container is terminated. Booting in 5 seconds. Spawning container virtualdesktop on /mnt/virtualdesktop. Press ^] three times within 1s to kill container. systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) Detected virtualization systemd-nspawn. Detected architecture arm. Failed to create symlink /sys/fs/cgroup/net_prio: Read-only file system Welcome to Raspbian GNU/Linux 10 (buster)! Set hostname to . Initializing machine ID from container UUID. File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling. Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.) [ OK ] Listening on Syslog Socket. [ OK ] Reached target Swap. [ OK ] Listening on initctl Compatibility Named Pipe. [UNSUPP] Starting of /dev/serial1 not supported. [DEPEND] Dependency failed for Configure Bluetooth Modems connected by UART. hciuart.service: Job hciuart.service/start failed with result 'dependency'. [ OK ] Created slice system-getty.slice. [ OK ] Created slice User and Session Slice. [ OK ] Started Forward Password Requests to Wall Directory Watch. [ OK ] Reached target Slices. [ OK ] Listening on Journal Socket. Starting Set the console keyboard layout... Starting Remount Root and Kernel File Systems... Mounting FUSE Control File System... Starting Restore / save the current clock... Starting Helper to synchronize boot up for ifupdown... Mounting RPC Pipe File System... [ OK ] Listening on Journal Socket (/dev/log). Starting Journal Service... [ OK ] Mounted FUSE Control File System. [ OK ] Mounted RPC Pipe File System. [ OK ] Started Helper to synchronize boot up for ifupdown. [ OK ] Started Journal Service. [FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details. Starting Create System Users... Starting Flush Journal to Persistent Storage... [ OK ] Started Restore / save the current clock. [ OK ] Started Flush Journal to Persistent Storage. [ OK ] Started Create System Users. Starting Create Static Device Nodes in /dev... [ OK ] Started Set the console keyboard layout. [ OK ] Started Create Static Device Nodes in /dev. [ OK ] Started Dispatch Password Requests to Console Directory Watch. [ OK ] Reached target Local Encrypted Volumes. [ OK ] Reached target Paths. [ OK ] Reached target Local File Systems (Pre). [ OK ] Reached target Local File Systems. Starting Raise network interfaces... Starting Preprocess NFS configuration... Starting Create Volatile Files and Directories... Starting Tell Plymouth To Write Out Runtime Data... Starting 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 Set console font and keymap. [ OK ] Started Tell Plymouth To Write Out Runtime Data. [ OK ] Started Create Volatile Files and Directories. Starting Update UTMP about System Boot/Shutdown... [ OK ] Reached target System Time Synchronized. [ OK ] Started Update UTMP about System Boot/Shutdown. [ OK ] Reached target System Initialization. [ OK ] Started Daily rotation of log files. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Started Daily apt download activities. [ OK ] Started Daily apt upgrade and clean activities. [ OK ] Listening on triggerhappy.socket. [ OK ] Started Daily man-db regeneration. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Reached target Timers. [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting Avahi mDNS/DNS-SD Stack... Starting Check for v3d driver... Starting System Logging Service... Starting Login Service... Starting triggerhappy global hotkey daemon... Starting dphys-swapfile - set up, mount/unmount, and delete a swap file... [ OK ] Started D-Bus System Message Bus. Starting Check for Raspberry Pi EEPROM updates... Starting rng-tools.service... Starting LSB: Resize the root filesystem to fill partition... Starting Disk Manager... Starting LSB: Switch to ondemand cpu governor (unless shift key is pressed)... Starting WPA supplicant... [ OK ] Started Regular background program processing daemon. Starting dhcpcd on all interfaces... Starting Regenerate SSH host keys... [FAILED] Failed to start rng-tools.service. See 'systemctl status rng-tools.service' for details. [ OK ] Started Login Service. [ OK ] Started triggerhappy global hotkey daemon. [ OK ] Started System Logging Service. [ OK ] Started Raise network interfaces. [ OK ] Started Check for v3d driver. [ OK ] Started Check for Raspberry Pi EEPROM updates. [ OK ] Started dhcpcd on all interfaces. [FAILED] Failed to start dphys-swapfile - set up, mount/unmount, and delete a swap file. See 'systemctl status dphys-swapfile.service' for details. [ OK ] Started WPA supplicant. [ OK ] Started Avahi mDNS/DNS-SD Stack. [ OK ] Started LSB: Switch to ondemand cpu governor (unless shift key is pressed). Starting Authorization Manager... [ OK ] Reached target Network. Starting Permit User Sessions... Starting /etc/rc.local Compatibility... [FAILED] Failed to start LSB: Resize the root filesystem to fill partition. See 'systemctl status resize2fs_once.service' for details. [ OK ] Started Permit User Sessions. Starting Light Display Manager... My IP address is 192.168.1.254 [ OK ] Started Authorization Manager. [ OK ] Started Light Display Manager. [ OK ] Started Disk Manager. [ OK ] Stopped Light Display Manager. Starting Light Display Manager... [ OK ] Started Light Display Manager. [ OK ] Stopped Light Display Manager. Starting Light Display Manager... [ OK ] Started Light Display Manager. [ OK ] Stopped Light Display Manager. Starting Light Display Manager... [ OK ] Started Light Display Manager. [ OK ] Stopped Light Display Manager. Starting Light Display Manager... [ OK ] Started Light Display Manager. [ OK ] Stopped Light Display Manager. [FAILED] Failed to start Light Display Manager. See 'systemctl status lightdm.service' for details. [ OK ] Started Regenerate SSH host keys. Message from virtualdesktop: Log in as user pi using the guest's password. (default is raspberry) Once you login, the graphical desktop will load automatically. [ OK ] Started /etc/rc.local Compatibility. Starting Hold until boot process finishes up... Starting Terminate Plymouth Boot Screen... [ OK ] Started Hold until boot process finishes up. [ OK ] Started Console Getty. [ OK ] Reached target Login Prompts. [ OK ] Started Terminate Plymouth Boot Screen. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Raspbian GNU/Linux 10 raspberrypi console raspberrypi login: pi Password: Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 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. pi@raspberrypi:~ $ sudo passwd pi New password: Retype new password: passwd: password updated successfully pi@raspberrypi:~ $ sudo passwd root New password: Retype new password: passwd: password updated successfully pi@raspberrypi:~ $ date Thu 2 Jan 22:12:31 JST 2020 pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ compile finish -bash: compile: command not found pi@raspberrypi:~ $ shutdown -h now pi@raspberrypi:~ $ Stopping Session c1 of user pi. Stopping Authorization Manager... [ OK ] Stopped target Timers. [ OK ] Stopped Daily man-db regeneration. [ OK ] Stopped Daily apt upgrade and clean activities. [ OK ] Stopped Daily apt download activities. [ OK ] Stopped Daily Cleanup of Temporary Directories. Unmounting RPC Pipe File System... [ OK ] Removed slice system-getty.slice. [ OK ] Stopped target Graphical Interface. Stopping Disk Manager... [ OK ] Stopped target Multi-User System. Stopping Avahi mDNS/DNS-SD Stack... Stopping Regular background program processing daemon... Stopping triggerhappy global hotkey daemon... [ OK ] Stopped Check for Raspberry Pi EEPROM updates. [ OK ] Stopped Check for v3d driver. [ OK ] Stopped Daily rotation of log files. Stopping LSB: Switch to ondemand cpu governor (unless shift key is pressed)... Stopping System Logging Service... [ OK ] Stopped target Login Prompts. Stopping Console Getty... [ OK ] Stopped target System Time Synchronized. [ OK ] Stopped System Logging Service. [ OK ] Stopped triggerhappy global hotkey daemon. [ OK ] Stopped Regular background program processing daemon. [ OK ] Stopped Console Getty. [ OK ] Stopped Avahi mDNS/DNS-SD Stack. [ OK ] Stopped Session c1 of user pi. [ OK ] Stopped Disk Manager. [ OK ] Stopped Authorization Manager. Stopping User Manager for UID 1000... Stopping Login Service... [ OK ] Stopped /etc/rc.local Compatibility. [ OK ] Unmounted RPC Pipe File System. [ OK ] Stopped LSB: Switch to ondemand cpu governor (unless shift key is pressed). [ OK ] Stopped Login Service. [ OK ] Stopped User Manager for UID 1000. Stopping User Runtime Directory /run/user/1000... [ OK ] Unmounted /run/user/1000. [ OK ] Stopped User Runtime Directory /run/user/1000. [ OK ] Removed slice User Slice of UID 1000. Stopping Permit User Sessions... [ OK ] Stopped Permit User Sessions. [ OK ] Stopped target Remote File Systems. Unmounting /mnt/compile... [ OK ] Unmounted /mnt/compile. [ OK ] Stopped target Network. Stopping Raise network interfaces... Stopping WPA supplicant... Stopping dhcpcd on all interfaces... [ OK ] Stopped target Remote File Systems (Pre). [ OK ] Stopped target NFS client services. [ OK ] Stopped WPA supplicant. Stopping D-Bus System Message Bus... [ OK ] Stopped D-Bus System Message Bus. [ OK ] Stopped Raise network interfaces. [ OK ] Stopped dhcpcd on all interfaces. [ OK ] Stopped target Basic System. [ OK ] Stopped target Paths. [ OK ] Stopped target Sockets. [ OK ] Closed triggerhappy.socket. [ OK ] Closed Syslog Socket. [ OK ] Closed Avahi mDNS/DNS-SD Stack Activation Socket. [ OK ] Closed D-Bus System Message Bus Socket. [ OK ] Stopped target Slices. [ OK ] Removed slice User and Session Slice. [ OK ] Stopped target System Initialization. [ OK ] Stopped target Local Encrypted Volumes. [ OK ] Stopped Forward Password Requests to Wall Directory Watch. [ OK ] Stopped Dispatch Password Requests to Console Directory Watch. Stopping Update UTMP about System Boot/Shutdown... Stopping Restore / save the current clock... [ OK ] Stopped Restore / save the current clock. [ OK ] Stopped Update UTMP about System Boot/Shutdown. [ OK ] Stopped Create Volatile Files and Directories. [ OK ] Stopped target Local File Systems. Unmounting /run/systemd/nspawn/incoming... Unmounting /tmp... Unmounting /etc/profile... Unmounting /etc/rc.local... [FAILED] Failed unmounting /tmp. [ OK ] Unmounted /etc/rc.local. [ OK ] Unmounted /run/systemd/nspawn/incoming. [ OK ] Unmounted /etc/profile. [ OK ] Reached target Unmount All Filesystems. [ OK ] Stopped target Local File Systems (Pre). [ OK ] Stopped Create Static Device Nodes in /dev. [ OK ] Stopped Create System Users. [ OK ] Stopped target Swap. [ OK ] Reached target Shutdown. [ OK ] Reached target Final Step. [ OK ] Started Power-Off. [ OK ] Reached target Power-Off. Container virtualdesktop has been shut down. pi@raspberrypi4:~ $ sed -i "s|^#\+\(eval.\+\)$|\1|g" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ sed -i "s|^#\+\(export DISPLAY.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "s|^#\+\(eval.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "s|^#\+\(sleep.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "s|^#\+\(lxpanelctl.\+\)$|\1|g" /home/pi/vdesktop/profile pi@raspberrypi4:~ $ sed -i "${inset_line}d" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ sed -i "${inset_line}d" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $ sed -i "${inset_line2}d" /home/pi/vdesktop/vdesktop pi@raspberrypi4:~ $