Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount efivars read-only #134

Closed
dakkar opened this issue May 21, 2017 · 4 comments
Closed

Mount efivars read-only #134

dakkar opened this issue May 21, 2017 · 4 comments

Comments

@dakkar
Copy link

dakkar commented May 21, 2017

Hello!
/etc/init.d/sysfs mounts efivars with the same options as all the other /sys/** filesystems. This will usually result on it being mounted read-write.
But (as discussed in systemd/systemd#2402) this may not be the best choice.
Maybe when mounting efivarsfs we could specify ro.
What do you think?

@cromerc
Copy link
Contributor

cromerc commented May 21, 2017

I second the change to "ro". I had an issue with systemd mouting efivars as rw while doing an install of Fedora. The fedora installer did something during install(even though I specified that I didn't want to install a bootloader......) that left my entire efi setup was completely erased leaving me with an unbootable system. It erased my arch linux, gentoo, and windows efi files...
Mounting it as rw by default is dangerous. It is better to remount as rw when something needs to be changed, then remount back to ro after the changes are done.

@superm1
Copy link

superm1 commented Aug 8, 2018

Mounting read only is causing problems with fwupdate and efibootmgr. See
fwupd/fwupd#625

Furthermore it's not necessary since the kernel makes efivarfs immutable.
torvalds/linux@ed8b0de

@cromerc
Copy link
Contributor

cromerc commented Aug 12, 2018

@superm1 Considering that many distros are still shipping 3.x kernels still(Cent OS, Debian, Zentyal, RHEL, etc), it is still a necessary precaution in OpenRC to mount them RO by default. Making it an option in OpenRC that can be changed would make more sense.

@joakim-tjernlund
Copy link

yes, a config option / USE flag makes most sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants