You cant modprobe efivars from within the chroot, so modprobe efivars when booting an efi-compatible install CD

svn path=/nixos/trunk/; revision=33241
This commit is contained in:
Shea Levy 2012-03-18 18:55:47 +00:00
parent 8ca2aff772
commit 53580d514a
2 changed files with 3 additions and 1 deletions

View file

@ -196,6 +196,8 @@ in
boot.initrd.kernelModules = [ "loop" ];
boot.kernelModules = pkgs.stdenv.lib.optional config.isoImage.makeEfiBootable "efivars":
# In stage 1, mount a tmpfs on top of / (the ISO image) and
# /nix/store (the squashfs image) to make this a live CD.
boot.initrd.postMountCommands =

View file

@ -93,7 +93,7 @@ mkdir -p "@efiSysMountPoint@/efi/nixos/"
# Remove all old boot manager entries
if test -n "@runEfibootmgr@"; then
set +e
modprobe efivars
modprobe efivars > /dev/null 2>&1
for bootnum in $(efibootmgr | grep "NixOS" | grep "Generation" | sed 's/Boot//' | sed 's/\*.*//'); do
efibootmgr -B -b "$bootnum" > /dev/null 2>&1
done