mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
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:
parent
8ca2aff772
commit
53580d514a
2 changed files with 3 additions and 1 deletions
|
@ -196,6 +196,8 @@ in
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "loop" ];
|
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
|
# In stage 1, mount a tmpfs on top of / (the ISO image) and
|
||||||
# /nix/store (the squashfs image) to make this a live CD.
|
# /nix/store (the squashfs image) to make this a live CD.
|
||||||
boot.initrd.postMountCommands =
|
boot.initrd.postMountCommands =
|
||||||
|
|
|
@ -93,7 +93,7 @@ mkdir -p "@efiSysMountPoint@/efi/nixos/"
|
||||||
# Remove all old boot manager entries
|
# Remove all old boot manager entries
|
||||||
if test -n "@runEfibootmgr@"; then
|
if test -n "@runEfibootmgr@"; then
|
||||||
set +e
|
set +e
|
||||||
modprobe efivars
|
modprobe efivars > /dev/null 2>&1
|
||||||
for bootnum in $(efibootmgr | grep "NixOS" | grep "Generation" | sed 's/Boot//' | sed 's/\*.*//'); do
|
for bootnum in $(efibootmgr | grep "NixOS" | grep "Generation" | sed 's/Boot//' | sed 's/\*.*//'); do
|
||||||
efibootmgr -B -b "$bootnum" > /dev/null 2>&1
|
efibootmgr -B -b "$bootnum" > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue