https://github.com/maharmstone/ntfs2btrfs Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} maharmstone / ntfs2btrfs Public * Notifications You must be signed in to change notification settings * Fork 33 * Star 753 License GPL-2.0 license 753 stars 33 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 28 * Pull requests 2 * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Projects * Security * Insights maharmstone/ntfs2btrfs master BranchesTags [ ] Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 277 Commits .github/workflows .github/ workflows src src CMakeLists.txt CMakeLists.txt LICENCE LICENCE README.md README.md ntfs2btrfs.8.in ntfs2btrfs.8.in View all files Repository files navigation * README * GPL-2.0 license Ntfs2btrfs Ntfs2btrfs is a tool which does in-place conversion of Microsoft's NTFS filesystem to the open-source filesystem Btrfs, much as btrfs-convert does for ext2. The original image is saved as a reflink copy at image/ntfs.img, and if you want to keep the conversion you can delete this to free up space. Although I believe this tool to be stable, please note that I take no responsibility if something goes awry! You're probably also interested in WinBtrfs, which is a Btrfs filesystem driver for Windows. Thanks to Eric Biggers, who successfully reverse-engineered Windows 10's "WOF compressed data", and whose code I've used here. Usage On Windows, from an Administrator command prompt: ntfs2btrfs.exe D:\ Bear in mind that it won't work with your boot drive or a drive containing a pagefile that's currently in use. If you are using WinBtrfs, you will need to clear the readonly flag on the image subvolume before you can delete it. On Linux, as root: ntfs2btrfs /dev/sda1 Installation On Windows, go to the Releases page and download the latest Zip file, or use Scoop. For Linux: * Arch * Fedora (thanks to Conan-Kudo) * Gentoo - available as sys-fs/ntfs2btrfs in the guru repository * Debian (thanks to alexmyczko) * Ubuntu (thanks to alexmyczko) * openSUSE (thanks to David Sterba) For other distributions or operating systems, you will need to compile it yourself - see below. Changelog * 20240115 + Fixed compilation on GCC 14 (-Werror= incompatible-pointer-types now enabled by default) * 20230501 + Fixed inline extent items being written out of order (not diagnosed by btrfs check) + Fixed metadata items being written with wrong level value (not diagnosed by btrfs check) + ADSes with overly-long names now get skipped * 20220812 + Added --no-datasum option, to skip calculating checksums + LXSS / WSL metadata is now preserved + Fixed lowercase drive letters not being recognized + Fixed crash due to iterator invalidation (thanks to nyanpasu64) + Fixed corruption when NTFS places file in last megabyte of disk * 20210923 + Added (Btrfs) compression support (zlib, lzo, and zstd) + Added support for other hash algorithms: xxhash, sha256, and blake2 + Added support for rolling back to NTFS + Added support for NT4-style security descriptors + Increased conversion speed for volume with many inodes + Fixed bug when fragmented file was in superblock location + Fixed buffer overflow when reading security descriptors + Fixed bug where filesystems would be corrupted in a way that btrfs check doesn't pick up * 20210523 + Improved handling of large compressed files * 20210402 (source code only release) + Fixes for compilation on non-amd64 architectures * 20210105 + Added support for NTFS compression + Added support for "WOF compressed data" + Fixed problems caused by sparse files + Miscellaneous bug fixes * 20201108 + Improved error handling + Added better message if NTFS is corrupted or unclean + Better handling of relocations * 20200330 + Initial release Compilation On Windows, open the source directory in a recent version of MSVC, right-click on CMakeLists.txt, and click Compile. On Linux: mkdir build cd build cmake .. make You'll also need libfmt installed - it should be in your package manager. Compression support requires zlib, lzo, and/or zstd - again, they will be in your package manager. See also the cmake options WITH_ZLIB, WITH_LZO, and WITH_ZSTD, if you want to disable this. What works * Files * Directories * Symlinks * Other reparse points * Security descriptors * Alternate data streams * DOS attributes (hidden, system, etc.) * Rollback to original NTFS image * Preservation of LXSS metadata What doesn't work * Windows' old extended attributes (you're not using these) * Large (i.e >16KB) ADSes (you're not using these either) * Preservation of the case-sensitivity flag * Unusual cluster sizes (i.e. not 4 KB) * Encrypted files Can I boot Windows from Btrfs with this? Yes, if the stars are right. See Quibble. About No description, website, or topics provided. Resources Readme License GPL-2.0 license Activity Stars 753 stars Watchers 18 watching Forks 33 forks Report repository Releases 7 Version 20230501 Latest May 1, 2023 + 6 releases Packages 0 No packages published Contributors 7 * @maharmstone * @alexmyczko * @Conan-Kudo * @tchaikov * @SunRed * @jubalh * @sitiom Languages * C++ 55.8% * C 41.1% * Assembly 1.7% * Other 1.4% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.