* 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
This commit is contained in:
parent
cddc67a653
commit
8c960af984
|
@ -25,17 +25,20 @@ case "$grubVersion" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# Discover whether /boot is on the same filesystem as /. If not, then
|
# Discover whether /boot is on the same filesystem as / and
|
||||||
# all kernels and initrds must be copied to /boot, and all paths in
|
# /nix/store. If not, then all kernels and initrds must be copied to
|
||||||
# the GRUB config file must be relative to the root of the /boot
|
# /boot, and all paths in the GRUB config file must be relative to the
|
||||||
# filesystem. `$bootRoot' is the path to be prepended to paths under
|
# root of the /boot filesystem. `$bootRoot' is the path to be
|
||||||
# /boot.
|
# prepended to paths under /boot.
|
||||||
if [ "$(stat -c '%D' /.)" = "$(stat -c '%D' /boot/.)" ]; then
|
if [ "$(stat -c '%D' /.)" != "$(stat -c '%D' /boot/.)" ]; then
|
||||||
bootRoot=/boot
|
|
||||||
copyKernels="@copyKernels@" # user can override in the NixOS config
|
|
||||||
else
|
|
||||||
bootRoot=
|
bootRoot=
|
||||||
copyKernels=1
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue