2

I made a live Linux system on a USB pen drive using Rufus (MBR partition scheme) and everything was working fine except for a large number of warnings and critical error messages I got from dmesg. There where some security warnings regarding a CPU vulnerability and many ACPI-related errors which appear to be related to some toxic Microsoft hardware driver politics. But among them, there was also a message

There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
<...long list of entries...>
1) Copy original to backup
2) Copy backup to original
3) No action

with roughly 30-40 lines of entries. If I remember correctly, Linux systems create a working boot sector at the beginning of a disk as well as a backup copy at the end of the disk. After reading the few discussions I could find on this somewhat elusive error, I decided to choose the option of replacing the original with its backup.

Unfortunately, this appears to have been a grave mistake as I'm now getting a

Invalid system disk. Replace disk and strike any key

and the system won't boot. Question:

  • What exactly causes such a high number of offsets within the boot sector, especially on a virtually plain-vanilla installation, and what would have been the correct action?
  • How can it possibly be, if not for a serious bug, that restoring a proper, system-generated backup - following a system message asserting This is mostly harmless - bricks the system?
  • Most importantly: How to solve this issue so the system will boot again?

Note: I did not get any error referring to a "dirty bit" that appears to get set when a drive is not properly unmounted as discussed here. Also, the USB drive itself is virtually new.

Note 2: Boot sector corruptions are NOT harmless, despite what some here are claiming. This "option" for triggering a zero-warning, one-click irrecoverable hard brick during boot is a catastrophic design flaw!

srhslvmn
  • 121

1 Answers1

4
  • How can it possibly be, if not for a serious bug, that restoring a proper, system-generated backup - following a system message asserting This is mostly harmless - bricks the system?

Because I'm afraid that you are misinterpreting what the message was telling you.

You got a message telling you that something and its backup differed, which means that you have three possibilities (that you cannot guess without understanding the binary data and its differences):

  • Either the main boot sector is fine and the backup is corrupted
  • Or the main boot sector is corrupted and the backup is fine
  • Or both the main boot sector and the backup boot sector are corrupted (but if you are able to boot even after you get the message, then the main boot sector is probably okay).

All the message is telling you is that the main and the backup no longer match, and the only conclusion you can draw for this is that one of them, or possibly both, is corrupted. But, and this is the most important point, you can not tell which one unless you know how to analyse the differences.

I believe your problem stems from assuming that, because a backup is called a "backup", it should always contain the correct data. That is not a proper assumption to make. And as a matter of fact, the problems you encountered after you took a chance to replace the main bootloader with the backup bootloader seem to indicate that it was most likely the backup version of the bootloader that got corrupted, whereas the main bootloader was fine.

So, what you were prompted with is 100% correct:

  1. If you could boot the system (before you replaced the main bootloader with the backup), then it means that the problem is mostly harmless, because then it's only the unused backup bootloader that appears to be corrupted
  2. In case you want to attempt to fix the corruption, and because it's not possible to formally determine which of the main or the backup is correct, you are being asked which of main or backup you want to declare as the "proper" bootloader. Unfortunately, this is not something you should choose at random, and that is why you get the list of differences, that you are supposed to study first before you decide which one looks like the "right" version.

Thus, if you can't analyse the differences, and especially if the main bootloader appears to work fine (outside of the message you get), you most certainly should not overwrite it with the backup, because the most probable conclusion is that it is the main bootloader that is fine and that it is the backup bootloader that is corrupted.

Unfortunately, you did choose to replace your (most likely) working main bootloader with your (most likely) corrupted backup bootloader, thereby bricking your system. But unlike what you are asserting, the bricking of the system does not come from a bug of the software, but from your erroneous assertion that a backup must always be good, which is not something you can assert.

Akeo
  • 1,610