503 points · by susam · 3y ago · 231 comments
Surely, given the Linux native file system is open source, adding the ability to mount ext4 partitions natively should be something people can add to Windows?
I have seen third party applications with custom file explorers that can open ext4 partitions (in the same way you open a 7zip file) and I also understand you can mount linux partitions via WSL to access them via explorer - I would just love it if there was a way to natively mount ext4 in the Windows shell.
Up until now I have been using NTFS as my "universal" format - for drives shared between Windows, Linux and MacOS. I think exfat has recently gained support in all three platforms but it's not reliable for an internal hard drive (I think?).
Such projects have long existed, but I suspect there's a lack of interest.
It's a difficult technical problem with a narrow usage niche. You need somebody who wants both Windows and Linux, and wants to use the same physical disks. Today, why bother? You can use a NAS, cloud storage, virtualization, etc.
Having to reboot is so inconvenient, sooner or later ina dual boot setup you leave your non-preferred env colecting dusts and cobwebs.
It’s really not outside the realm of reason for the subset of those people that want to use Windows for something other than playing video games is small enough for there to not be the base level of interest needed for this stuff to get off the ground.
Not exactly what was being asked for, but a weird old fact I'd forgotten about.
https://en.wikipedia.org/wiki/Cooperative_Linux http://www.colinux.org/publications/Reprint-Aloni-OLS2004.pd...
God knows what other bugs their software has.
I've been doing this for a few years now. It just doesn't support some stuff, like permissions, but for just a pile of files, it's fine.
It's not, and recovery tools are still lacking. Keep using NTFS for now.
It’s not a replacement for NTFS in applications where it’s already being used (large disks, anything where important data is being stored). Rather, it’s a modernized replacement for FAT32 for things like camera memory cards, eliminating some of FAT32’s limitations (like the file size limit) while remaining similarly lightweight.
[1]: https://en.m.wikipedia.org/wiki/9P_(protocol)#Server_applica...
Depending on the filesystem features you enable, you can even mount an ext4 filesystem with the ext2 kernel driver, and you can already mount an ext2 or ext3 filesystem with the ext4 kernel driver.
A large part of this compatibility is due to the bitmap of compatible, compatible read-only, and incompatible filesystem flags in the filesystem superblock.
For example, when ext4 got support for extents, that's an incompatible feature; you cannot mount an ext4 filesystem with extents with the ext3 kernel driver. This does not even require ext3 to know what an extent is because it's just indicated as an unknown (from the ext3 driver's perspective) incompatibility flag.
On the other hand, the implementation of sparse superblocks (keeping fewer copies of the superblock around to allow for more blocks to be used for file data on filesystems intended to house lots of large files) is merely a read-only compatibility bit; you can mount an ext4 filesystem using sparse superblocks with an ext2/ext3/ext4 driver that does not support them, in a read-only manner. This cannot be mounted read-write because the implementation may try to place a filesystem superblock where file data is supposed to be, which would lead to at best wasted space (negating the feature) or at worst limited filesystem corruption.
When feature changes that could break things are made to the ext4 implementation in the Linux kernel, they are always done so using these (in)compatibility flags, ensuring that only implementations that can entirely support the feature can mount them read-write, and that implementations whose ability to read would not be affected can still mount them read-only. This allows you to create future filesystems (using e.g. mke2fs(8)) and not turn those features on while doing so, if you want the filesystem to be used by other implementations. Something you already have to bear in mind if you're creating a filesystem using a modern mke2fs but intended to be read by ancient Linux kernels.
It's not just the MS implementation that might break but everybody's file system may be in danger.
Filesystem is supposed to be as backward compatible as it should be.
On the topic of alternative btrfs implementations, I've been working on https://git.lukeshu.com/btrfs-progs-ng/ which is written entirely in Go.
Its `btrfs-rec inspect mount --pv=/dev/whatever` is a read-only FUSE implementation of btrfs that is more fault-tolerant (of corrupt filesystems) than the normal in-kernel btrfs driver (and even more tolerant than `btrfs rescue` or `btrfs recover`).
It's still missing a bit; RAID almost certainly doesn't work, and encryption is not implemented. But hopefully some folks will find it useful, or at least neat!
Oh, comparison with the existing https://github.com/adam900710/btrfs-fuse : (1) Again, mine has better fault tolerance, (2) but mine is read-only, (3) mine supports xattrs (TODO in Adam's), (4) mine supports separate inode address spaces for subvolumes (Adam's doesn't due to limitations in FUSE, mine works around this by lazily setting up separate mountpoints for each subvolume).
Is this actually a blessed "next-generation" implementation? If not, could you please rename it so it doesn't confuse people?
(As a side note, I've had others fork software I maintain and call it "-ng", you learn to take it as a compliment :) )
Plus, for the most part, it's not a replacement for what's in btrfs-progs, it's additional tools:
Replace:
- `btrfs-rec inspect dump-trees` is a clone of `btrfs inspect-internal dump-tree`, but it isn't meant to replace it, I only implemented it so that I could diff the output to validate that my implementation agrees with the btrfs-progs implementation.
- `btrfs-rec inspect mount` is conceptually a replacement for `btrfs restore`.
- `btrfs-rec inspect rebuild-mappings` is a replacement for `btrfs rescue chunk-recover`
Additional:
- I don't believe that `btrfs-rec inspect rebuild-trees` has an equivalent.
- `btrfs-rec inspect list-nodes`, `btrfs-rec inspect ls-files`, and `btrfs-rec inspect ls-trees` have no equivalent in btrfs-progs.
- (for completeness) `btrfs-rec inspect spew-items` has no equivalent, but it's for debugging btrfs-rec itself.
Missing:
- `btrfs-rec` doesn't try to do anything with mounted filesystems, such as `btrfs balance`, `btrfs filesystem`, `btrfs scrub`, `btrfs send`/`btrfs receive`, ...
- `btrfs-rec` doesn't try to do anything with filesystem initialization, such as `btrfstune` or `mkfs.btrfs`.
- `btrfs-rec` doesn't try to do things with recovering the superblock, I've found `btrfs rescue super-recover` and `btrfs-select-super` to be adequate.
- In general, I didn't try to re-implement commands that already work well.
Change the .msixbundle extension to .zip, and open with 7-zip. Inside the archive, open & extract the appropriate .msix file for your architecture. Now you have Windows Terminal Portable. (I've done this with other apps too)
To obtain a download link for a Windows Store package, you need to go to third party websites where you input the Windows Store URL, and it gives you the download link. Make sure the download link is from Microsoft domain.
But in Windows Terminal's case, the bundle is published on their Github so you can download directly. If you want the Cascadia Code font, you need to install it manually by double clicking on the font from the package.
Of course you can also do a cursed setup with 2 partitions: windows on Btrfs and Linux on NTFS just to maximize the chaotic nonsense.
WSL 2 is a completely different beast, with Linux storing its file system in a virtual disk image. \\wsl$\ just gives you the illusion of being the same system, but that’s just a networked file system.
Hyperboles can be a fun writing style, but of course, it's not incredibly solid: https://github.com/maharmstone/btrfs/issues This is an exciting project though!
Just make a big file in /dev/shm, add it via loopback to LVM and migrate system partition on it, then run shred on drives without the annoying messages kernel screams when it has its storage destroyed underneath
http://reboot.pro/index.php?showtopic=21787
https://en.m.wikipedia.org/wiki/Installable_File_System
Although I'm sure that Windows would have some issues with that as XP was the last version that let you boot off of FAT32
I remember it being not too difficult to boot Vista and 7 from FAT32, although the official installer wouldn't let you.
It's nice Windows can do things too though I guess.
- "The btrfs driver for Windows is incredibly solid" is true... but (on NVMe) its also extremely slow. Like dramatically slower than NTFS, with or without compression.
- You can share data, but writing with winbtrfs will screw up the permissions on linux unless you get the mount options exactly right.
- Booting windows and ntfs conversion: there be dragons. The MS store isnt the only thing that breaks...
I mean, let's look at this objectively: the guy is amazed because he actually managed to boot windows off of a non MS-sanctioned software stack.
There's nothing amazing here: these things should be the standard, and it pretty much is the case in the open-source world.
And I certainly don't mean to diminish the technical achievement of the folks who stitched this together, quite the contrary, very nice feat.
But what I'm trying to say: instead of being amazed because they managed to pull it off, they should be demanding this kind of inter-operability between components of the steaming pile of shite that is windows in 2023.
How stable is Btrfs these days? Remember reading years ago that it was bad about spontaneously corrupting itself for no apparent reason.
Curious if something similar is possible with ZFS.
That said,
- My BDB and SQLite databases tend to corrupt if my laptop battery dies and they're on a volume that's not on LUKS.
- `btrfs check` (fsck), `btrfs rescue`, and `btrfs restore` are IMO not up to snuff if you do encounter corruption (caused by something else, like a failing drive). (But I'm working on that https://git.lukeshu.com/btrfs-progs-ng/ !)
- `docker build` is weirdly slow on btrfs, I always set up a separate ext4 `/var/lib/docker` volume.
- I do RAID and encryption separately in MD or LVM and LUKS, so no comments from me about the stability of btrfs' built-in RAID cor encryption.
I'm currently doing this for a different reason. My docker builds started failing after some Ubuntu upgrade. I gave up and used ext4 for that docker directory to fix everything. https://serverfault.com/q/1127148
It unsettled me because now I'm not sure whether btrfs (or docker with btrfs) is production-ready.
https://docs.docker.com/storage/storagedriver/select-storage...
https://docs.docker.com/storage/storagedriver/select-storage...
On one hand, Fedora and SUSE default to Btrfs. On the other hand, data corruption bugs are still being unearthed [1]:
But I'm not running a RAID, which I believe is where almost all of the data corruption has happened.
It was in files I wasn't really using anymore (some ssh key files on vps that weren't online anymore) so I have no idea when it really occured.
Perhaps if I ran some software off it I might find some more issues but, overall quite little. The difference in speed is immense though.
There is no way to make NTFS case insensitive either, it being case insensitive in Windows is a Windows implementation detail.
Granted, I do trust Synology using btrfs but they are also subject matter experts on the topic.
On Linux/ext4, it takes an eternity for an enumeration to even start returning results and the entire OS gets stuck on IO while doing so.
But this isn't an "NTFS problem" as you'll have this occur on any filesystem that supports file system filters, like antivirus.
I cant remember the linux results... not that it matters, as I avoid NTFS writes on linux like the plague, even with the new kernel driver. Just this year, I tried trusting it for a little while, and linux ntfs killed an entire backup HDD by corrupting the partition table :/.
Mounting NTFS as read only is OK though.
There’s an OpenZFS port to Windows[0]. I wonder if my hopes of having ZFS on Windows (including the boot drive, because I would love to be able to snapshot and rollback) would actually be possible.
I am pretty strongly pro-Windows NT. I think there’s a ton of good design and implementation in it. (The parts of NT that came from Win32 are the more irritating parts.)
VSS isn’t wholly unreasonable. The design seems pretty well thought-out. I particularly like the VSS providers that can interface with hardware-based snapshot mechanisms and VSS writers to allow software to quiesce IO. It’s all pretty neat, but it seems to fail to take snapshots “mysteriously” pretty often in practice. Since I can’t see the source I don’t have much chance of actually figuring out what’s going wrong either.
I also like that VSS is clearly distinct from volume management and the filesystem itself. The layer violation inherent in the design of ZFS seems a bit clunky to me. In use, though, it has done very well for me and I haven’t bumped up against limitations re: volume management and redundancy being tied to the filesystem too much (probably because I’ve always come at it with the expectation that my volumes are pretty much decided at deployment time and migration means starting a fresh zpool and starting over).
So if I want everything encrypted this is not helping me.
Opening LUKS from Windows project is dead I think. But I am fine this way I basically have not booted up Windows up for gaming in months. And this one way sharing with Dislocker is enough for me. I think btrfs and zfs are rather a hasse on personal desktop systems, you just loose lots of space for snapshots you not really need, well I needed them on OpenSuse tumblweed because it was unstable but I since switched to Ubuntu LTS and I do not need them.
Which is pretty much fine; it was never finished anyway. Ambitious project with which Canonical seems to have bitten off more than it can chew...
However a cursory search doesn't turn up any more info, so, grain of salt.
I suspect this is much more likely to be a secure environment issue. Windows store wants to prevent piracy, there is no way the environment can be trusted because the boot loader wasn’t signed by Microsoft, and therefore may be modified to help people pirate software.
https://learn.microsoft.com/en-us/windows/msix/desktop/deskt...
Or this issue: https://github.com/MicrosoftDocs/visualstudio-docs/issues/33...
But what's up with UWP apps not working?
22 years of development for nothing.
But, then, what’d be the fun of having a computer you don’t need to fix?
If Linus is afraid of Oracle, MS should definitely be afraid
- Linux on Btrfs
- Windows on NTFS
The Btrfs driver on windows allowed me to read and write Linux files from windows and the other way around. For my use cases this worked quite okay.
You could then even hide all Linux directories of you wanted.
What does AMD mean here? AMD the processor company? I don't see how that is related to changing the filesystem.
Although, since UWP doesn’t work it’s a moot point, that means you probably can’t run Windows Update.
Then you are confidently wrong, because Windows Update rarely (if ever) touches the bootloader, while this is the main innovation of the WinBTRFS project.
I am sure your custom bootloader will not be overwritten. All types of hell can happen, borking the entire installation -- and your bootloader will still be perfectly fine.
Do not underestimate the power of arcane knowledge.
As the root file system? Does that work?
With posix perms, users and everything, there's no reason it shouldn't!
btrfs is pretty comfortable to manage, too.
On that point: I wonder how the subvolume experience is.
Step two: Include Linux filesystem in Windows.
Step three: Windows is Linux.
But TBH its like this on linux too. BTRFS is a feature heavy CoW filesystem like ZFS, not a "light," intentionally low overhead fs like ext4 or f2fs (which is what I benched on linux).