It’s fairly stupid to run such a command
It's pointless, highly dangerous if misused, but there is nothing stupid about it.
as it turns out, on MSI laptops it’s possible to completely wipe the EFI boot partition
True, but highly misleading. You can delete the ESP on any computer (unless it's read-only storage), using any OS. It's actually one of reasons why I prefer UEFI to BIOS, because I dislike using the MBR, or a BIOS boot partition. I find this actually makes it easier to back things up.
The directory that destroyed the system, which is at /sys/firmware/efi/efivars/ stores information and scripts that the computer uses to boot
My understanding is that "/sys/firmware/efi/efivars" is used to mount UEFI's non-volatile storage area, which is used for variables like additional boot-manager entries, and UEFI preferences. However, this is the first I've heard of it.
To confirm my understanding, and help distinguish the difference between what it does versus what the ESP does, I did a test using a UEFI virtual machine running Arch Linux. I'm not silly enough to try this on my host computer
1. As you can see here
, I have custom UEFI settings, and a custom entry to boot Arch Linux.
2. As you can see here
, Arch Linux has automatically mounted my UEFI's efivars storage, and several variables are present.
3. As you can see here
, Arch Linux hasn't mounted my ESP, and when I do, you can see Grub is installed for use with Arch Linux.
4. As you can see here
, I've zeroed my ESP. Arch Linux is no longer bootable.
5. As you can see here
, despite no longer having an ESP, there is still an entry for Arch Linux in my UEFI. My understanding is that this is because that info is stored in efivars, a non-volatile section of UEFI storage.
6. To prepare for this test I restored the VM from a backup so that it does have an ESP again, otherwise I'd have no way to boot Arch Linux to do this next step. As you can see here
, I've attempted to delete my efivars, and most were. Some however, are not deletable, despite having appropriate privildges. My presumption is that this is because the UEFI doesn't allow these default entries to be deleted; makes sense. I take it this is where the system I'm using differs from the one the poster on the Arch forums was using. Though it doesn't explain why they cannot get into the UEFI at all.
7. As you can see here
, with my efivars deleted, my UEFI preferences are gone, as is my custom boot entry for Arch Linux.
8. As you can see here
, the system still works I had no trouble booting up a Debian installation disc.
As far as I can see there is no valid reason for an operating system to mount the efivars storage, unless the user wants to edit something. That's how the ESP is handled on most operating systems. Just one more reason for me not to use Arch Linux. I checked my Debian 8.0 UEFI VM, and it didn't automatically mount efivars. I'll have to look into how to manually mount it, just out of curiosity.
The way I read the article, and the Arch Linux thread, poor default OS settings, and a poor implementation of UEFI left the user's system exposed in a way he/she didn't know was possible. However, I'm still unclear on how the UEFI itself was wiped out. Shouldn't a UEFI screen with no boot entries have been presented?