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?

    • 8 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@luckman212
          2024-05-08 13:59:04.287Z

          Hi just checking back on this. I could really use the extra space as I am constantly swapping ISOs on the internal SD. Hoping a fix isn't too far off!

          1. David @david2024-05-09 11:22:07.133Z

            Hi @luckman212, thanks for checking in!

            I've just checked the internal issue and I haven't seen any updates. Unfortunately, I don't have a timeline for fixing this bug. However, I've added a note to the ticket to let the team know you're still looking for a fix.

            If you need extra storage ASAP, one option could be to acquire a microSD card with a larger capacity (256GB for example) to store all of your ISOs.

            I hope that helps! Please let me know if you have any questions.

            1. L@luckman212
                2024-05-10 01:23:36.247Z

                That's true. I ordered a new microSD card, for now. Of course it will be nice when this gets fixed. I downloaded the factory image, is there any way to transfer or preserve the settings when moving to a new SDcard or does it need to be set up from scratch?

                1. David @david2024-05-10 08:54:12.501Z

                  is there any way to transfer or preserve the settings when moving to a new SDcard

                  Unfortunately, there isn't a way to transfer settings when moving to a new SD card, so you'll need to set up the device from scratch.

                  Things like user authentication, SSH config, and third-party software (like Tailscale) will need to be reconfigured. However, some settings are located at /home/tinypilot/settings.yml, but these are mainly video quality settings, so it may be quicker to re-configure these settings instead of copying the file between microSD cards.

                  I hope that helps!

          2. 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.