Open 00Asgaroth00 opened 10 months ago
Hi @00Asgaroth00,
I also installed a machine using this script and I am getting the same error while trying to run nixos-rebuild switch
.
Someone pointed out this workaround: https://github.com/NixOS/nixpkgs/issues/262266#issuecomment-1772743499
But I still have to see if it works
Changed
boot.loader.grub.extraInstallCommands = ''
ESP_MIRROR=$(mktemp -d)
cp -r /boot/efi/EFI $ESP_MIRROR
for i in /boot/efis/*; do
cp -r $ESP_MIRROR/EFI $i
done
rm -rf $ESP_MIRROR
'';
to
boot.loader.grub.extraInstallCommands = ''
ESP_MIRROR=$(${pkgs.coreutils}/bin/mktemp -d)
${pkgs.coreutils}/bin/cp -r /boot/efi/EFI $ESP_MIRROR
for i in /boot/efis/*; do
${pkgs.coreutils}/bin/cp -r $ESP_MIRROR/EFI $i
done
${pkgs.coreutils}/bin/rm -rf $ESP_MIRROR
'';
To make it work
Hi,
First of all, thank you for this script!!
I'm (very) new to nixos and used your script to build zfs on my boot disk, installed nixos (using flake) and then rebooted, all good, everything comes up. However, if i try to update my configuration, the switch fails with the following messages:
mktemp appears to be installed on the system (within the nix-shell):
as the super user on the system
The content of the install-grub.sh script is as follows:
The modifications I made to your script when installing the system can be seen HERE, the changes I made were:
[1] DISK variable [2] ROOTPW variable [3] Forced creation of boot pool (added -f on line 118) [4] Forced creation of root pool (added -f on line 135)
Any thoughts on this, have you encountered this issue when using the script?