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.
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
On Windows, go to the Releases page and download the latest Zip file, or use Scoop.
For Linux:
For other distributions or operating systems, you will need to compile it yourself - see below.
20240115
-Werror=incompatible-pointer-types
now enabled by default)20230501
btrfs check
)btrfs check
)20220812
20210923
btrfs check
doesn't pick up20210523
20210402 (source code only release)
20210105
20201108
20200330
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.
Yes, if the stars are right. See Quibble.