GithubHelp home page GithubHelp logo

spacecase123 / ntfs2btrfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maharmstone/ntfs2btrfs

0.0 0.0 0.0 242 KB

License: GNU General Public License v2.0

Shell 0.22% C++ 54.46% C 42.23% Assembly 1.75% CMake 0.70% Roff 0.64%

ntfs2btrfs's Introduction

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.

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:

For other distributions or operating systems, you will need to compile it yourself - see below.

Changelog

  • 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:

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

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 LXSS metadata
  • 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.

ntfs2btrfs's People

Contributors

maharmstone avatar alexmyczko avatar conan-kudo avatar sitiom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.