Bug#551555: mountnfs.sh: start should declare dependency on name resolver

Dmitry Bogatov KAction at debian.org
Fri Jan 11 12:36:43 GMT 2019


[2019-01-08 16:32] Petter Reinholdtsen <pere at hungry.com>
> [Dmitry Bogatov]
> >> Unfortunately $named can not be listed as a dependency for
> >> mountnfs.sh, as it would generate a dependency loop.  First of all,
> >> all known implementations of $named start in rc2.d, while mountnfs.sh
> >> need to happen in rcS.d/ if /usr/ is an NFS volume.
> >
> > Correct me if I am wrong, but on modern installations /usr is mounted by
> > initramfs (note usrmerge initiative), so I believe we could move
> > mountnfs.sh from S to (2 3 4 5) (with some modifications to not try
> > mount multiple times).
> >
> > Objections?
> 
> No objections, but note there used to be several scripts in rcS.d/
> depending on /usr/ being mounted, and these need to be moved from S to
> (2 3 4 5) first.

As far as I can tell, we can assume /usr being mounted (if it is
separate from /) at time /sbin/init is launched.

Another issue is that definition of $remote_fs is *all* file systems are
mounted. And there is some scripts, which 'Default-Start: S', depending
on $remote_fs.  Seems to get this issue resolved, we need to get
following list of packages to get rid of dependency on $remote_fs or
move to (2 3 4 5) runlevels. Correct?

	alsa-utils
	arno-iptables-firewall
	auto6to4
	dpdk
	eeepc-acpi-scripts
	espeakup
	fcoe-utils
	ferm
	initscripts
	ipsec-tools
	lm-sensors
	netfilter-persistent
	oss4-base
	pidentd
	policycoreutils
	prads
	pyroman
	quota
	racoon
	screen
	setserial
	shorewall
	shorewall-init
	shorewall-lite
	shorewall6
	shorewall6-lite
	switchconf
	x11-common
	zfs-fuse
	zvbi

It results in 25 maintainers affected. Sounds like MBF.

> Also, I do not believe any initrd will NFS mount /usr/, so the use case
> described do not really match your description.  When /usr/ is NFS
> mounted (for example because of size constraints), it is not possible to
> merge / and /usr/.

True. initramfs knows only two modes of operation -- either remote root
(nfs mode) or local root (local mode). It does not know, what to do, if
root is local and /usr is remote. Given upcoming `usrmerge', I do not
consider this limitation serious.

But if for some reason you prefer to have local root and remote /usr,
you could do this -- just modify your initramfs. I just conjured
following kludge for specific case of two virtual machines, 10.0.0.2 as
nfs-server and 10.0.0.3 as local-root,remote-usr:

	ip link set up dev ens3
	ip addr add 10.0.0.3/16 dev ens3
	nfsmount 10.0.0.2:/usr /root/usr

	^^^^^^^^ This snippet is to be inserted into mountroot()
	function in /usr/share/initramfs-tools/scripts/local.

Probably, proper hook could be written and installed.




More information about the Debian-init-diversity mailing list