Enable grub zfsSupport if zfs is built into the initrd
This commit is contained in:
parent
3c6e2fbba9
commit
02ab48d0ee
@ -7,7 +7,7 @@ let
|
|||||||
cfg = config.boot.loader.grub;
|
cfg = config.boot.loader.grub;
|
||||||
|
|
||||||
realGrub = if cfg.version == 1 then pkgs.grub
|
realGrub = if cfg.version == 1 then pkgs.grub
|
||||||
else pkgs.grub2.override { zfsSupport = cfg.zfsSupport };
|
else pkgs.grub2.override { zfsSupport = cfg.zfsSupport; };
|
||||||
|
|
||||||
grub =
|
grub =
|
||||||
# Don't include GRUB if we're only generating a GRUB menu (e.g.,
|
# Don't include GRUB if we're only generating a GRUB menu (e.g.,
|
||||||
|
@ -133,7 +133,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd = mkIf inInitrd {
|
boot.initrd = mkIf inInitrd {
|
||||||
kernelModules = [ "spl" "zfs" ] ;
|
kernelModules = [ "spl" "zfs" ];
|
||||||
extraUtilsCommands =
|
extraUtilsCommands =
|
||||||
''
|
''
|
||||||
cp -v ${zfsPkg}/sbin/zfs $out/bin
|
cp -v ${zfsPkg}/sbin/zfs $out/bin
|
||||||
@ -148,6 +148,10 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.loader.grub = mkIf inInitrd {
|
||||||
|
zfsSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services."zpool-import" = {
|
systemd.services."zpool-import" = {
|
||||||
description = "Import zpools";
|
description = "Import zpools";
|
||||||
after = [ "systemd-udev-settle.service" ];
|
after = [ "systemd-udev-settle.service" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user