No internet connection
  1. Home
  2. General

tinypilot systemd unit will not start successfully after rebooting in USB Virtual Media mode

By @luckman212
    2024-04-18 19:34:26.594Zassigned to
    • @cghague

    Voyager 2a version 2.6.3

    I just realized I cannot reboot successfully after enabling USB Virtual Media mode.

    I followed the steps, and everything "works". I can see the USB drive (/dev/sda1) mounted to /media/tinypilot-mass-storage. Here's some output:

    # whoami
    root
    
    root@tinypilot:~# lsblk -o NAME,SIZE,VENDOR,MODEL,LABEL,UUID
    NAME          SIZE VENDOR   MODEL            LABEL  UUID
    sda         116.6G SanDisk  SanDisk_3.2_Gen1
    └─sda1      116.6G                                  7ED8-AF84
    mmcblk0      29.1G
    ├─mmcblk0p1   256M                           bootfs 9E81-4F92
    └─mmcblk0p2  28.9G                           rootfs cf2895ca-6dc2-4797-8040-f76ba1508f41
    
    # UUID=$(lsblk -o UUID -r /dev/sda1 | tail -1)
    # /opt/tinypilot-privileged/scripts/move-virtual-media-to-disk --uuid $UUID
    UUID=7ED8-AF84	/media/tinypilot-mass-storage	vfat	defaults,gid=tinypilot,uid=tinypilot	0	0
    sending incremental file list
    Virtual media has been moved successfully.
    
    # mount -t vfat
    /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
    /dev/sda1 on /media/tinypilot-mass-storage type vfat (rw,relatime,uid=111,gid=116,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
    

    BUT, once I reboot, the TinyPilot service never starts again and I get the WSOD (white screen of death).

    At this point I can ssh in (thankfully) and revert back to the default mode with /opt/tinypilot-privileged/scripts/restore-default-virtual-media-location, after which the service immediately starts up (no reboot required) and all is well.

    Here's a screenshot from journalctl -u tinypilot.service :

    Any way to troubleshoot further?

    • 4 replies
    1. C

      Hi, @luckman212. Thank you for your message and the detailed investigation notes; they were very useful. I've removed the other thread as it's the same issue, and keeping everything in one place is helpful.

      I've reproduced this issue in my test environment and can confirm that it occurs only when virtual media isn't in the standard location. I've created an internal issue for our development team to investigate and fix the bug.

      The bug could affect any TinyPilot device with virtual media stored on a USB drive, regardless of whether the read-only filesystem is enabled. I appreciate it's a hassle, but I'd recommend keeping your virtual media on the microSD card until a fix is released.

      Unfortunately, I'm not aware of any workaround at the moment, but should one become available, I'll update this thread.

      1. L
        In reply toluckman212:
        @luckman212
          2024-04-19 03:02:30.631Z

          Ok, thanks for the info there.

          As for the removal of the other thread (which was about using USB Virtual Media together with Read-only Filesystem enabled) is that a non-issue? i.e. when THIS issue is solved, then there will be no problem in using these 2 features together? Or was I correct in the other thread with the assumption that I would need to configure USB external storage first, and THEN enable RoFS after?

          1. Thanks for getting back to me.

            My apologies for not being clearer - for the avoidance of doubt, I can confirm that I've tested this on an older version of TinyPilot that doesn't suffer from the bug, and you can indeed relocate virtual media to a USB drive and use the read-only filesystem simultaneously.

            1. L@luckman212
                2024-04-19 21:42:34.517Z

                Great, thanks & I appreciate that.