{"id":13395898,"url":"https://github.com/pbatard/uefi-ntfs","last_synced_at":"2025-05-15T02:05:51.922Z","repository":{"id":45817315,"uuid":"27448899","full_name":"pbatard/uefi-ntfs","owner":"pbatard","description":"UEFI:NTFS - Boot NTFS or exFAT partitions from UEFI","archived":false,"fork":false,"pushed_at":"2024-12-11T13:28:52.000Z","size":254,"stargazers_count":827,"open_issues_count":0,"forks_count":141,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-04-15T00:47:42.067Z","etag":null,"topics":["arm","arm64","c","exfat","gcc","ia32","ntfs","ntfs-boot","ntfs-driver","rufus","uefi","uefi-ntfs","visual-studio","x64"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbatard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-02T19:14:48.000Z","updated_at":"2025-04-14T23:55:04.000Z","dependencies_parsed_at":"2024-05-16T12:44:24.600Z","dependency_job_id":"88a60b23-691d-4992-899d-19b6bdd9fa20","html_url":"https://github.com/pbatard/uefi-ntfs","commit_stats":{"total_commits":116,"total_committers":9,"mean_commits":12.88888888888889,"dds":0.08620689655172409,"last_synced_commit":"c934691be364bd2412333d5c654c708a3b393c6c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-ntfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-ntfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-ntfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbatard%2Fuefi-ntfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbatard","download_url":"https://codeload.github.com/pbatard/uefi-ntfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254259370,"owners_count":22040819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","arm64","c","exfat","gcc","ia32","ntfs","ntfs-boot","ntfs-driver","rufus","uefi","uefi-ntfs","visual-studio","x64"],"created_at":"2024-07-30T18:00:35.285Z","updated_at":"2025-05-15T02:05:51.904Z","avatar_url":"https://github.com/pbatard.png","language":"C","funding_links":[],"categories":["Tools","C"],"sub_categories":[],"readme":"[![Build status](https://img.shields.io/github/actions/workflow/status/pbatard/uefi-ntfs/windows.yml?style=flat-square)](https://github.com/pbatard/uefi-ntfs/actions)\n[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/23361.svg?style=flat-square)](https://scan.coverity.com/projects/pbatard-uefi-ntfs)\n[![Licence](https://img.shields.io/badge/license-GPLv2-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-2.0.en.html)\n\nUEFI:NTFS - Boot NTFS or exFAT partitions from UEFI\n===================================================\n\nUEFI:NTFS is a generic bootloader, that is designed to allow boot from NTFS or\nexFAT partitions, in pure UEFI mode, even if your system does not natively\nsupport it.\nThis is primarily intended for use with [Rufus](https://rufus.ie), but can also\nbe used independently.\n\nIn other words, UEFI:NTFS is designed to remove the restriction, which most\nUEFI systems have, of only providing boot support from a FAT32 partition, and\nenable the ability to also boot from NTFS partitions.\n\nThis can be used, for instance, to UEFI-boot a Windows NTFS installation media,\ncontaining an `install.wim` that is larger than 4 GB (something FAT32 cannot\nsupport) or to allow dual BIOS + UEFI boot of 'Windows To Go' drives.\n\nAs an aside, and because there appears to exist a lot of inaccurate information\nabout this on the Internet, it needs to be stressed out that there is absolutely\nnothing in the UEFI specifications that actually forces the use of FAT32 for\nUEFI boot. On the contrary, UEFI will happily boot from __ANY__ file system,\nas long as your firmware has a driver for it. As such, it is only the choice of\nsystem manufacturers, who tend to only include a driver for FAT32, that limits\nthe default boot capabilities of UEFI, and that leads many to __erroneously\nbelieve__ that only FAT32 can be used for UEFI boot.\n\nHowever, as demonstrated in this project, it is very much possible to work\naround this limitation and enable any UEFI firmware to boot from non-FAT32\nfilesystems.\n\n## Overview\n\nThe way UEFI:NTFS works, in conjunction with Rufus, is as follows:\n\n* Rufus creates 2 partitions on the target USB disk (these can be MBR or GPT\n  partitions). The first one is an NTFS partition occupying almost all the\n  drive, that contains the Windows files (for Windows To Go, or for regular\n  installation), and the second is a very small FAT partition, located at the\n  very end, that contains an NTFS UEFI driver (see https://efi.akeo.ie) as well\n  as the UEFI:NTFS bootloader.\n* When the USB drive boots in UEFI mode, the first NTFS partition gets ignored\n  by the UEFI firmware (unless that firmware already includes an NTFS driver,\n  in which case 2 boot options will be available, that perform the same thing)\n  and the UEFI:NTFS bootloader from the bootable FAT partition is executed.\n* UEFI:NTFS then loads the relevant NTFS UEFI driver, locates the existing NTFS\n  partition on the same media, and executes the `/efi/boot/bootia32.efi`,\n  `/efi/boot/bootx64.efi`, `/efi/boot/bootarm.efi` or `/efi/boot/bootaa64.efi`\n  that resides there. This achieves the exact same outcome as if the UEFI\n  firmware had native support for NTFS and could boot straight from it.\n\n## Secure Boot compatibility\n\n* UEFI:NTFS is compatible with Secure Boot and has been signed by Microsoft.\n\n* You can find Secure Boot signed binaries (for x86_64, x86_32 and ARM64) in the\n  [`uefi-ntfs.img` archive of Rufus](https://github.com/pbatard/rufus/tree/master/res/uefi).\n\n* Note however that, due to Microsoft [arbitrary restrictions regarding GPLv3](https://techcommunity.microsoft.com/t5/hardware-dev-center/updated-uefi-signing-requirements/ba-p/1062916)\n  the only drivers that can currently be used with UEFI:NTFS in a Secure Boot\n  environment are the GPLv2 licensed [ntfs-3g ones](https://github.com/pbatard/ntfs-3g).\n  Especially, the NTFS and exFAT drivers from EfiFs, which are derived from\n  GRUB 2.0, and therefore GPLv3, can not be submitted to Microsoft for signing.\n\n* Finally, Microsoft's current Secure Boot signing policies require additional\n  validation for 32-bit ARM, therefore the 32-bit ARM binaries are not Secure\n  Boot signed. This does not affect 64-bit ARM (a.k.a. `ARM64`/`AARCH64`/`AA64`)\n  for which we have fully Secure Boot signed binaries.\n\n## Prerequisites\n\n* [Visual Studio 2022](https://www.visualstudio.com/vs/community/) or\n  [MinGW](http://www.mingw.org/)/[MinGW64](http://mingw-w64.sourceforge.net/)\n  (preferably installed using [msys2](https://sourceforge.net/projects/msys2/))\n  or gcc\n* [QEMU](http://www.qemu.org) __v2.7 or later__\n  (NB: You can find QEMU Windows binaries [here](https://qemu.weilnetz.de/w64/))\n* git\n* wget, unzip, if not using Visual Studio\n\n## Sub-Module initialization\n\nFor convenience, the project can be compiled against the gnu-efi library rather\nthan EDK2, so you may need to initialize the git submodules with:\n```\ngit submodule update --init\n```\n\n## Compilation and testing\n\n* If using the Visual Studio solution (`.sln`), just press \u003ckbd\u003eF5\u003c/kbd\u003e to have\nthe application compiled and launched in the QEMU emulator.\n\n* If using gcc with gnu-efi, you should be able to simply issue `make`.  \nIf needed you can also issue something like `make ARCH=\u003carch\u003e CROSS_COMPILE=\u003ctuple\u003e`\nwhere `\u003carch\u003e` is one of `ia32`, `x64`, `arm` or `aa64` and tuple is the one for\nyour cross-compiler (e.g. `aarch64-linux-gnu-`).  \nYou can also debug through QEMU by specifying `qemu` to your `make` invocation.\nBe mindful however that this turns the special `_DEBUG` mode on, and you should\nrun make without invoking `qemu` to produce proper release binaries.\n\n* If using VS2022 with EDK2 on Windows, assuming that your EDK2 directory is in\n`D:\\edk2` and that `nasm` resides in `D:\\edk2\\BaseTools\\Bin\\Win32\\`, you should\nbe able to issue:  \n\n        set EDK2_PATH=D:\\edk2\n        set NASM_PREFIX=D:\\edk2\\BaseTools\\Bin\\Win32\\\n        set WORKSPACE=%CD%\n        set PACKAGES_PATH=%WORKSPACE%;%EDK2_PATH%\n        %EDK2_PATH%\\edksetup.bat reconfig\n        build -a X64 -b RELEASE -t VS2022 -p uefi-ntfs.dsc\n\n* If using gcc with EDK2 on Linux, and assuming that your edk2 directory resides\nin `/usr/src/edk2`:  \n\n        export EDK2_PATH=\"/usr/src/edk2\"\n        export WORKSPACE=$PWD\n        export PACKAGES_PATH=$WORKSPACE:$EDK2_PATH\n        . $EDK2_PATH/edksetup.sh --reconfig\n        build -a X64 -b RELEASE -t GCC5 -p uefi-ntfs.dsc\n\n## Download and installation\n\nYou can find a ready-to-use FAT partition image, containing the x86 and ARM\nversions of the UEFI:NTFS loader (both 32 and 64 bit) and driver in the Rufus\nproject, under [/res/uefi](https://github.com/pbatard/rufus/tree/master/res/uefi).\n\nIf you create a partition of the same size at the end of your drive and copy\n[`uefi-ntfs.img`](https://github.com/pbatard/rufus/blob/master/res/uefi/uefi-ntfs.img?raw=true)\nthere (in DD mode of course), then you should have everything you need to make\nthe first NTFS partition on that drive UEFI bootable.\n\n## Visual Studio 2022 and ARM/ARM64 support\n\nPlease be mindful that, to enable ARM or ARM64 compilation support in Visual Studio\n2022, you __MUST__ go to the _Individual components_ screen in the setup application\nand select the ARM/ARM64 build tools there, as they do __NOT__ appear in the default\n_Workloads_ screen:\n\n![VS2019 Individual Components](https://files.akeo.ie/pics/VS2019_Individual_Components.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbatard%2Fuefi-ntfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbatard%2Fuefi-ntfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbatard%2Fuefi-ntfs/lists"}