neededForBoot flag
Hi,
Is there a way to make a fileSystem marked neededForBoot?
Right now I am having some issues because a filesystem is not mounted soon enough.
I currently set the nixos options for it just fine, since disko doesn't really need it for formatting or mounting
See my config:
https://github.com/lilyinstarlight/foosteros/blob/9dc10cbc68b56c02cd10642061a14b7fddf8adb5/hosts/bina/disks.nix#L117-L118
I'm interested in this too, for a slightly different reason.
I have a setup where I have a root disk that is just plain btrfs on a smaller SSD. I then have a data drive that is larger, and LUKS encrypted.
Because Disko automatically adds an initrd.luks.devices entry, I'm prompted for a passphrase on every boot. In reality, I don't need that drive to be unlocked at the initrd phase, and normally just have an /etc/crypttab file that specifies a key file. I'd like to be able to specify an encrypted drive that doesn't end up requiring unlocking during the initrd part of the boot.
Hopefully that makes sense? The inclusion of a neededForBoot = false type option could change the behaviour here to not modify the initrd config?
Can't use @lilyinstarlight's strategy for zfs "native" mounts, gotta use a "legacy" mount instead.
@yangm97 If you want to use ZFS native mounts, simply set: boot.initrd.systemd.enable = true.
@jnsgruk I agree with your reasoning. Because this flag would influence disko's behavior, it is valid to "duplicate" this option. An implementation of this feature would require the respective fileSystems.<name>.neededForBoot option to be set as well.
Note: other types might also have behavior that neededForBoot = false; should disable.
PRs are welcome.