A user posted on the Arch Linux forums in early January wondering why theirÂ laptop wouldnât boot at allÂ after running a simple ârm -rf âno-preserve-root /â command.
Itâs fairly stupid to run such a command, but usually not destructive to anything but the Linux installation. However, as it turns out, on MSI laptops itâs possible to completely wipe the EFI boot partition fromÂ insideÂ Linux.
9233, the user who killed his laptop, said that it happened like this:
So today me and a friend ran ârm -rf âno-preserve-root /â on a MSI Notebook because we wanted to get rid of the pretty bloated Arch installation.Â Of course we could have just formattedÂ the root partition and reinstalled Arch. But instead we thought it would be fun seeing the GNOME installation die.Â We werenât dumb enough to leave important partitions mounted. We unmounted everything except of root (/).
The directory thatÂ destroyed the system, which is atÂ
/sys/firmware/efi/efivars/ stores information and scripts that the computer uses to boot using the more modern EFI standard, which is a replacement for the decades-old BIOS.
Once that folder is destroyed, the laptop wonât even power on anymore as its firmware (which should have been read-only) is missing entirely â itâs âhard bricked,â which means the laptop is unrecoverable.
A thread discussing the issue on the systemd repository on GitHubÂ is full of discussion between developers arguing that the directory where the EFI boot data is stored should not be entirely writable.
The system does need access to some of the variables, however software should not be able to permanently brick hardware like this â which is what the maintainers of systemd are arguing about.
So far the issue appearsÂ to only affect MSI laptops, but thatâs only because thereÂ are a handful of cases of it happening in the wild â few people are willing or brave enough to tryÂ it on their own machines.
Still, itâs a scary idea that a machine can be permanently broken, even if the command being run is stupid. Next time you want to wipe a Linux machine, make sure to format it instead.
â¤No POST after rm -rf /Â [Arch Linux]