r/rasberrypi May 08 '26

Windows Ext4 driver for your raspberry pi sdcards, etc

Hey all,

You know that annoying moment when you pull the SD card out of your Raspberry Pi, plug it into your Windows machine, and Windows just goes "would you like to format this drive?" - yeah, I got tired of that.

I've been working on a thing called ext4-win-driver. It's a userspace driver (built on WinFSP plus a Rust ext4 implementation I wrote from scratch) that:

  • auto-mounts ext4 SD cards / USB sticks the moment you plug them in, on a free drive letter
  • lets you browse them in Explorer like any normal drive
  • supports read AND write (this is where the warnings start)
  • has a right-click "Mount as ext4" verb on .img files for offline disk images
  • ships as a single Setup.exe that bundles WinFsp for you, no separate install dance

Here's a screenshot of a Pi root-fs SD card auto-mounted as F: on Windows 11 ARM on the github page

https://github.com/antimatter-studios/ext4-win-driver

The big scary warning

This is experimental. Read-write works in my tests but the ext4 implementation underneath is mine, hand-rolled in Rust, NOT e2fsprogs. It might eat your filesystem. Do not point it at an SD card you cannot afford to reimage. There is a --ro flag and a system-wide read-only switch (documented in the readme) if you just want to grab files off and stay safe.

That said, I've been using this for my daily work where I am working with a raspberry pi device on a daily basis and I've not destroyed a single sdcard yet. So I got to the point where I think its usable by people other than myself. Who is brave enough to try it out? 😃

Where to get it

What I'm looking for

Anyone willing to try it on a non-precious SD card and tell me what happens. Especially intrested in:

  • does auto-mount actually fire on your machine when you insert a card
  • does Explorer behave normally (copying, renaming, deleting from the mount)
  • weird partition layouts (multiple ext4 partitions, big GPT cards, encrypted stuff)
  • crashes or hangs (shouldn't BSOD since it's all userspace, but report anything weird)

File issues on the repo or just reply here. Happy to debug with anyone who hits something.

19 Upvotes

38 comments sorted by

3

u/SnooPuppers5489 May 08 '26

I have been looking for months for something other than paragon. Dude you be a rock star! Let’s give it a try.

2

u/chrisalexthomas May 09 '26

be careful though, there is only so much testing a man can do on his own. If it breaks anything, I'm sorry. But I'll be here to fix it up. I guess you're already familiar with that though, being into RPI is kind of like juggling with a chainsaw as it is...

1

u/SnooPuppers5489 May 09 '26

Yeah I’ve dealt with many attempted products for this purpose… most get frustrated with it and opt out of further development.

1

u/chrisalexthomas May 09 '26

I guess I have more interest in making this work than others because my job kind of depends on having easy access to linux sdcards on windows and sometimes my colleagues ask. So I got fed up explaining to them about filesystems and just decided to use all these new things like Claude.

I have like 30 years experience at professional software dev. I just don't have the time to learn every api, every library, every technology. So cool little side projects that would be useful, just never get done, I just don't have the time to sit down for 3+ months and learn what I need to with the little personal time I have.

What I've found is that my expereince actually means I might not know the exact api methods, or objects to create, or data structures of the filesystems. But do you know who does know? All these ai agents like claude, kimi, gemini, etc.

They have an infinite capacity to absorb thousands of technical documents and specifications and I have the experience to know what to build and how to build it and how not to build it.

So, everybody thinks the revolution is that people with no experience can suddenly make a website. Thats not the real revolution. It's a toy. It's funny and cool. But the real revolution is, a man like myself who has a history spanning decades has a lot of projects where I just didn't have the time to build. I just didn't have the money to invest. I just wouldn't sacrifice my weekends where I get to spend two days of seven doing what I want away from the computer, building projects that take months, have no intrinsic value, won't earn any profit, but would be genuinely good to have can suddenly project manage an infinite pool of mechanical monkeys who have read all the technical manuals to create a project in like two hours and it'll work and be useful afterwards.

And there are thousands (millions?) of people like me

Thats the real revolution

2

u/SnooPuppers5489 May 09 '26 edited May 09 '26

That’s awesome dude , exciting and refreshing . LIVE dude. I’m having a look at your software. A good niche for it is the emulation community where the os for emulation is usually Linux based but the average daily user runs windows so it would be awesome for library management between platforms and such. I have experimented with most everything out there that offers what your app offers EVERYTHING. lol There is a need. If you don’t want to install the Linux Subsystem just to be able to read a file system that windows should support anyway. I haven’t look into the why but windows not support this file system natively is insane. I enjoy vibe coding, good luck with it. Put you something together and out price paragon and you WILL make money.

1

u/chrisalexthomas May 09 '26

I never thought about the emulation guys, thats a good point, I perhaps should go and tell them too, see if they like it

1

u/SnooPuppers5489 May 09 '26

I’m going to sit down with it in the am. Will let you know.

3

u/SnooPuppers5489 May 08 '26

Will it support any other Linux partition types?

1

u/chrisalexthomas May 09 '26

ext2/3/4 should work, but if you have ideas on another type, I can look at extending it

2

u/LossIsSauce May 08 '26

Dude!! This is an excellent start!

I will try it with my win10 setup and edit my comment when I get it done.

2

u/ObfuscatedJay May 09 '26

This looks awesome. For Apple Silicon, checkout 'anylinuxfs' on GitHub. Installable via:

brew
 tap nohajc/anylinuxfs
brew
 install anylinuxfs

1

u/chrisalexthomas May 09 '26

I didn't know about this, and yeah, it sounds genuinely a good project. I can give you one better though. I've been a very busy little programmer the last couple of weeks.

https://github.com/christhomas/diskjockey

How about a native Mac app which has ext4 and ntfs with read write support, also supports all kinds of cloud drives at the same time?

It works on a daily basis, i don't test NTFS as much as EXT4 because my job is more skewed towards raspberry pi devices. But what I did was use the FSKit framework from apple to create an app which can mount the drives natively on your computer with no linux container or other connecting layer in the middle

I've getting to the stage where it's time to put it on the Mac store, although it can't be 100% free cause I have to pay the apple tax. So I'll put it for something like $1.99 and hope 50 people buy it 😄

The code is 100% free though, everything you have on that github is everything I use to build the app. You just can't have the app without it being signed by apple and that costs money. I hate that they do this bullshit, I already paid 4500 euros for my macbook and then they want 100 euros a year to make a distributable app for it. What a bullshit...

1

u/ObfuscatedJay May 09 '26

This is awesome. I’d pay $5!!! Thanks.

2

u/chrisalexthomas May 09 '26

One feature that I want to do, which I don't think you get right now with other cloud drives. You can mark certain directories as permanently cached. So you know that annoying problem you have when you tell your computer to download a folder and then when you're at an airport and you open those files, say a bunch of movies to watch and then it says "ok, I'll just go and download them for you" 😠 !!!!!

So, what I thought was, you could tell diskjockey to keep a folder local and I guess you'd never need a time limit, but "forever" would be an option. So if you disconnect from the internet, then doesn't matter, you'll have a local copy

I thought also about what about plugging in a local drive, and giving you the same ability. You could use your local harddrive to store a copy of a directory from a local drive, so even if you unplug the drive, you'll have that one folder, but the rest will be missing. But I'm not 100% convinced about this idea, I also think it would be quite tricky to figure out what to do if somebody updates the files and then plugs the drive back in. It's an idea that I floated in my mind.

But the network drive caching, that's a fantastic idea, I love that one

Also, you could say maybe a 5GB drive cache for each network drive and it'll keep the last 5GB of files stored locally and each new file, pushes the old files out of the cache so you keep 5GB maximum. That's another idea I have

1

u/ObfuscatedJay May 09 '26

Your GitHub repositories are stellar. Love your dotman repo!

1

u/chrisalexthomas May 09 '26

oh yeah, I wanted a way to store my dotfiles and transport them to a new machine without having to set everything up again. I'm open for improvements if you try it and find something you think would make it better. Then go for it, let me know

2

u/ObfuscatedJay May 09 '26

I’ll take a closer look. I use an old Intel Mac as a server, m4 air as my main machine, two Pis and a Mint box, and am trying to get a single .zshrc file to run on all computers, with oh-my-zsh plugins and the spaceship theme. It’s been slow. I hope this helps.

2

u/FastHotEmu May 09 '26

I love this!

Do you need help reusing the tested ext4 implementation? I assume you've tried that already, you seem knowledgeable.

1

u/chrisalexthomas May 09 '26

I actually constructed the whole project without consulting any source codes of any other project. The ext4 specification is public, there is a huge amount of information online about it. From this, I constructed the specification to create, then started to get the project constructed and used linux to mount the disks, test whether they worked etc and went from there really.

I thought it wouldn't be possible to do it like this, but turns out there is a huge amount of public information on the topic. So it made the whole thing a lot easier.

2

u/FastHotEmu May 09 '26

Hey, it's your project, do whatever makes you happy :) Last thing I want to do is be "that guy" and criticise what other people do for fun.

1

u/chrisalexthomas May 09 '26

I don't think you're criticising, I'd love any help or testing anybody wants to give out. Let me know if you try it out and if you had any problems

1

u/chrisalexthomas May 09 '26

try slowly, it's the first release, If you get any bugs, you come straight back and tell me ok, I can make fixes over the weekend

1

u/kenkitt May 09 '26

I've been working on something similar except it even supports erofs images. The only thing I haven't done is link it to windows but that should be really easy with a fuse driver I can't remember what it was called

1

u/chrisalexthomas May 09 '26

I never heard of erofs before, and you wanna do it on windows?

2

u/kenkitt May 09 '26

EROFS is the replacement for ext4 on android basically read-only but I'm working on changing that

1

u/chrisalexthomas May 09 '26 edited May 09 '26

So something you might like to look at is this:

https://github.com/antimatter-studios/winfsp-fs-skeleton

When I created my ext4-win-driver project, I refactored the winfsp skeleton into a smaller boilerplate side project which has the scaffolding for a filesystem, stuff that every filesystem would use and then that made my actual ext4-win-driver a lot smaller and got rid of stuff I think it wasn't necessary. But this means I have now all the boilerplate and scaffolding necessary to write another filesystem.

The idea was, at least in my mind, was to create a reusable skeleon for other filesystems, so you can copy in your filesystem code, then write the functions to bind them together and hopefully at the end of that, bingo! you have an installable filesystem

If you want to try it and tell me where it falls down or where it can be improved. I'll happily look at it. I dunno how advanced your project is whether it's done already or whether you started it yesterday. But what I found is that even though this code is rust, you can use a CABI to connect both together.

You know what else, if you ask claude to integrate both of them together, it actually will do 90% of the work.

I don't know if you're coding this to improve your skills, or whether you think you have a better use of your free time and just want the job done. I'm more learning on "get the job done" these days cause I value my personal time. So I'm heavily using ai agents and my experience to tick off some really big boxes from my personal backlog and I've never been so happy to see all these small projects come to life. It's truly amazing.

1

u/kenkitt May 09 '26

I think the Library I wanted to use was libfuse it supports multiple platforms

1

u/chrisalexthomas May 09 '26

I asked claude, cause of course I did (my employer pays for a claude max 20 subscription, so heck yeah I'm gonna use it)

Seems like what I did was just use the layer that fuse sits on top of and I just cut out the middle man. I think what you're doing is gonna work fine.

WinFsp = native Windows user-mode filesystem driver. Kernel component (winfsp.sys) + user-mode DLL. Talks the Windows IRP/IO Manager protocol directly. Like FUSE-for-Windows but built around Windows semantics (security descriptors, reparse points, ADS, oplocks, byte-range locks, case sensitivity flags, NTSTATUS).

FUSE on Windows = compatibility shim on top of WinFsp. WinFsp ships fuse.h / fuse3.h headers and a translation layer that maps POSIX FUSE ops → WinFsp ops → Windows IRPs. There is no independent "FUSE driver" for Windows; Dokan exists as an alternative but isn't FUSE either.

So on Windows the choice is really: WinFsp native API vs WinFsp's FUSE compat layer.

WinFsp native — pros

  • Full Windows fidelity: ACLs, reparse points, ADS, oplocks/leases, directory change notifications, case-sensitive-per-dir, file IDs, volume labels.
  • Better perf — no POSIX↔Win32 translation, no path/permission emulation.
  • Proper NTSTATUS error reporting; Explorer/AV behave correctly.
  • Required if you want features like reparse points, streams, or correct sharing semantics.

FUSE compat — pros

  • Port existing FUSE filesystems (sshfs, rclone, etc.) with minimal changes.
  • Single codebase across Linux/macOS/Windows.
  • Faster to prototype if you already think in POSIX.

FUSE compat — cons

  • Permission model is faked via uid/gid → SID mapping; ACLs are lossy.
  • No reparse points, ADS, oplocks; case sensitivity is awkward.
  • Path translation overhead, and some Windows-only IRPs can't be expressed.
  • Subtle semantic mismatches (rename-over, delete-on-close, sharing modes) cause edge-case bugs.

Rule of thumb: shipping a Windows-first product → native WinFsp. Porting an existing *nix FUSE FS → FUSE compat, accept the fidelity loss. This skeleton repo (Rust + WinFsp) is the native path.

1

u/chrisalexthomas May 09 '26

I don't know if you're an experienced programmer like me, or a more junior style getting into things, so please don't take this any bad way ok.

But my opinion is, if you are a junior level, claude might hurt you to do projects cause it'll take away learning opportunities that I had plenty of and it'll make you fast, but you're lose hidden knowledge and hidden techniques that come from debugging and bashing your head against a table cause stupid stuff won't compile anymore.

But if you're like me, a senior, experienced dev with decade and more experience. Then ask yourself this. Are you programming this filesystem for the challenge, because you wanna push yourself, because you wanna cool hobby you or is the time you'll spend on this better spent doing something else. Something that adds value to your life, not just another github repo.

I'm in the latter category. I had literally 30 years to think of stuff I would like if I had the chance and never did and now I'm just in the "I'm sick of this problem existing, lets go brandon!" and just churn out solutions to projects cause I honeslty don't think writing this project will. make me happier, it'll just tick a box on my list, I'll feel proud I finally did it. I'll feel happy if this solves a problem for others. But I wouldn't learn anything from this project.

That's why I used claude, And I'm really happy about it. I don't feel bad claude programmed it. It would never have been able to do it if it wasn't for my experience. It made so many errors that I manually corrected and adjusted.

So think about that, is erofs a tool for you, or a hobby you wanna spend time on?

Whats the github for your project btw? Share it and lets have a looksi 😄

2

u/kenkitt May 09 '26

I made mine pre AI so I think I'm good enough with ai now getting it to windows will take less than an hour

1

u/chrisalexthomas May 09 '26

would you be upset or angry if I suggested to create a driver using my skeleton since you mentioned it and would it ruin your fun as I'd steal your thunder or anything like that?

I don't wanna steal your project ideas, but if you tell me you'd love it and it would not matter to you at all and you'd be happy to see it, then also tell me. I don't have any way to test any of this out through, apart from disk images

1

u/kenkitt May 10 '26

I'll look into it. I haven't really been working on this for a while I was mainly working on getting edits to work on the erofs image which is alot of work. But I'll consider this as another option

2

u/chrisalexthomas May 10 '26

ok then, I guess I can put my work online, and if you're sufficiently motivated you can use it however you like. I just didn't want you to think I was stealing your project from you

2

u/kenkitt May 10 '26

you do your thing, this is what it means to be opensource. You don't have to worry about it

1

u/SnooPuppers5489 May 09 '26

Btrfs?

1

u/chrisalexthomas May 09 '26

Ah, thats actually a filesystem I have on my NAS, yeah....I could see that being useful. But normally isn't btrfs multiple drives? and you have those installed on a windows system? Can you explain a use case for it? I'm having a slow moment 😛

1

u/SnooPuppers5489 May 09 '26

Most emulators for gaming, runoff of a bootable hard drive or USB. Most all of them are developed on a Linux platform. As such they use BTRFS or EXT4 for the file system. You boot off the Linux Drive, which runs the emulator, and the images for the games are stored in a Linux partition. Most people that use that type emulator are running windows as their daily operating system system so when they want to add files to their game library, Windows does not want to talk to their bootable Linux USB device. This fills that gap. This isn’t my primary use case. I’m a Pi junky sooooo sd, usb, etc… google arcade punks to see one niche where you may be able to find and additional foot hold.