This tries to be(come) a solution for at least the problems I and II described here. Ideally the other problems described there, can also be dealt with.
This is still a work in progress!
This is still a work in progress!
This is still a work in progress!
This is still a work in progress!
This is still a work in progress!
This is still a work in progress!
This is still a work in progress!
Situtation
What we want
I guess we ultimately want the following:
- Make filesystems (named in /etc/fstab) "available".
Make block devices (for their own - not because of any special filesystem on top should be mouted) "available".
and in a further step (problem IV) make them all cleanly "unavailable" (on halt/reboot/kexec/etc.).
Making something "available" means, to mount (filesystem) or create/open (block device) it in a clean way, as well as all necessary steps for this, i.e. all other steps of making things available, where the actual target sits on top of (e.g. opening LVM/dm-crypt/loop devices etc. below a filesystem to be mounted).
Secondary goals are:
- Support both, the root-filesystem and non-root-filesystems.
- Support suspend-modes (and therefore resume devices).
- Support systems with initramfs-images, and as far as possible systems without.
- Support init-systems (e.g. sysvinit).
- If scanning (e.g. btrfsctl -a, vgscan, etc.) is necessary try to do this only when necessary.
As far as possible, try to not use statically generated information.
- During the initramfs, try to only activate/open/scan for/mount stuff that is needed for booting (the root-filesystem and resume-devices).
- Only add stuff (modules, userspace tools) to initramfs images that are really required for booting (i.e. necessary to make the root-filesystems and the resume-devices available).