Stories
Slash Boxes
Comments

SoylentNews is people

posted by CoolHand on Tuesday February 09 2016, @02:27AM   Printer-friendly
from the why-oh-why dept.

A number of users have reported that running "rm --no-preserve-root -rf /" not only deletes all their files (as expected), but also permanently bricks their computers (which is not). Tracing the issue revealed that the ultimate cause was that SystemD mounted the EFI pseudo-fs as read-write even when this FS was not listed in fstab, and deleting certain files in this pseudo-fs causes certain buggy, but very common, firmware not to POST anymore. A user reported this bug on SystemD's GitHub issue tracker, asking that the FS be mounted read-only instead of read-write, and said bug was immediately closed as invalid. The comment thread for the bug was locked shortly after. Discuss.

Links:
https://github.com/systemd/systemd/issues/2402
http://thenextweb.com/insider/2016/02/01/running-a-single-delete-command-can-permanently-brick-laptops-from-inside-linux/


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by gnampff on Tuesday February 09 2016, @05:16PM

    by gnampff (5658) on Tuesday February 09 2016, @05:16PM (#301512)

    You do not list sys, proc or dev in your fstab. Yet they are mounted. Some things just get mounted automatically.

    I really do not see the the mistake on behalf of our evergrowing init system.
    I cannot delete things in the rw mounted /sys so why would I be able to do it in this EFI fs?
    Systemd is using the EFI fs just like it probably uses sysfs for something.

    Blame the crappy vendor and maybe ask for a horrible hack in the EFI fs so this cannot happen in the future.
    Otherwise I (or some evil/broken program) could still mount it by hand and wreck my system which is not much better.

  • (Score: 2, Informative) by Arik on Tuesday February 09 2016, @06:10PM

    by Arik (4543) on Tuesday February 09 2016, @06:10PM (#301557) Journal
    "You do not list sys, proc or dev in your fstab. "

    That's because those are not real file systems. These are all virtual file systems that make functionality other systems might require a special tool to access available using the normal *nix tools and metaphors instead, they are NOT REAL filesystems that are being mounted willy-nilly however.

    "I cannot delete things in the rw mounted /sys so why would I be able to do it in this EFI fs?"

    Because the EFI disk is a real storage device, while sysfs is a virtual file system that does not really exist, it's just a trick to make the UI more convenient.

    "Blame the crappy vendor and maybe ask for a horrible hack in the EFI fs so this cannot happen in the future."

    Yeah, I already did, that's half the problem and should definitely be fixed.

    Two wrongs don't make a right, so I won't excuse systemD here, but honestly, anyone who's been paying attention has had more than adequate warning at this point. SystemD is trash, and installing it on a production machine should be seen as a diagnostic of absolute incompetence.

    --
    If laughter is the best medicine, who are the best doctors?
  • (Score: 2) by maxwell demon on Wednesday February 10 2016, @07:28AM

    by maxwell demon (1608) on Wednesday February 10 2016, @07:28AM (#302008) Journal

    You do not list sys, proc or dev in your fstab.

    I just checked, and to my surprise you're right. However that was not always the case; I explicitly checked in the fstab of an old OpenSUSE installation that my memory is not wrong; its fstab indeed does contain entries for proc and sys. When did they change this? I consider the old way to be the right way.

    The only things that should be mounted by default are those things needed to explicitly mount the rest. Everything else should be mounted only via fstab, no matter how fundamental it is.

    --
    The Tao of math: The numbers you can count are not the real numbers.