Windows on Btrfs
lilysthings.org
lilysthings.org
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.
People still use local storage.
(I'd also like native ext4 support in Windows.)
And given the availability of cloud storage, I can just upload whatever little I need to share.
Although, I’ve found I very rarely need the guest for gaming anymore, more so for opening the odd Photoshop file and similar tasks.
In 2010, used to dual boot. In 2014 or so, I switched to VFIO GPU/SSD passthrough and never booted to Windows again. In maybe 2019 or so, I pretty much stopped using passthrough even, though this is partly because I stopped playing a few games that proton didn't run (mostly because of e.g. Easy Anti Cheat, etc).
I don't even have my windows ssd installed in my tower any more, that's how little I expect to need it these days.
GNU philosophy is not about moneymaking or footing the bill. Sometimes a problem gets worse when you throw money at it.
I am probably in the minority of Linux users though.
Eh? People just pay for their stuff. The problem is there isn't really a market for OSes (as a consumer), period. Unless you build a PC yourself, which is not the norm, you don't usually even buy an OS.
This has nothing do with whether the linux audience pays for stuff or not...they pay fine. It is true that it is relatively niche even for linux folk to want to do this sort of thing, but that has more to do with laptop vs desktop form factors than the market. If it were a common need, I think it would be a common thing found on the market. In fact the existing ext4 stuff for Windows indeed used to be paid, but this was primarily for Windows users, Linux users have had no issue accessing ntfs drives for ages, and generally didn't really enjoy giving Windows access to their drives anyways, what with the market for viruses and whatnot...
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.
Having to reboot is so inconvenient, sooner or later ina dual boot setup you leave your non-preferred env colecting dusts and cobwebs.
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...
Does anyone know if there's a relationship between colinux and how ms eventually ended up implementing wsl ?
I think the name is a bit ironic, since the whole idea is to avoid using any Linux code in Windows, but implementing system calls so that the non-Linux parts of a Linux distribution could pretend Windows was Linux. GNU/Windows-pretending-to-be-Linux, as it were.
WSL2 is virtualization-based, so it could be seen as more comparable to Docker's installation package as seen on non-Linux platforms, or Parallels: a somewhat elaborate attempt to improve the virtualization experience in interoperation with the host, e.g. setting up NAT, network file systems, or installing special drivers.
I don't think coLinux offers as much as it did, now that virtualization micro-architectural features are routinely available. At least one part of coLinux that took up quite a bit of its code was special drivers to interface with the host OS. This code would still be useful and has parallels in current approaches, but the decisive trick of toggling between two kernels running in supervisor mode has less room to be useful.
Also, you could only imagine the difficulty of identifying the origin of bugs in that set-up.
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.
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.
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.
[1]: https://en.m.wikipedia.org/wiki/9P_(protocol)#Server_applica...
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?
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.
(As a side note, I've had others fork software I maintain and call it "-ng", you learn to take it as a compliment :) )
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.
I think it was Ygdrassil, or maybe a free distro off of a CD. Great investment of time as it got me into the oilfield doing tech support. Running Rocky 8 on a P1 Gen4 now, so come a long way from my 486/Dx2.
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.
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.
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...
Does ZFS let you disable CoW?
There is no way to make NTFS case insensitive either, it being case insensitive in Windows is a Windows implementation detail.
But again, that is a OS implementation detail thing, the underlying file system is still case preserving.
[1] https://www.collabora.com/news-and-blog/blog/2020/08/27/usin...
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.
Granted, I do trust Synology using btrfs but they are also subject matter experts on the topic.
I don't recall it particularly ranty, though.
I chose the word because I remembered it being a bit rant-adjacent ("we're used to doing it this way, ... but windows does it that way"). But it's been a while since I watched it (not particularly attentively either, to be honest). That's just what stuck.
The readwrite driver is new, but it always had an older readonly driver too, which would be fine for benchmarking.
Back in 2011 Tuxera's proprietary Linux NTFS driver was maybe faster than ext as well: https://www.phoronix.com/news/OTU5Ng
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.
https://learn.microsoft.com/en-us/windows/msix/desktop/deskt...
Or this issue: https://github.com/MicrosoftDocs/visualstudio-docs/issues/33...
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.
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.
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.
For the rest, there could be references, but it's just lingering legends now: yes, in the past, it could happen BUT only for the Windows partitions (recovery 2700, efi EF00, msr 0701 c: 0700) and only if your partition was too small for a specific update. Then windows would do some careful resizing, in the worst case creating another partition out of its C: to avoid touching the rest. So it would't break anything, just like how ntfsresize works on linux!
For the selection from the UEFI, it was only if you used the default bootx64.efi and tried to repair the boot (windows detected this is not normal and would replace it by something to chainload bootmgfw.efi with)
Anyway, since Windows 10 it doesn't happen, and I never had any problem at all with 11.
Just use the recommended partition size (or more, I regularly make my EFI 4Gb), name your bootloader something else than bootx64.efi and it will be fine.
The most windows might do is to reorder your UEFI boot entries (then go to settings and you can boot another system, same in recovery: just select your linux UKI or grub EFI)
Although, since UWP doesn’t work it’s a moot point, that means you probably can’t run Windows Update.
As the root file system? Does that work?
With posix perms, users and everything, there's no reason it shouldn't!
Do not underestimate the power of arcane knowledge.
Step two: Include Linux filesystem in Windows.
Step three: Windows is Linux.
btrfs is pretty comfortable to manage, too.
On that point: I wonder how the subvolume experience is.
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).