Commit Graph

67 Commits

Author SHA1 Message Date
Lauri Kenttä
7db9c2d3ec Suggest booting to FW to enable HackBGRT 2026-04-02 22:32:34 +03:00
Lauri Kenttä
28129c23fb Rename setup.log to setup-log.txt for easier use 2026-04-02 22:32:34 +03:00
Lauri Kenttä
447ff30f61 Fix getting last line from BCDEdit output 2025-07-29 11:14:37 +03:00
Lauri Kenttä
611ab30db3 Improve output and README for BootOrder problems
Report own entry status (missing, disabled, after windows, enabled).
Also improve README instructions on the topic.
2025-04-12 23:59:35 +03:00
Lauri Kenttä
ffa3e335ea Improve output and README for BCDEdit errors 2025-04-12 23:59:35 +03:00
Lauri Kenttä
a1f6297759 Report if UEFI is missing (can't read variables) 2025-04-12 23:59:35 +03:00
Lauri Kenttä
afd0780b61 Try to avoid mistaking C: for ESP 2025-04-12 23:59:35 +03:00
Lauri Kenttä
320e154457 Check for missing mountvol /S 2025-04-12 23:59:35 +03:00
Lauri Kenttä
785307c0e2 Allow overriding ESP path 2025-04-12 23:59:35 +03:00
Lauri Kenttä
1946765680 Log Windows version 2025-04-12 23:59:35 +03:00
Lauri Kenttä
830db410ea Properly propagate configuration error message 2024-07-20 15:26:18 +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ä
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ä
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ä
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ä
39596aadfc Don't try to remove non-existent dir. 2024-01-20 12:43:00 +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ä
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ä
294da9c069 Get rid of \EFI\HackBGRT\ in config.txt 2023-12-16 15:13:05 +02:00
Lauri Kenttä
74a143e723 Make BitLocker detection more reliable 2023-11-27 18:57:08 +02:00
Lauri Kenttä
ba72b90082 Add logging to verify entry creation 2023-11-27 15:19:46 +02:00
Lauri Kenttä
466ab69c48 Use shim 15.7 to support Secure Boot
Use shim-signed and shim-helpers-{arch}-signed from Debian:
https://packages.debian.org/bookworm/shim-signed
2023-11-17 23:24:58 +02:00
Lauri Kenttä
db934099df Gather log during boot 2023-11-17 23:13:12 +02:00
Lauri Kenttä
e93ed54cb2 Make setup menu shorter 2023-11-17 22:47:29 +02:00
Lauri Kenttä
be8a5d35d2 Sign the EFI files 2023-11-17 22:26:43 +02:00
Lauri Kenttä
2366fc8b98 Warn about Fast Startup (Hiberboot) 2023-11-16 22:56:10 +02:00
Lauri Kenttä
e04ba3e451 Log boot entries during setup 2023-11-16 22:07:08 +02:00
Lauri Kenttä
1058f3e2b4 Log BGRT contents during setup 2023-10-04 15:25:03 +03:00
Lauri Kenttä
33e4450d19 Check that BitLocker is disabled 2023-09-10 23:03:50 +03:00
Lauri Kenttä
d2bac39680 Add assembly information to setup.exe 2023-09-10 15:43:04 +03:00
Lauri Kenttä
a4c917294c Add option to boot to firmware 2023-09-10 15:43:04 +03:00
Lauri Kenttä
d6da4b7cee Support creating boot entry with bcdedit 2023-09-10 15:42:18 +03:00
Lauri Kenttä
f2185f624d Detect issues with boot= option 2023-09-10 15:02:58 +03:00
Lauri Kenttä
e44ce9f5ee Add logging 2023-09-10 15:02:58 +03:00
Lauri Kenttä
5f3c6afc23 Remove BootLoaderInfo class 2023-09-10 15:02:58 +03:00
Lauri Kenttä
1fa53f3f06 Remove SetupHelper class 2023-09-10 15:02:58 +03:00
Lauri Kenttä
8301a16ca8 Support arch=... parameter, improve auto-detection 2023-09-10 15:02:58 +03:00
Lauri Kenttä
7dbdf33ea8 Create an own entry, don't replace MS boot loader 2023-09-10 15:02:58 +03:00
Lauri Kenttä
dfb5b916ed Elevate privileges only when needed 2023-09-10 15:02:58 +03:00
Lauri Kenttä
267af0bd9c Support dry run in the installer 2023-09-10 15:02:58 +03:00