-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 17b9b7b
Showing
13 changed files
with
5,511 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
cmake_minimum_required(VERSION 3.14.3) | ||
|
||
project(ntfs2btrfs VERSION 20200330) | ||
|
||
configure_file(src/config.h.in src/config.h) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(SRC_FILES src/ntfs2btrfs.cpp | ||
src/ntfs.cpp | ||
src/crc32c.c) | ||
|
||
if(MSVC) | ||
enable_language(ASM_MASM) | ||
set(SRC_FILES ${SRC_FILES} src/crc32c-masm.asm) | ||
else() | ||
enable_language(ASM) | ||
set(SRC_FILES ${SRC_FILES} src/crc32c-gas.S) | ||
endif() | ||
|
||
add_executable(ntfs2btrfs ${SRC_FILES}) | ||
|
||
if(MSVC) | ||
target_compile_options(ntfs2btrfs PRIVATE /W4) | ||
else() | ||
target_compile_options(ntfs2btrfs PRIVATE -Wall -Wextra -Wno-address-of-packed-member) | ||
endif() | ||
|
||
install(TARGETS ntfs2btrfs DESTINATION bin) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
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](https://github.com/maharmstone/btrfs), | ||
which is a Btrfs filesystem driver for Windows. | ||
|
||
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 with a | ||
pagefile on it. | ||
|
||
On Linux, as root: | ||
|
||
`ntfs2btrfs.exe /dev/sda1` | ||
|
||
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 | ||
|
||
What works | ||
---------- | ||
|
||
* Files | ||
* Directories | ||
* Symlinks | ||
* Other reparse points | ||
* Security descriptors | ||
* Alternate data streams | ||
* DOS attributes (hidden, system, etc.) | ||
|
||
What doesn't work | ||
----------------- | ||
|
||
* Rollback to original NTFS image | ||
* 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 | ||
* Compressed files (skipped for now) | ||
* Encrypted files | ||
|
||
Can I boot Windows from Btrfs with this? | ||
---------------------------------------- | ||
|
||
Yes, if the stars are right. See [Quibble](https://github.com/maharmstone/quibble). |
Oops, something went wrong.