OpenRC filters /etc/init.d/{localmount,netmount} to not run on most containerised systems, including lxc (and others) However, this doesn't necessarily seem correct. At least on LXD, we can't easily force mounts at boot and the recommended solution by upstream is to rely on fstab Indeed, manually running localmount, correctly parses fstab and mounts local mounts, but we cannot force this at boot time https://discuss.linuxcontainers.org/t/how-to-mount-tmp-as-tmpfs-in-alpine-linux/5070/9 I propose that we should drop at least "-lxc" from the init.d/{localmount,netmount} scripts. However, there might be an argument for dropping this for other jails/containers (docker, systemd-nspawn, vserver perhaps?) also? Such a change has already been implemented in alpine (patch referenced in the thread above)
(In reply to Ed Wildgoose from comment #0) > OpenRC filters /etc/init.d/{localmount,netmount} to not run on most > containerised systems, including lxc (and others) I have pathched my init.d/netmount so it does not ignore LXC. But as a result, I need to re-patch on every openrc upgrade. I think that this behavior should be configurable via /etc/conf.d/{localmount,netmount}
(In reply to kiwi93872 from comment #1) > (In reply to Ed Wildgoose from comment #0) > > OpenRC filters /etc/init.d/{localmount,netmount} to not run on most > > containerised systems, including lxc (and others) > > I have pathched my init.d/netmount so it does not ignore LXC. But as a > result, I need to re-patch on every openrc upgrade. https://wiki.gentoo.org/wiki//etc/portage/patches
(In reply to Sam James from comment #2) > (In reply to kiwi93872 from comment #1) Thanks for pointing out. That is why I like Gentoo - it has a built-in customizer for almost everything.