1

Hi: I have followed the instructions from here to create a persistent bootable Ubuntu (v22.04.2 LTS) USB flash drive that I am booting through VirtualBox [V7.0.6 r155176 (Qt5.15.2)] on Windows 10

The article mentions:

The usbdata partition will be formatted with the NTFS file system. It will be accessible to Linux, Windows, and macOS. This partition is also available from within the live Ubuntu on the USB drive. This means any files copied to the usbdata partition from another computer will be accessible to your live Ubuntu.

In other words, the usbdata partition acts as a "shared folder" between your live Ubuntu and any other computer you plug your USB drive into

I am not able to get this functionality working fully: Files copied from the Host OS (Windows 10) to the usbdata partition of the USB drive are accessible from the Guest OS (Ubuntu) after a unmount/re-mount exercise (on Ubuntu)

This doesn't work the other way around: files copied from Ubuntu to the usbdata partition do not appear on Windows

Thanks for any help in advance

SRoy
  • 11
  • Nor does the info you posted say it works both ways. – David Apr 06 '23 at 11:18
  • Oh! I took the statement "shared folder between your live Ubuntu and any other computer you plug your USB drive into" to mean 'sharing' happening both ways – SRoy Apr 06 '23 at 11:39
  • https://askubuntu.com/questions/1261998/accessing-persistent-usb-files/1262077#1262077

    says "usbdata partition is accessible to Linux and Windows...."

    – SRoy Apr 06 '23 at 11:44
  • @SRoy, I think your problem is connected to the problem of connecting a USB drive to a virtual machine in VirtualBox. If you use mkusb to create a persistent live system in a USB drive and run it on bare metal, directly boot your computer into it, not via VirtualBox, the usbdata partition with NTFS should be available for file access both ways (to and from Ubuntu, to and from Windows). - If things are configured correctly in VirtualBox, I think it should also work [via VirtualBox], a partition with NTFS should be identified correcly both by Windows and Ubuntu. – sudodus Apr 07 '23 at 09:49
  • 1
    @sudodus thanks I tried to use the same (one that I had) "persistent live system in a USB drive and run it on bare metal": it worked as you mentioned: When I copied files from Ubuntu to the usbdata partition, I could access those files later from a Windows boot While I will continue to search for solutions along the lines that you have mentioned (correct VirtualBox configuration), I tried to copy files from Ubuntu (booted under VirtualBox on Windows) to the other (ext4) partition that mkusb had created: writable (Contd. in next comment) – SRoy Apr 08 '23 at 03:21
  • 1
    @sudodus (Contd. from prev comment) From Windows I used DiskInternals' Linux Reader and could access those files (inputs from here) Request you to kindly suggest if this approach has any associated risks – SRoy Apr 08 '23 at 03:23
  • @SRoy, "Both Linux Reader™ and Linux Reader Pro™ provide you with safe, read-only access to the source drive" looks good. As long as the access is read-only, it should not cause any corruption. But "Moreover, Linux Reader™ and Linux Reader Pro™ bypass file security policies" rings a bell. If you have no classified secrets, it should still be OK. – sudodus Apr 08 '23 at 07:14
  • @SRoy, There might also be a general problem caused by the NTFS file system being 'dirty', an unfinished write process because the drive was unplugged or the operating system was hibernated. In Windows 'Fast Startup' mode is a semi-hiberating mode, which can leave some data to be written in a RAM buffer. See more details at this first link and this second link and links from them. – sudodus Apr 08 '23 at 09:30
  • 1
    @sudodus Thanks a lot for your input: I have now disabled fast startup, sleep, and hibernate. Meanwhile, I have been able to set up a shared folder using VirtualBox taking guidance from this link. – SRoy Apr 11 '23 at 11:08
  • @SRoy, I'm glad that it works for you now and thanks for sharing your solution :-) – sudodus Apr 11 '23 at 11:32

0 Answers0