[CentOS] In A UEFI World, "rm -rf /" Can Brick Your System

Mon Feb 1 22:46:55 UTC 2016
Valeri Galtsev <galtsev at kicp.uchicago.edu>

On Mon, February 1, 2016 4:24 pm, Gordon Messmer wrote:
> On 02/01/2016 01:59 PM, John R Pierce wrote:
>> would deleting the inode /sys/(whatever) actually modify UEFI memory?
> Yes.  That is how the UEFI management interface works.

Will doing

rm -rf /

actually delete anything in /sys? IMHO, not. The above command first will
get to removing /dev, and it will delete /dev/sda1 or whichever device /
filesystem lives on. And after that the command will fail, as there will
be nothing accessible under / on that system after device root filesystem
"/" lives on will be deleted. So, IMHO, that nasty command will never get
to /sys, so all related to UEFI vars controlled through /sys filesystem
will stay as they are. You will brick the box, but only in a sense you
will have to restore /boot on your hard drive and /bin which these days is
symlink (on CentOS 7), so actual content of /usr/bin where symlink points
will stay intact. And portion of /dev - whatever alphabetically is before
root filesystem device.


Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247