disko icon indicating copy to clipboard operation
disko copied to clipboard

neededForBoot flag

Open jsimonetti opened this issue 3 years ago • 6 comments

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.

jsimonetti avatar Mar 29 '23 16:03 jsimonetti

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

lilyinstarlight avatar Mar 29 '23 17:03 lilyinstarlight

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?

jnsgruk avatar May 11 '23 14:05 jnsgruk

Can't use @lilyinstarlight's strategy for zfs "native" mounts, gotta use a "legacy" mount instead.

yangm97 avatar Jun 15 '23 20:06 yangm97

@yangm97 If you want to use ZFS native mounts, simply set: boot.initrd.systemd.enable = true.

jpds avatar May 27 '24 14:05 jpds

@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.

iFreilicht avatar Sep 20 '24 20:09 iFreilicht