summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-03 19:06:26 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-03 19:06:26 +0200
commit65ef435d7bf92eb3a1b163c95000395f54c34464 (patch)
tree1bcc6d4eabcb1e9bc8d55e04b0c683f81b0f8fbe /nixos
parente5194e5aea464e916cd77d4ce935e96f06e73aa0 (diff)
parenteee8fd89b34b40532f90ab6d87214130abfa0e02 (diff)
downloadnixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.tar
nixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.tar.gz
nixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.tar.bz2
nixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.tar.lz
nixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.tar.xz
nixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.tar.zst
nixlib-65ef435d7bf92eb3a1b163c95000395f54c34464.zip
Merge pull request #3949 from wkennington/master.grub
grub2: Add localizations
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix2
-rw-r--r--nixos/modules/system/boot/loader/grub/install-grub.pl7
2 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index 623cfdedd269..22f31c460802 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -11,7 +11,7 @@ let
   # The Grub image.
   grubImage = pkgs.runCommand "grub_eltorito" {}
     ''
-      ${pkgs.grub2}/bin/grub-mkimage -O i386-pc -o tmp biosdisk iso9660 help linux linux16 chain png jpeg echo gfxmenu reboot
+      ${pkgs.grub2}/bin/grub-mkimage -p /boot/grub -O i386-pc -o tmp biosdisk iso9660 help linux linux16 chain png jpeg echo gfxmenu reboot
       cat ${pkgs.grub2}/lib/grub/*/cdboot.img tmp > $out
     ''; # */
 
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl
index 668e74a9722e..2dad8b36db32 100644
--- a/nixos/modules/system/boot/loader/grub/install-grub.pl
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl
@@ -122,7 +122,7 @@ sub GrubFs {
                 # Based on the type pull in the identifier from the system
                 my ($status, @devInfo) = runCommand("blkid -o export @{[$fs->device]}");
                 if ($status != 0) {
-                    die "Failed to get blkid info for @{[$fs->device]}";
+                    die "Failed to get blkid info for @{[$fs->mount]} on @{[$fs->device]}";
                 }
                 my @matches = join("", @devInfo) =~ m/@{[uc $fsIdentifier]}=([^\n]*)/;
                 if ($#matches != 0) {
@@ -164,8 +164,7 @@ sub GrubFs {
     return Grub->new(path => $path, search => $search);
 }
 my $grubBoot = GrubFs("/boot");
-# FIXME: Should be /nix/store, but this fails in the installer
-my $grubStore = GrubFs("/nix");
+my $grubStore = GrubFs("/nix/store");
 
 # Generate the header.
 my $conf .= "# Automatically generated.  DO NOT EDIT THIS FILE!\n";
@@ -244,7 +243,7 @@ mkpath("/boot/kernels", 0, 0755) if $copyKernels;
 
 sub copyToKernelsDir {
     my ($path) = @_;
-    return $grubStore->path . substr($path, length("/nix")) unless $copyKernels;
+    return $grubStore->path . substr($path, length("/nix/store")) unless $copyKernels;
     $path =~ /\/nix\/store\/(.*)/ or die;
     my $name = $1; $name =~ s/\//-/g;
     my $dst = "/boot/kernels/$name";