1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[core] fix MBR protective message overwriting the primary GPT

* We distractedly chose to populate the message from our protective MBR
  for GPT/UEFI-only boot media into the 4KB that directly followed the
  MBR, which of course is space that is being used by the primary GPT.
* This resulted on systems having to fall back to using the secondary
  GPT, which not all appear to be designed to do.
* Alter the code to ensure the protective message is written at LBA 34,
  after the primary GPT.
* Closes #1507
This commit is contained in:
Pete Batard 2020-04-13 17:05:33 +01:00
parent 129aa64394
commit 2dd538b7cb
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
9 changed files with 60 additions and 57 deletions

View file

@ -53,9 +53,11 @@ dis: $(TEST_TARGET).out
# Run the MBR in a Bochs environment (append msg.txt in subsequent blocks)
test: $(TEST_TARGET).bin
@test -s $(BOCHS) || { echo "Error: $(BOCHS) was not found on this system"; exit 1; }
@cat $(TEST_TARGET).bin msg.txt > disk.img
@cp $(TEST_TARGET).bin disk.img
@truncate -c -s 17K disk.img
@cat msg.txt >> disk.img
@truncate -c -s 10M disk.img
-@$(BOCHS) -f bochsrc.bxrc -q
@-$(BOCHS) -f bochsrc.bxrc -q
%.out: %.o mbr.ld
@echo "[LD] $@"