When using mirroredBoots with / on tmpfs, the following error occurs when building or rebuilding nixos:
... evaluating file '/nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/tools/misc/grub/2.0x.nix' evaluating file '/nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/development/tools/gnulib/default.nix' updating GRUB 2 menu... updating GRUB 2 menu... updating GRUB 2 menu... Failed to get blkid info (returned 512) for / on tmpfs at /nix/store/nvycxmg4g2q5jyqdxfvkgi95sqs48iw3-install-grub.pl line 202. warning: error(s) occurred while switching to the new configuration
The build stops there. However, the build is actually completed and Grub updated, so I can reboot into the new derivation.
This doesn’t occur with a normal / on tmpfs installation, only / on tmpfs using mirroredBoots.
It’s not a showstopper since the new build still completes and activates, but it’s a little concerning nonetheless. Anyone know what might be the problem?
Additional info from Github Issue:
Steps to reproduce the behavior:
hardware-configuration.nixwith / on tmpfs.
hardware-configuration.nixfor mirroredBoots with two EFI boot partitions on different drives , 
nix-rebuild(dry-build and dry-activate succeed with no error, only boot/switch/etc cause this error)
Re/Build should complete as normal.
It seems the problem is that
blkid / returns nothing when / is on tmpfs. Can verify this by calling blkid on the commandline. However, this error does not occur on a normal, single-boot-partition / on tmpfs configuration, only when using mirroredBoots simultaneously with / on tmpfs.
configuration.nix (boot properties subset) and
hardware-configuration.nix in this gist: boot section of configurtion.nix, troubleshooting mirroredBoots with / on tmpfs · GitHub
nix-shell -p nix-info --run "nix-info -m" and paste the result.
- host os:
Linux 5.10.48, NixOS, 21.05.1408.9376bf7b342 (Okapi)
nix-env (Nix) 2.3.12