95fstab-sys: mount all /etc/fstab.sys volumes before switch_root
authorIan Dall <ian@beware.dropbear.id.au>
Wed, 22 Sep 2010 14:49:19 +0000 (16:49 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 22 Sep 2010 14:50:35 +0000 (16:50 +0200)
commitecefdfc28038dad507e98774fa4ae031d647fa87
tree88cd8e13adadf65c3a43aa19173b38e9cd309f6c
parentb2dff45423ec768f7ad6c4f85db99d5835941ee1
95fstab-sys: mount all /etc/fstab.sys volumes before switch_root

A new dracut module to implement fstab.sys handling

This module implements fstab.sys handling. This has to happen after the root
mount and before the nfsroot-cleanup pre-pivot at least. I've made to happen at
the beginning of the pre-pivot scripts, although it should maybe be at the end
of the mount scripts. This latter would be harder to do because the actual
mount is currently done by 99mount-root.sh and there is no 2 digit integer
higher than 99 :-(

There are perhaps other ways of achieving this end, such as having the
nfsroot-cleanup trawl through the newroot's /etc/fstab and auto-magically
figure out if there are any mounts which are pre-requisites for the
/var/lib/nfs/rpc_pipefs mount and do them first. Likewise post pivot,
/etc/rc.sysinit could figure out of there are any pre-requisite mounts for
/var/lib/stateless/{writeable,state} before doing those mounts. In short, make
it the responsibility of anything doing a mount to check if there are any
pre-requisites in /etc/fstab and mount them first. However, this spreads the
changes needed over more places, so I favour the fstab.sys approach. Also, who
knows what other uses administartors may have put fstab.sys to? and this undoes
a regression caused by the move from mkinitrd to dracut.
modules.d/95fstab-sys/check [new file with mode: 0755]
modules.d/95fstab-sys/install [new file with mode: 0755]
modules.d/95fstab-sys/mount-sys.sh [new file with mode: 0755]