Commit Graph

157 Commits

Author SHA1 Message Date
Lauri Kenttä 785307c0e2 Allow overriding ESP path 2025-04-12 23:59:35 +03:00
Lauri Kenttä be62caa400 Add missing README entries for dry-run and arch 2025-04-12 23:59:35 +03:00
Lauri Kenttä 734ea21308 Don't require Windows Boot Manager entry if it's not needed 2025-04-12 23:59:35 +03:00
Lauri Kenttä 1946765680 Log Windows version 2025-04-12 23:59:35 +03:00
Lauri Kenttä 79ee253108 Update change log and tag v2.5.1 v2.5.1 2024-08-18 09:38:43 +03:00
Lauri Kenttä 82abb0c120 Update shim to 15.8
Use RockyLinux shim, they have all variants (x86_64, aa64, ia32).
After Windows update KB5041585, the old shim SBAT is not accepted.

Fixes #197.
2024-08-18 09:37:01 +03:00
Lauri Kenttä 830db410ea Properly propagate configuration error message 2024-07-20 15:26:18 +03:00
Lauri Kenttä 1e36d7e388 Support compiling with MSYS2 tools in Windows
Windows and MSYS2 need csc parameters to start with "-", not "/".
Now setup.exe can be compiled with the csc in MSYS2 mono package.
The EFI binaries can already be compiled with MSYS2 clang & lld.
2024-06-22 19:38:29 +03:00
Lauri Kenttä 9038e20cd2 Update change log and tag v2.5.0 v2.5.0 2024-06-21 15:36:46 +03:00
Lauri Kenttä 9a0d4737e1 Improve setup.exe metadata 2024-06-21 15:36:46 +03:00
Lauri Kenttä fa6fae3aa3 Catch errors in writing image 2024-06-13 15:50:19 +03:00
Lauri Kenttä 90fb8e47c1 Don't panic if BootCurrent is not found 2024-06-13 15:50:19 +03:00
Lauri Kenttä c826149183 Refactor EFI boot entry code into a new class 2024-06-13 15:50:19 +03:00
Lauri Kenttä af4f99aab6 If missing files, warn that zip is not extracted 2024-05-09 19:50:56 +03:00
Lauri Kenttä 8a97382a2e Clarify 'Log is empty', add a section in README 2024-05-09 19:50:51 +03:00
Lauri Kenttä 8e6466990a Skip the workaround in a44b9290 if skipping shim 2024-04-20 21:58:01 +03:00
Lauri Kenttä 6f94f6bc28 Properly handle skip-shim with enable-overwrite 2024-04-20 21:57:47 +03:00
Lauri Kenttä bc600a6c2f Handle more command-line options before executing actions 2024-04-20 21:31:19 +03:00
Lauri Kenttä 022ea9b93b Log image dimensions when installing 2024-04-20 21:31:19 +03:00
Lauri Kenttä 7d7d4c2aa4 Clarify installation and upgrading in README 2024-04-20 16:04:54 +03:00
Lauri Kenttä f1c8b11d6b Add some troubleshooting info to README 2024-04-20 15:54:20 +03:00
Lauri Kenttä a0553856f0 Fix batch installation instructions 2024-04-20 15:49:33 +03:00
Lauri Kenttä ffa29f6ffc Update gnu-efi to 3.0.18 2024-04-11 18:07:40 +03:00
Lauri Kenttä b9e23c91a3 Update change log and tag 2.4.1 v2.4.1 2024-04-11 17:48:55 +03:00
Lauri Kenttä 697c57355b Disable old version before copying files
Apparently some people still have the obsolete v1.5.1 installed
and manage to break things by copying v2.x config in place.
2024-04-11 17:46:13 +03:00
Lauri Kenttä da16365508 Report if BCDEdit is not working
One possible cause for BCDEdit failure is Windows error 0x800703EE.
"The volume for a file has been externally altered so that the opened file is no longer valid."
Suggested solutions include disabling antivirus or backup software.
2024-04-11 17:46:13 +03:00
Lauri Kenttä 665a4732ca Detect device paths which contain extra data
Apparently some firmware may add extra data to the device path,
so exit the loop on the first end-of-path record.
Fixes GH issue #181.
2024-03-24 17:27:02 +02:00
Lauri Kenttä 39596aadfc Don't try to remove non-existent dir. 2024-01-20 12:43:00 +02:00
Lauri Kenttä 1a5b1df064 Update change log and tag 2.4.0 v2.4.0 2023-12-31 18:35:35 +02:00
Lauri Kenttä ea70f3ce79 Disable before enabling, and default to BCDEdit 2023-12-31 18:29:48 +02:00
Lauri Kenttä a44b929012 Fix a shim error caused by bad load options data
Shim expects a filename or nothing in the load options.

To avoid an error message during boot, do several things:

When creating the NVRAM entry, use empty load options. The current
string ("HackBGRT\0") was just a decoration, and it's luckily ignored
by shim because the length is odd.

When creating the entry with BCDEdit, manually fix the load options.
The load options in BCDEdit entries start with "WINDOWS\0" followed
by UINT32 version, as seen in ReactOS struct BL_WINDOWS_LOAD_OPTIONS.
The version is 1, but BCDEdit seems to be happy with a higher number.
By setting this version to 'X' (0x58), the string becomes a valid
UCS-2 file name. Update the installer so that the HackBGRT loader is
installed with this weird file name.

The reason why the load options cannot be deleted completely is that
BCDEdit will recreate the entry on next boot if it doesn't find the
entry it just tried to create.

See: https://github.com/rhboot/shim/pull/621
See: https://github.com/reactos/reactos/blob/v0.4.7/boot/environ/include/bl.h#L911
2023-12-31 18:20:27 +02:00
Lauri Kenttä 9948e5a306 Fix BCDEdit dry run and add more logging 2023-12-31 17:50:14 +02:00
Lauri Kenttä 518d7c8a97 Show proper message if boot log is empty 2023-12-20 18:29:34 +02:00
Lauri Kenttä c6108ffd62 Warn about old .Net version if methods are missing 2023-12-20 18:29:25 +02:00
Lauri Kenttä 6dc447a8ce Try to avoid some .Net Framework 4.8 features 2023-12-20 18:29:25 +02:00
Lauri Kenttä 5ec17a49e8 Detect ARM arch from MS loader 2023-12-20 18:29:25 +02:00
Lauri Kenttä 7b7309a255 Explain why the original logo is still visible 2023-12-20 18:29:25 +02:00
Lauri Kenttä a82646a822 Wipe the vendor logo as soon as possible
Loading the image might take some minimal time. Optimize experience.
Hide cursor as well but restore it in ReadKey.
2023-12-20 18:27:19 +02:00
Lauri Kenttä 294da9c069 Get rid of \EFI\HackBGRT\ in config.txt 2023-12-16 15:13:05 +02:00
Lauri Kenttä 4096002eb2 Update issue templates 2023-12-16 15:03:05 +02:00
Lauri Kenttä 835cc1b2f2 Update change log and tag v2.3.1 v2.3.1 2023-11-27 18:57:20 +02:00
Lauri Kenttä 74a143e723 Make BitLocker detection more reliable 2023-11-27 18:57:08 +02:00
Lauri Kenttä b75dbe13c7 Update change log and tag v2.3.0 v2.3.0 2023-11-27 15:33:31 +02:00
Lauri Kenttä ba72b90082 Add logging to verify entry creation 2023-11-27 15:19:46 +02:00
Lauri Kenttä 6b724d5590 Don't create entries higher than Boot00FF
Apparently Boot20## are sometimes reserved for firmware even if
they seem to be free. Boot00## is the normal place to be.
2023-11-27 15:19:06 +02:00
Lauri Kenttä 9ebe4e2476 Add run-qemu-<arch> to Makefile
The exact command may vary by OS, this is for Arch Linux.
2023-11-25 20:04:54 +02:00
Lauri Kenttä 5111897fae Update Makefile (instructions, release) 2023-11-25 20:04:54 +02:00
Lauri Kenttä aac8a38cbb Don't print HackBGRT on every output line 2023-11-25 20:02:53 +02:00
Lauri Kenttä 77dd2bd699 If GOP is missing, use config.txt resolution or 1024x768 2023-11-25 20:02:01 +02:00
Lauri Kenttä 8dfa456a7b Fix ARM (32-bit) build
Use -O, because -O2 causes Undefined OpCode in QEMU / UEFI Shell.

Remove -mno-red-zone which triggers -Wunused-command-line-argument.

Set architecture in PE file manually:
EFI uses IMAGE_FILE_MACHINE_ARMTHUMB_MIXED = 0x01C2,
while the default is IMAGE_FILE_MACHINE_ARMNT = 0x01C4.
2023-11-25 19:16:43 +02:00