From 79bcc7618e2cebf761f59bc641d55fa5c6057149 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 15 Dec 2009 21:11:39 +0000 Subject: [PATCH] * Make the graphical boot work on GRUB 2 in the case where /nix/store is not on the same partition as /boot (i.e. when boot.loader.grub.bootDevice is set): just copy the background image and the font to /boot. svn path=/nixos/trunk/; revision=18979 --- modules/installer/grub/grub-menu-builder.sh | 25 ++++++++------------- modules/installer/grub/grub.nix | 17 ++++---------- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/modules/installer/grub/grub-menu-builder.sh b/modules/installer/grub/grub-menu-builder.sh index c09b13f801d..1cce302fdf0 100644 --- a/modules/installer/grub/grub-menu-builder.sh +++ b/modules/installer/grub/grub-menu-builder.sh @@ -28,32 +28,25 @@ esac prologue() { - if test -n "@splashImage@"; then - splashLocation="@splashImage@" - if test "$grubVersion" -eq 1 ; then - # Splash images in /nix/store don't seem to work, so copy them. - cp -f $splashLocation /boot/background.xpm.gz - splashLocation="$bootDevice/background.xpm.gz" - fi - fi - case "$grubVersion" in 1) + cp -f "@splashImage@" /boot/background.xpm.gz cat > "$1" << GRUBEND # Automatically generated. DO NOT EDIT THIS FILE! default @default@ timeout @timeout@ GRUBEND if test -n "@splashImage@"; then - echo "splashimage $splashLocation" >> "$1" + echo "splashimage $bootDevice/background.xpm.gz" >> "$1" fi ;; 2) + cp -f @grub@/share/grub/unicode.pf2 /boot/grub/unicode.pf2 cat > "$1" <> "$1" < version == 2; + environment.systemPackages = mkIf config.boot.loader.grub.enable [ grub ]; - if version == 1 - then [ pkgs.grub ] - else [ pkgs.grub2 ]); - - # and many other things that have to be moved inside this file. - }; }