diff options
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 4110335a9eb8..1015beeec976 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -140,7 +140,10 @@ my $driveid = 1; sub GrubFs { my ($dir) = @_; my $fs = GetFs($dir); - my $path = "/" . substr($dir, length($fs->mount)); + my $path = substr($dir, length($fs->mount)); + if (substr($path, 0, 1) ne "/") { + $path = "/$path"; + } my $search = ""; if ($grubVersion > 1) { |