Score:1

Unable to access files copied (from Ubuntu Live persistent USB) on usbdata partition from Windows

mx flag

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

David avatar
cn flag
Nor does the info you posted say it works both ways.
SRoy avatar
mx flag
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 avatar
mx flag
https://askubuntu.com/questions/1261998/accessing-persistent-usb-files/1262077#1262077 says "usbdata partition is accessible to Linux and Windows...."
sudodus avatar
jp flag
@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.
SRoy avatar
mx flag
@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 avatar
mx flag
@sudodus (Contd. from prev comment) From Windows I used DiskInternals' [Linux Reader](https://www.diskinternals.com/linux-reader/) and could access those files (inputs from [here](https://superuser.com/questions/37512/how-to-read-ext4-partitions-on-windows)) Request you to kindly suggest if this approach has any associated risks
sudodus avatar
jp flag
@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 avatar
jp flag
@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](https://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition/956072#956072) and [this second link](https://askubuntu.com/questions/867202/internal-hard-drive-mounting-as-read-only/867206#867206) and links from them.
SRoy avatar
mx flag
@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](https://askubuntu.com/questions/161759/how-to-access-a-shared-folder-in-virtualbox).
sudodus avatar
jp flag
@SRoy, I'm glad that it works for you now and thanks for sharing your solution :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.