Disko defaults to automounting zfs datasets which conflicts with /etc/fstab

Hi!

I found out that using nixos-anywhere. When I define zfs datasets with specified mountpoints zfs tries to automount them at boot which conflicts with /etc/fstab. When I don’t specify mountpoint I get an error “no root filesystem”. I could of course manually set all fileSystems in hardware-conf.nix but what about /boot? I wouldn’t know the name of this partition unless I run nixos-anywhere, but that results in a broken system.

So, my questions are:

Why does disko defaults to zfs automounting if it clearly conflicts with fstab?

Is it possible to set mountpoint = “legacy” in disko.nix?

Best,

Miro

You can set options.mountpoint = "legacy"; on the dataset.

2 Likes

I’m not sure but I think I tried it and got an error something like “options.mountpoint isn’t of type absolute path or null”, but I’ll try again today!

I use it on two machines so I’m quite confident that it works. If it is not working it would be helpful if you could share your (disko) config.

It does absolutely work, however, make sure it’s under options.mountpoint as that references the ZFS mountpoint and not just mountpoint, where the nix config will attempt to mount the filesystem.

1 Like

Sorry for late reply. Had much to do… It worked.

2 Likes