News for hackers. Stuff that matters.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Someone on Friday January 29, 2016 @07:19PM (#10999676)
The comments by Lennart Poettering, IMO, are a prime example of the schism between what is needed for reaching "the year of Linux on the desktop" and what some hackers think is best.

Nobody sells a chainsaw with safeties disabled, remarking "you can always attach the chain catcher" if people report a couple of accidents, but Lennart thinks requiring almost every user to change the default install ((note that you can remount it readonly at boot, simply by adding an entry for it into /etc/fstab, that is marked "ro") is a better idea than mounting it read-only, and requiring those few who need to write these variables to do some extra work by remounting it read-write.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by kbenson on Friday January 29, 2016 @08:43PM (#11000080)
That is an extremely uncharitable reading of what he wrote, and I don't think it captures the essence of his intent at all. He said:

> Well, there are tools that actually want to write it.

It needs to be accessible in some manner.

> The ability to hose a system is certainly reason enought to make sure it's well protected and only writable to root.

Agreement it needs to be guarded, because it's a problem if it can hose a system.

> But beyond that: root can do anything really.

This is a truism for Unix, and altering this is much more of a problem than the occasional bricked machine. This is free software, and the ability to use it to control our hardware to the fullest extent possible is part of that freedom. Root cannot and should not be restricted from doing what it needs. It can, have hurdles put in place to make it harder to accidentally do something it doesn't mean to do though.

So, agreement on the problem, and agreement that something needs to be done to fix it, and a caution that access can't be entirely closed off without consequences, so root needs access. What's so horrible about that?

Re:Systemd mounted efivarfs read-write, allowing motherboard... by michaelmrose on Friday January 29, 2016 @10:27PM (#11000349)
Nobody is saying root shouldn't be able to access such functionality but rather it just shouldn't be mounted rw by default. This is actually fairly uncomplicated.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by geofft on Saturday January 30, 2016 @02:40AM (#11000973)
But then whatever app that runs as root that actually needs to update it is going to remount it rw, at which point the original problem stands.

My personal opinion is that, for the use case of a single-user machine (i.e., "Linux on the desktop"), the traditional UNIX root isn't a useful concept. What's actually sensitive is your files, your saved passwords, your browser cookies, your emails, etc.; the ability to reconfigure drivers or replace OS components is only a problem because it allows all of those things to be compromised. Instead of throwing roadblocks in the way of root (remount ro, expose it as something more complicated than a filesystem so innocent users aren't tempted to look at it, etc.), let's take all the stuff that users should be able to do and make it accessible by nonroot, and take all the stuff they shouldn't be able to do and put it in the realm of automation.

UEFI has a pretty reasonable concept here, of a distinction between "boot" and "runtime" configuration; the BSDs have a conceptually similar idea of the securelevel. The idea is that if you're around during the boot, you might be interested in reconfiguring what the machine is doing, but as soon as you're out, you permanently abjure any further ability to reconfigure that. If we take a variant on that, that the OS doesn't abjure those capabilities as a whole but instead reserves them for itself, disabling all user-controlled ability to change things, I think we get very far. You can install new software, but not change the trusted sources for software. You can apply firmware updates via an existing cronjob, but not make arbitrary changes to firmware variables. If you want to do any of that, you have to reboot and enter a special setup mode. Apart from protecting against simple human error, this also serves as a very effective protection against malware: non-OS software simply has no ability to do unwanted things.

Then let's use UNIX users (which are a pretty solid isolation technique) to isolate things like your banking info from your Flash-requiring music service.

Chrome OS, incidentally, has this concept of things the OS can do that the user has no interface to, and Chrome OS is basically the most successful Linux on the desktop, so.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by vertex-four on Saturday January 30, 2016 @04:45AM (#11001281)
> But then whatever app that runs as root that actually needs to update it is going to remount it rw, at which point the original problem stands.

There's a difference between a system which, at all times, is one mistyped command from being bricked, and a system which allows you to brick it if you're explicitly doing something dangerous in the first place.

> let's take all the stuff that users should be able to do and make it accessible by nonroot, and take all the stuff they shouldn't be able to do and put it in the realm of automation

While theoretically reasonable, this is also a huge project, and while this project is slowly implemented users are still vulnerable to this bug. Additionally, there's always going to be Linux users who find the idea abhorrent, and thus it remains a bug for those users. Choosing to have more control should not generally mean that you can brick your machine so easily as accidentally deleting a few files.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by chris_wot on Saturday January 30, 2016 @06:53AM (#11001543)
Yeah, and that app isn't rm.

Precisely how many user space apps do you think need access to it?!?

Re:Systemd mounted efivarfs read-write, allowing motherboard... by kbenson on Saturday January 30, 2016 @02:40PM (#11003374)
Yes. And all I see from Lennart is agreement and the statement of a few facts (some programs need access), which implies that a slightly more nuanced solution may be required. I fail to see how this reflects poorly on him.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by microcolonel on Saturday January 30, 2016 @01:58AM (#11000877)
The point is that that would offer no benefit. A root user can just mount it rw again in a single call.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @02:50AM (#11000998)
So in a similar vein, why bother with alias rm='rm -i' at all?
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @04:16AM (#11001205)
But that doesn't actually exist by default, and so it's not a good example.

A better example is that `/` is a special case for `rm`.

(Besides: I'm not a fan of `rm -i`, precisely because it's non-default. You'll get used to it, and then someday you accidentally some files on a system where you didn't add the alias.)

Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @04:23AM (#11001221)
Lots of GNU/Linux distributions used to it by default, has it changed?
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @05:16AM (#11001360)
None I currently use (just tested with bash* on: Debian, Centos, Fedora, OpenWRT) or have used in the past few years (Arch) has it.

I don't remember anything about my time with SUSE and Ubuntu, thats way back.

* I normally use zsh with grmlzshrc and nearly no customization (which is why I love grmlzshrc -- usable defaults), which warns for `rm -rf foo/*` but not for `rm -rf foo`.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by SEJeff on Saturday January 30, 2016 @09:14AM (#11001856)
Redhat based distros absolutely do enable alias rm='rm -i' out of the box, but only for the root user. As a career SysAdmin, that seems like a good compromise. If you want to take the safety net off, you can escape out the alias (or any alias) with a slash i.e.:

\rm -rf somedir

Yet by default, if you don't include the "\", you get rm -i

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @11:17AM (#11002390)
You're right about RedHat, sorry.

.bash_history says I accidentally added `-f` on that host. I should have just checked with `which` instead of trying it out. Oops.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by SEJeff on Saturday January 30, 2016 @12:16PM (#11002685)
Actually even if you do rm -f, the -i will still be added if it is an alias. Better is to use the bash builtin "type":

type rm is better than which rm, but it depends on what distro you're using. Some distros (Just checked on RHEL7) will fancify which as well ie:

$ type which which is aliased to `alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Ao7bei3s on Saturday January 30, 2016 @12:28PM (#11002740)
> Actually even if you do rm -f, the -i will still be added if it is an alias.

Yes, I know, but rm ignores -i if -f is given.

  [root@example ~]# touch blah
  [root@example ~]# rm -i -f blah
  [root@example ~]# 
And hence:

  [root@example ~]# which rm
  alias rm='rm -i'
  	/usr/bin/rm
  [root@example ~]# touch blah
  [root@example ~]# rm -f blah
  [root@example ~]#
@type: yes, you're right, thanks for the reminder.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @06:03AM (#11001455)
Maybe I am wrong but I think Red-Hat, Mandrake and SuSE used to do it.

Nowadays I spend most of my time in Windows and mobile OSes to remember it properly.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by jhkaghjkga on Saturday January 30, 2016 @04:25AM (#11001226)
Sane distributions don't include that alias by default. Because otherwise people will always use `rm -f` and lose the feature that `rm` asks before removing files marked as read-only.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @04:53AM (#11001302)
Then quite a few distributions are not sane, as I remember once a upon a time it was quite common to have it like that on fresh install.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Sanddancer on Saturday January 30, 2016 @01:05AM (#11000760)
Root needs access, but creating a pseudo-filesystem to access an area of the system with metadata, etc that doesn't map well to a filesystem, especially given the number of very buggy implementations of UEFI out there is just asking for trouble. There are properties that have settings to be visible only certain times during the boot process, there are settings that involve changing guids, etc. Access is better served through tools that better understand UEFI's confusing properties, not hammered at with general filesystem-level tools.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Saturday January 30, 2016 @03:19AM (#11001084)
I agree with you, but then we delve into the fun of needing to implement a syscall for this or a something in sysfs that limits the damage that can be done. I suppose it's better than the current efivars filesystem, but neither is a wonderful solution when we have to limit access to the hardware that could potentially do useful things (without patching the kernel, of course).
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Sanddancer on Saturday January 30, 2016 @12:55PM (#11002871)
It's useful, yes, but because of the buggy implementations out there, the risk in bricking, wanton removal of important variables, etc, is just too great. If anything, it should be a device node or the like. /dev/efi makes a lot more sense given its structure and purpose than trying to abstract it into looking kinda sorta like a filesystem.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Saturday January 30, 2016 @01:09PM (#11002938)
My big problem at the end of the day is while we can help prevent users from killing their own boards - we still NEED to be holding these firmware vendors accountable. No matter what abstraction is presented to user space once someone has root on my system they could potentially destroy my hardware.

Maybe one there is some nasty Windows Virus out there that fries boards by deleting EFI variables these stupid vendors will get their shit in order.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by deathanatos on Friday January 29, 2016 @09:55PM (#11000274)
Not only is root root, and should be permitted to access and modify the system as desired, it seems to me that the root of this problem is that motherboard manufacturers are shipping faulty boards. I shouldn't be able to brick my motherboard from my operating system, and that I can is a bug. You're telling me there isn't so much as a factory reset on these boards?

Perhaps systemd could shield users from their motherboard's manufacturer's stupidity, but the amount of flack being received doesn't seem warranted; has the same amount of outrage been directed towards the manufacturers?

Re:Systemd mounted efivarfs read-write, allowing motherboard... by pdkl95 on Friday January 29, 2016 @10:38PM (#11000374)
It is true that this is ultimately a hardware/firmware problem, but if the solution is waiting for motherboard manufacturers to not have bugs or stupid designs, then we will be waiting forever. Badly designed hardware will always exist.

If you look at how probing for hardware works in the Linux kernel, quite a few older drivers (and the occasional feature subtree) have auto-probing disabled by default because it tended to crash some types of hardware. You see this again in lm_sensors, where the auto-probe script specifically asks permission (with a default "no") before it tries certain probes that risk crashing the hardware.

We don't see this as much in recent years as hardware has gotten better - listing the device_ids/vendor_ids on a buss is much safer than poking ISA IO ports - but the problem remains. Some hardware needs special hand-holding, especially in the initial probe or initialize stages. Hence, tools that handle those stages are always going to have special cases and other annoyances.

> the amount of flack being received doesn't seem warranted

The flack against Pottering (and the rest of the systemd cabal) is because this isn't the first time his idealism has caused serious problems for others. Yes, it would be nice if we could just mount UEFI areas (or anything else). In reality, as this bug shows, this is dangerous behavior. It should have been made optional, or the entire idea of exposing those UEFI areas as a filesystem should have been reconsidered - a special purpose tool that handled bugged hardware might have been more appropriate.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by michaelmrose on Friday January 29, 2016 @10:29PM (#11000353)
Fixing every vendors implementation is an impossible task. Ensuring that the default configuration can't brick your motherboard is an easy one. So do the easy thing to ensure user safety WHILE working to solve the hard one to the extent feasible.

Robust systems must work in the real world not just in an ideal one.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by clinta on Friday January 29, 2016 @11:51PM (#11000561)
We've been living in a world where you couldn't brick the firmware from the OS for a long time, and it's been terrible. I'm perfectly happy to take the risk of being able to brick a board from the OS if it means I never again have to try boot to a dos disk and run a proprietary exe to update the BIOS.

Some boards do have something of a "factory reset" in the form of dual bios so that if one is bricked, the backup can still be booted. But it's not a bug that not every motherboard has this feature.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Sophira on Monday February 01, 2016 @04:30AM (#11010700)
The point isn't that it can be bricked; it's that it's possible to brick it via an "rm". Or heck, doing anything hardware-related via an 'rm'.

The UNIX philosophy of "everything is a file" has always been based around the conceptual 'contents' of these 'files'. The kernel doesn't (directly) care if you remove a device node (block or character-based), it doesn't care if you remove a pipe, and it doesn't care if you remove a socket - even though all of these things are interfaces to the kernel in one form or another. Removing these files only removes your ability to access that interface.

Simiarly with files in /proc - which, like /sys, is directly exported by the kernel. In many cases the kernel refuses to even allow you to unlink the 'files' in /proc, even when it might make sense. (For example, you can't kill a process by 'rm'ing anything in the relevant /proc directory.) Instead, you update the configuration values that the files in /proc represent by echoing into their contents, where applicable.

The case with the efivars 'file' actually causing the kernel to take action when it's removed is what's at issue here. The fact that it happens to brick some computers is particularly unfortunate, but does a good job with showing the problem here. This isn't what the "everything is a file" philosophy is about.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by clinta on Monday February 01, 2016 @01:02PM (#11013691)
I was not defending SystemD, I was defending the hardware manufacturers against the accusation that they're "shipping faulty boards".

I think SystemD is in the wrong here. Operating Systems should be protecting users from bricking their hardware.

Harware manufacturers should not be shipping hardware that's nearly impossible to brick, because it results in hardware that is nearly impossible to update.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Saturday January 30, 2016 @03:21AM (#11001090)
> You're telling me there isn't so much as a factory reset on these boards?

Quite a few boards have a backup EEPROM to initialize from if the primary EEPROM fails to boot, but who knows if those that do will bother to reinitialize the UEFI variables stored in NVRAM. Honestly, since they are just supposed to be stored in NVRAM what happens if your board battery runs out of juice, will it still brick?

Re:Systemd mounted efivarfs read-write, allowing motherboard... by bigbugbag on Saturday January 30, 2016 @04:21AM (#11001214)
Hosing a system is a way different than bricking a motherboard.

Hosing a system is something that can be fixed by root by reinstalling from scratch or restoring from backup. Bricking hardware is not something a sysadmin can fix by himself.

Poettering attitude refusing to acknowledge his mistakes and fixing them is not something new.

Someone who doesn't get the difference between deleting the content of a drive and rendering hardware inoperable shouldn't be in charge of a critical system component.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by LeoPanthera on Friday January 29, 2016 @11:01PM (#11000416)
I agree with everything you wrote, but he did close the issue, which generally implies "I'm not going to do anything about it".

Maybe it's not his responsibility and distro creators need to protect it, I don't know.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by eeZi on Saturday January 30, 2016 @01:21AM (#11000803)
If they changed it to "ro" by default, people would complain as well if it breaks something.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by mmsmatt on Friday January 29, 2016 @11:38PM (#11000520)
He who play in root, kill tree.

-Slackware fortune file

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Silhouette on Friday January 29, 2016 @08:47PM (#11000090)
The comments by Lennart Poettering, IMO, are a prime example of the schism between what is needed for reaching "the year of Linux on the desktop" and what some hackers think is best.

I tend to think the Linux on the desktop thing is a bit of a diversion, but this issue and Poettering's response certainly lend weight to the concerns many have raised about systemd.

What happened to defence in depth? Even if your users are all perfectly competent, with this sort of arrangement you're one vulnerability away from having bricked boxes, not just one vulnerability away from reimaging and restoring from backups.

What happened to making systems safe by default? There is no need to make this kind of system so fragile.

What happened to using the right tool for each job? The obsession with making everything look like a file that lives under the same global file system hierarchy causes endless problems, and it's never been entirely clear to me what benefits it's supposed to offer in return. It's interesting that Poettering remarked on exposing /dev/sda as root as well, because it's another excellent example of how broken this model is.

What happened to minimising trust? Of course it's crazy that any hardware/firmware actually allows itself to be permanently broken by a software error like this, but the software should not assume the hardware/firmware will take responsibility for providing any necessary safeguards.

Ultimately, this is just bad engineering and bad UI. It can result, and reportedly has resulted, in serious damage. No amount of dressing it up will change that, and the root cause of the problem should be fixed.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Saturday January 30, 2016 @03:38AM (#11001130)
Did Lennart have anything to do with the actual efivars implementation in the kernel? If so, then yeah, shame on him by all means. I agree it's a broken abstraction, but it's what the kernel developers decided on (and they sure like making system configuration available with filesystems, see sysfs and procfs).

Ultimately access is needed to even configure the bootloader, and right now that means it needs to be mounted RW. Let's go yell at the kernel developers instead of taking it out on systemd for using a virtual filesystem instead of a syscall.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by icebraining on Sunday January 31, 2016 @06:49PM (#11008734)
By the way, here's the author of the kernel module in question, talking about this issue:

https://twitter.com/mjg59/status/693494314941288448

Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Monday February 01, 2016 @12:34PM (#11013374)
I'm really glad he's speaking out on the issue, Matt is a smart guy (I used to talk with him frequently on IRC) and it's sad to see many of the same people trying to act like they know better than him in that twitter thread. There's no easy fix to this issue, and regardless of whether an rm -rf / can hose your system there's bigger issues at stake with malicious actors that a stupid bandaid like that won't fix.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by digi_owl on Saturday January 30, 2016 @10:14AM (#11002068)
Here is the thing, one day systemd overrides a kernel default without warning because of "best practices", another day they leave it alone even if it is basically a cocked gun aimed at the admins foot.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by C0DEHERO on Friday January 29, 2016 @09:37PM (#11000220)
Well, I could see a problem occurring if Poettering decided not to represent efivars as files. Many people would claim that Systemd is trying to get rid of the Unix philosophy and force everyone to use the software if they want to keep up. After all, so many people are already complaining that Systemd uses a binary format to store logs.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Silhouette on Saturday January 30, 2016 @02:29AM (#11000946)
My view is that treating everything in the universe as part of the same filesystem hierarchy is one UNIX philosophy we should have dispensed with long ago. I don't think it makes sense to project the same abstractions we use to represent file storage onto other aspects of a system just because they also happen to provide some information and then to treat everything as part of a huge, monolithic, homogeneous structure. The Filesystem Hierarchy Standard is very complicated already -- a discussion for another time, perhaps -- but what does something like "rm -rf /" (or any other actual file/directory manipulation) even mean at this point? I think reverence for some of these ideas just because they are "the UNIX way" is holding the industry back.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by JoshTriplett on Friday January 29, 2016 @07:39PM (#10999781)
If you mount efivarsfs read-only, efibootmgr can't make your system bootable. So at a minimum, you can't just remount the filesystem read-only; you need distribution integration so efibootmgr can still write to it.

There's no point in mounting efivarsfs read-only; you might as well not mount it at all.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by jerf on Friday January 29, 2016 @08:56PM (#11000119)
(Honest question, I lack hardware to check this on myself:) What do non-systemd systems do about this?
Re:Systemd mounted efivarfs read-write, allowing motherboard... by Sanddancer on Friday January 29, 2016 @09:22PM (#11000189)
FreeBSD has an efi library that's used in early boot to handle this instead. To be honest, with the structure of UEFI, exposing it as a filesystem is problematic at best. A filesystem just hides too much data from you -- errors, the reason a call to setting a variable failed, etc. Not everything is a file, and shoehorning things in to try to pretend just doesn't work.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by bitwize on Saturday January 30, 2016 @02:59AM (#11001033)
Indeed. It should be exposed the standard way you expose functionality in Linux -- with a D-Bus API.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by simoncion on Saturday January 30, 2016 @02:42AM (#11000984)
If I had a system that I booted in UEFI mode, I could tell you, but all of my hardware (even the ones running UEFI) boot OSs in BIOS mode.

Despite the fact that they're primarily a systemd distro, Arch Linux strongly recommends that you mount efivarfs in ro mode and remount rw when doing kernel upgrades.

GRUB2 seems to use efibootmgr to write stuff to EFI, and efibootmgr appears to lack a "detect if efivarfs is mounted ro and temporarily mount it rw" switch, so you have to do that manually too.

Gentoo's Genkernel-next doesn't seem to do anything at all with EFI.

Dracut (one of RedHat's initrd management tools) looks like it reads from efivarfs, but does not write to it. (But there's a lot of code in Dracut, so it's entirely possible I missed something.)

It's not entirely clear to me that you can't use BIOS boot with a GPT-formatted disk if your bootloader supports that sort of thing. It's also not clear to me whether or not chainloading from GRUB into Windows is supported with a BIOS/GPT partitioning scheme.

Regardless, it's a pity that the UEFI design committee apparently thought that requiring one to write data into the motherboard's persistent storage in order to boot into a OS was a reasonable thing to do.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by JoshTriplett on Saturday January 30, 2016 @03:30AM (#11001115)
> Despite the fact that they're primarily a systemd distro, Arch Linux strongly recommends that you mount efivarfs in ro mode and remount rw when doing kernel upgrades.

Why not leave it unmounted entirely, and only mount it when installing new boot entries?

Re:Systemd mounted efivarfs read-write, allowing motherboard... by simoncion on Saturday January 30, 2016 @04:10AM (#11001194)
> Why not leave it unmounted entirely, and only mount it when installing new boot entries?

Because there are -presumably- reasons to read EFI variables? If they're exposed through efivarsfs, then it's a convenient way to access them.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Saturday January 30, 2016 @01:32PM (#11003073)
A traditional BIOS or UEFI running in CSM requires an MBR formatted disk since the bootloader must be started from the first 512 bytes on disk. I have to boot ESXi on my ProLiant ML10 off a flash drive because my 3TB disk would become a 2TB disk otherwise.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by intelfx on Saturday January 30, 2016 @07:04PM (#11004460)
Did you hear about "hybrid MBR"?
Re:Systemd mounted efivarfs read-write, allowing motherboard... by snuxoll on Monday February 01, 2016 @01:41PM (#11014122)
Hybrid MBR is an extremely fragile and hackish technique to make crappy old firmware boot larger disks. In general I want my whole 3TB drive allocated to VM storage instead of partitioning it up so ESXi has somewhere to live, so just running that off an easily replaceable USB key is a lot simpler to maintain.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by gtrubetskoy on Saturday January 30, 2016 @01:35AM (#11000828)
FreeBSD generally avoids system calls via filesystem - it's cute because you can change kernel parameters with echo and cat, but it's generally not efficient and prone to unexpected problems such as what this whole thread is about. You can just use appropriate commands which in turn use the appropriate system calls to accomplish the same thing.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by edwintorok on Saturday January 30, 2016 @03:21AM (#11001089)
I got the efi vars in /sys/firmware/efi/vars on a Debian witht sysvinit boot (but cgmanager and systemd-login), and its mounted rw as default.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by simoncion on Friday January 29, 2016 @08:40PM (#11000068)
> If you mount efivarsfs read-only, efibootmgr can't make your system bootable.

You'd think that efibootmgr would have a "--temporarily-remount-efivarsfs-readwrite" flag to handle that very thing, given hardware vendors' long history of getting UEFI dangerously wrong. :/

Re:Systemd mounted efivarfs read-write, allowing motherboard... by victorhugo31337 on Friday January 29, 2016 @07:36PM (#10999767)
I think the "Year of Linux on the desktop" thing is BS and needs to stop. It's been the year of Linux on the desktop for 15 years now. Can't GNU/Linux just be a solid server platform? Not trying to be a troll, but if someone says "the year of Linux on the desktop" one more time...
Re:Systemd mounted efivarfs read-write, allowing motherboard... by enedil on Friday January 29, 2016 @08:01PM (#10999901)
Linux is important on dekstops to thrive. I've successfully transitioned my parents to Linux. What I got? Deser maintainance, more reliability, everything just works for them.

And of course, sticking to proprietary solutions in a long run would be rather a sick idea.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by pdkl95 on Friday January 29, 2016 @10:15PM (#11000317)
> Linux is important on dekstops to thrive.

That's what distros are for. The "Linux" family of operating systems are used for a very wide variety of uses, some of which are orthogonal (and sometimes incompatible) with "desktop" features.

Something like "Year of the KDE desktop" or "Year of the Linux Mint desktop" would make much more sense than trying to shove all of Linux into one pigeon hole. In fact, even within "desktop" there is variation. While an easy to use, mostly automagic desktop is a good idea, that's not the only definition of "desktop".

Ultimately, this is the the biggest problem with the idea of "THE Linux desktop"[1]: one size never fits all. Fortunately, Linux distributions exist[2] allowing for great variety - including "everything just works" desktop distributions. Just remember that the Linux ecosystem is larger than one type of distro.

[1] and systemd, and 15+ years ago the "desktop environments" that insisted there should be only one GUI toolkit, etc

[2] This assumes distros decide to keep their own identity instead of continuing on the homogeneity bandwagon that many joined when they converted to systemd. Turning into a clone of Red Hat is the path to obsolescence.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by threatofrain on Saturday January 30, 2016 @04:36AM (#11001254)
I think that pretty soon features backed by machine learning and mass data collection, features like intention comprehension and prediction or voice command/search, will be commonplace and hotly desired by users.

When that happens, I don't think the Canonical or Redhat will be able to compete, and only Google will be able to create an OS on top of Linux, and open-sourcing won't do any good because the most important services will be behind Google servers.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by bhouston on Friday January 29, 2016 @08:11PM (#10999941)
Linux derivatives rule the mobile space spo in essence it won really big. The desktop is not that impoortant. And so many of its paradigms are quite dated compared to the mobile experience.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by michaelmrose on Friday January 29, 2016 @10:33PM (#11000365)
The mobile experience is in a lot of ways absolute garbage designed by incompetents.

That the dominate platforms have any customers at all just illustrates how mediocre the entire software industry is.

If software were medicine we would still be leeching people and learning about the miasma theory of germs.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by pjmlp on Saturday January 30, 2016 @02:54AM (#11001010)
Android/Linux could become tomorrow Android/BSD or Android/QNX, Android/Almost POSIX Kernel and only OEMs and people using undocumented APIs would notice.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by threatofrain on Friday January 29, 2016 @09:48PM (#11000253)
I also think that desktop vs server are two different domains.

The desktop / personal user domain is looking like it's in the early stages of transformation, with mass data collection to support voice search and user intent prediction. While there's something to be said for privacy, I don't think consumers will care enough, and I don't think desktop linux systems outside of whatever Google may make is going to be adequately competitive.

This will likely not be a server concern. Engineers probably won't be interested in a service that opaquely collects data and sends it off to remote locations just so that they can say, "Cortana, run the Ansible script to redeploy my API server." But desktop users would find value in saying, "Cortana, move all email from unknown entities to my todo list."

Re:Systemd mounted efivarfs read-write, allowing motherboard... by uxcn on Saturday January 30, 2016 @01:20AM (#11000801)
Linux is just source for a kernel that the userland for the various distributions are built on though. It's already largely on people's phones with Android. In fact, Chrome OS is based on Linux.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by threatofrain on Saturday January 30, 2016 @04:31AM (#11001243)
That appears to validate my belief that only Google can competitively take the Linux kernel and build atop it a software stack known as a desktop/mobile/user operating system.

And if my assertion that intention prediction and voice search will be competitive features for users, features that rely on mass data collection and expensive top talent, then I think organizations like Canonical or RedHat will fall behind in the desktop/mobile/user os space.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by tdy721 on Saturday January 30, 2016 @04:59AM (#11001318)
I tend to mix up Linux and Unix and that might be the issue here... But isn't the `Apple Garden` (OSX and iOS) an example of a desktop/mobile/user operating system built on Linux?

Apple's no M$, but they are certainly competitive.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by threatofrain on Saturday January 30, 2016 @05:14AM (#11001357)
It's entirely possible that Apple takes code or inspiration from the Linux software project, but I think it's better to say that OS X is Unix based. Even if Linux and Darwin hail from Unix roots, at some point, I think they become separate projects with separate interests and fates. What's good or bad for one doesn't have to be the same for the other.

When I think of what organizations will be competing on machine-learning backed features like intention prediction or voice search, I think of Apple, Microsoft, or Google. Those OS features won't be inside the OS. They'll be backed by a wealth of proprietary data hidden behind company servers.

I think user expectations for what a modern OS ought do will evolve, and I don't think Canonical or Redhat will be able to catch up to Microsoft, Apple, or Google.

Eventually, what we think of "Linux OS" will be Android (and if you want, OS X) and maybe some other offerings by these big giants, but the most user-demanded features won't be on the OS. Therefore, Samsung can't just fork Android and expect to compete sans Google, and Canonical or Redhat won't be able to compete either.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by uxcn on Saturday January 30, 2016 @11:47AM (#11002533)
> It's entirely possible that Apple takes code or inspiration from the Linux software project, but I think it's better to say that OS X is Unix based.

Apple can't take code from Linux as the code is GPL licensed. OSX is largely based on NeXT and BSD. Linux and OSX are both POSIXish though.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by evacchi on Saturday January 30, 2016 @12:50PM (#11002844)
OS X had been UNIX certified, at some point, though. Don't know if that is still true
Re:Systemd mounted efivarfs read-write, allowing motherboard... by uxcn on Sunday January 31, 2016 @12:55PM (#11007183)
It is. Various optional things from POSIX are missing though (https://github.com/uxcn/yafd/blob/master/src/c/pthread-dw.h).
Re:Systemd mounted efivarfs read-write, allowing motherboard... by uxcn on Saturday January 30, 2016 @11:39AM (#11002511)
No, OSX is based on NeXT, which was based on Mach, and BSD. As far as I know, iOS is proprietary.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by unethical_ban on Friday January 29, 2016 @09:22PM (#11000188)
I believe that broad games support and GPU driver support in the past two years has made Linux more viable for a lot of the kind of people who might not install it. I have been running a linux-only household for a year now.

Offices most certainly could run linux only if they weren't chickenshit (I mostly kid, but after seeing how broken the desktop management model is now anyway, I don't see why Linux can't be used more in Corporate.)

Re:Systemd mounted efivarfs read-write, allowing motherboard... by chrisper on Friday January 29, 2016 @09:00PM (#11000130)
Linux on the desktop is now a lot easier than it was 10 years ago. I just recently switched to Linux Desktop after having it used on servers for a lot longer.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by gh02t on Friday January 29, 2016 @07:36PM (#10999766)
I don't think he's kicking the can down the road, at least not all the way to end users. I think he is implying that it's something distros should do, presumably after installing as part of their post-install config.

Either way is going to break things and I'm sure there'd be people lining up to complain about them making it ro by default or adding some sort of safety layer in. Might as well leave it as it is and let the various distros do what they want with it. I do think though that someone should do something and this sort of thing shouldn't be possible, but I can understand the stance of leaving it up to the distros to decide as a reasonable compromise.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by bootload on Friday January 29, 2016 @08:57PM (#11000120)
"Nobody sells a chainsaw with safeties disabled, remarking 'you can always attach the chain catcher'"

Last week after a storm I watched two blokes cut up some fallen wood. One held the chainsaw, the other ran the wood over the blade.

When you start using tools at a low enough level, there are some things you cannot guard against.

  Mounting efivarfs read/write by default 
  can lead to accidental deletion of the 
  EFI variables. -- laloch 
At system level there no way this should happen. That is like having a chainsaw with a reversible saw motion.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by avereveard on Friday January 29, 2016 @07:30PM (#10999733)
"let's make everything a filesystem so it's dead easy to hang yourself from userland tools"
Re:Systemd mounted efivarfs read-write, allowing motherboard... by cmiles74 on Friday January 29, 2016 @08:36PM (#11000057)
Let's make everything a filesystem... so that they are easy to access and modify.

Anyone can "rm -rf" anything, that doesn't mean that they should.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by Sanddancer on Friday January 29, 2016 @09:10PM (#11000154)
Except that the UEFI spec has a shitton of bits and pieces where the filesystem metaphor falls apart on. There are attributes that determine which parts of the boot process variables are visible in, variables that should require a guid in addition to data, etc. It's an ugly, messy protocol that really does require specialty tools.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by LoSboccacc on Friday January 29, 2016 @08:40PM (#11000071)
that's a pretty weak argument. fault is in the firmware, but design of thing is important. it's why ATM gives the card back before the money. they don't just tell the user to suck it up. they implement good, safe best practices.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by billfor on Friday January 29, 2016 @10:04PM (#11000298)
The new Citibank ATMs that take the chip card hold onto it until after you've taken your money. I already accidentally left my card in a machine after taking the cash.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by protomyth on Friday January 29, 2016 @10:19PM (#11000330)
Wow, that's some bad UI. Wells Fargo ATMs require you to take your card before it gives you the money.
Re:Systemd mounted efivarfs read-write, allowing motherboard... by bitwize on Saturday January 30, 2016 @02:58AM (#11001026)
People learned the hard way what good UI was for this sort of thing -- by having bank clients complain about ATMs eating their card after they took the money and left the card in the slot.

I know, I was one of those before my bank got newer, smarter ATMs.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by CodeWriter23 on Saturday January 30, 2016 @04:18AM (#11001208)
I was taught "least privilege" was a fundamental principle of computer security. I guess this guy was taught differently.

Actually, it's more like this. I remember when I used to blame my users for what my software could do.

Re:Systemd mounted efivarfs read-write, allowing motherboard... by whydid on Saturday January 30, 2016 @12:37AM (#11000691)
Yeah, it's called empathy for your users.