4

I have an SD card formatted as ext4 for use with SteamOS and EmuDeck. I want to add files to this SD card from my Windows 11 PC using a SD to USB adapter. Most of the the ext4 programs I've found only support reading without writing. WSL2 doesn't support mounting USB drives. I can't switch my drive format to NTFS as it's not compatible with EmuDeck.

How do I write files to an ext4 partition on a USB drive in Windows 11?

Note: This differs from How to read ext4 partitions on Windows? which only covers reading from ext4 partitions. The linked question was also asked in 2009, meaning several of the answers are outdated and no longer work.

Stevoisiak
  • 13,555
  • 39
  • 101
  • 154
  • 1
    The easiest way is to install any mainstream Linux distro like Ubuntu as a VM so you have a normal graphical desktop. Second best thing is what was suggested in the answer. – ChanganAuto Oct 19 '22 at 17:49
  • Have you checked whether wsl mount with `--bare` instead of `--partition N` works? (You probably need to perform some `mount` command from within WSL after that.) – Tom Yan Oct 27 '22 at 03:40
  • You can setup a middle man system to read and write to/from the sd card. For example, using a raspberry pi setup as a simple file server and have the card connected to it. – CecilMerrell aka bringrainfire Oct 27 '22 at 06:55

2 Answers2

1

You need an ext4 file system driver for windows. As others stated, windows doesn't have this built in. But there are third-party solutions for this. For read and write access I'm only aware of this:
Linux File Systems for Windows by Paragon Software

They provide a trial for 10 days.

I'm not affiliated with this company. I just use their tools on a occasional basis.

Previous versions (2.1.440) of this tool seemed to be free for private use. Probably your favorite software/utility download site has it. I found it on this site: wintotal (sorry it's in german).

Tom Yan
  • 9,075
  • 2
  • 17
  • 36
0

Windows cannot write to EXT4, because this is a journaling file-system that Windows has not fully implemented. This is why writing is much more difficult than reading.

You have two options :

However, my preference would have been to rather use a file-system format that is fully supported by both operating systems, such as NTFS, exFAT or the limited FAT32.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • 1
    For a dual-boot Windows+Linux I often recommend a NTFS or extFAT data partition. But in this case the OP has a very good reason to keep EXT4 and that reason being SteamOS and the SD card not being a shared drive. – ChanganAuto Oct 19 '22 at 17:48
  • 1
    Updated question to clarify WSL2 won't work because it [doesn't support USB drives](https://github.com/microsoft/WSL/issues/6011). – Stevoisiak Oct 19 '22 at 17:50
  • See [this link](https://www.reddit.com/r/SteamOS/comments/1t23sj/has_anyone_been_able_to_mount_any_ntfs_drives_in/) for a method of mounting NTFS in SteamOS. Although an old article, it might still work. – harrymc Oct 19 '22 at 17:58
  • 1
    @harrymc SteamOS or any Steam client in any supported OS including Linux always supported installing games in NTFS, that isn't and never was the question. The performance is better with EXT4 in Linux and SteamOS is Linux. Again, the OP shouldn't have to change to a sub-optimal proprietary file system. And considering what Stevoisiak posted above the only good answer is a VM. – ChanganAuto Oct 19 '22 at 23:22
  • @harrymc as the WSL solution does not work, would you mind editing your answer in that regard? – mashuptwice Oct 20 '22 at 02:58
  • @ChanganAuto: As this is a slow USB device, there shouldn't be a performance difference between NTFS and EXT4. Actually, a non-journaling file-system like exFAT might do better on write (less I/O). – harrymc Oct 20 '22 at 08:00
  • *"Windows cannot write to EXT4, because this is a journaling file-system that Windows has not fully implemented."* : AFAIK Windows (WSL apart I mean) does not implement ext4 **at all**, neither reading nor writing. – PierU Oct 20 '22 at 08:20
  • only ext4 has terrible Windows drivers. [ZFS](https://github.com/openzfsonwindows/ZFSin) and [Btrfs](https://github.com/maharmstone/btrfs) have very good Windows drivers so I'll avoid ext4 at all for cross-platform support. NTFS is also possible but only with the new Linux kernel driver, ntfs-3g is extremely slow so just ignore it. It's also possible to [connect a USB drive to WSL2](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) – phuclv Oct 27 '22 at 01:22
  • @PierU WSL2 uses the real Linux kernel so [obviously it supports ext4](https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk), did you even read the above link? – phuclv Oct 27 '22 at 01:25
  • @phuclv Did you ever read this part of my message: *"WSL apart I mean"*? – PierU Oct 27 '22 at 04:13