diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-08-10 08:36:59 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-08-10 08:36:59 +0000 |
commit | 8c960af98488c7585ef05a21013700783b1adede (patch) | |
tree | 3320ea6739cc9a9d20df9834913a07a9fc8e322f /modules | |
parent | cddc67a6538e67bc6409fc81be2b8148d74b5f19 (diff) | |
download | nixlib-8c960af98488c7585ef05a21013700783b1adede.tar nixlib-8c960af98488c7585ef05a21013700783b1adede.tar.gz nixlib-8c960af98488c7585ef05a21013700783b1adede.tar.bz2 nixlib-8c960af98488c7585ef05a21013700783b1adede.tar.lz nixlib-8c960af98488c7585ef05a21013700783b1adede.tar.xz nixlib-8c960af98488c7585ef05a21013700783b1adede.tar.zst nixlib-8c960af98488c7585ef05a21013700783b1adede.zip |
* Handle the case where /boot is on the same filesystem as /
but on a different filesystem than /nix/store. In that case we need to copy the kernels and initrds to /boot. svn path=/nixos/trunk/; revision=23085
Diffstat (limited to 'modules')
-rw-r--r-- | modules/installer/grub/grub-menu-builder.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/modules/installer/grub/grub-menu-builder.sh b/modules/installer/grub/grub-menu-builder.sh index 0d5ddf607870..fc246847eed3 100644 --- a/modules/installer/grub/grub-menu-builder.sh +++ b/modules/installer/grub/grub-menu-builder.sh @@ -25,17 +25,20 @@ case "$grubVersion" in esac -# Discover whether /boot is on the same filesystem as /. If not, then -# all kernels and initrds must be copied to /boot, and all paths in -# the GRUB config file must be relative to the root of the /boot -# filesystem. `$bootRoot' is the path to be prepended to paths under -# /boot. -if [ "$(stat -c '%D' /.)" = "$(stat -c '%D' /boot/.)" ]; then - bootRoot=/boot - copyKernels="@copyKernels@" # user can override in the NixOS config -else +# Discover whether /boot is on the same filesystem as / and +# /nix/store. If not, then all kernels and initrds must be copied to +# /boot, and all paths in the GRUB config file must be relative to the +# root of the /boot filesystem. `$bootRoot' is the path to be +# prepended to paths under /boot. +if [ "$(stat -c '%D' /.)" != "$(stat -c '%D' /boot/.)" ]; then bootRoot= copyKernels=1 +elif [ "$(stat -c '%D' /boot/.)" != "$(stat -c '%D' /nix/store/.)" ]; then + bootRoot=/boot + copyKernels=1 +else + bootRoot=/boot + copyKernels="@copyKernels@" # user can override in the NixOS config fi |