Merge pull request #112961 from r-burns/nixos-test-grub

nixosTests.installer: fix non-zfs grub tests
This commit is contained in:
Jacek Galowicz 2021-02-18 11:58:57 +01:00 committed by GitHub
commit bc7a369c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -325,10 +325,13 @@ let
curl
]
++ optional (bootLoader == "grub" && grubVersion == 1) pkgs.grub
++ optionals (bootLoader == "grub" && grubVersion == 2) [
(pkgs.grub2.override { zfsSupport = true; })
(pkgs.grub2_efi.override { zfsSupport = true; })
];
++ optionals (bootLoader == "grub" && grubVersion == 2) (let
zfsSupport = lib.any (x: x == "zfs")
(extraInstallerConfig.boot.supportedFilesystems or []);
in [
(pkgs.grub2.override { inherit zfsSupport; })
(pkgs.grub2_efi.override { inherit zfsSupport; })
]);
nix.binaryCaches = mkForce [ ];
nix.extraOptions = ''
@ -398,9 +401,9 @@ let
createPartitions = ''
machine.succeed(
"flock /dev/vda parted --script /dev/vda -- mklabel gpt"
+ " mkpart ESP fat32 1M 50MiB" # /boot
+ " mkpart ESP fat32 1M 100MiB" # /boot
+ " set 1 boot on"
+ " mkpart primary linux-swap 50MiB 1024MiB"
+ " mkpart primary linux-swap 100MiB 1024MiB"
+ " mkpart primary ext2 1024MiB -1MiB", # /
"udevadm settle",
"mkswap /dev/vda2 -L swap",