Compile GRUB on Windows to use grub fstest to read files from different filesystems - Archstacker/GRUB GitHub Wiki

You should use Cygwin or MYSY2 to compile GRUB on Windows, and you should download automake,autoconf,bison,flex,make,gcc(gcc-core on Cygwin or mingw-w64-i686-gcc on MSYS2),python,git on it.

Then open Cygwin Terminal or mingw32_shell.bat (Don't use mingw64_shell.bat or msys2_shell.bat) and run following commands:

git clone -b grub-fstest --depth=1 [email protected]:Archstacker/GRUB.git
cd grub
./autogen.sh
./configure
make -C grub-core/gnulib
make grub-fstest.exe

Now you have got the grub-fstest.exe. Please use it on Cygwin Terminal (Remember to replace '\' with '\\' in the following commands and add ./ before grub-fstest.exe) or cmd with necessary dlls if you compiled it with Cygwin, or use it on cmd if you compiled it with MinGW32 (Don't use mingw32_shell.bat). You can use grub-fstest.exe --help to learn how to use it. For example, you can read a file which was dumped from a partition with:

grub-fstest.exe C:\dump ls /

Or you can read from a raw partition (Remeber to Run as administrator):

grub-fstest.exe \\.\GLOBALROOT\Device\Harddisk0\Partition1 cp /Windows/System32/cmd.exe cmd.exe