summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index fedb4a15e..62a046fe9 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -109,9 +109,11 @@ sub get_label {
sub mkinitrd {
my ($kernel_version, $bootloader, $entry, $initrd) = @_;
+ my $dir = dirname($initrd);
return $initrd if $::testing # testing mode
|| -e "$::prefix/$initrd" # already exists
- || $initrd =~ /\(hd/; # unrecognized partition
+ || $initrd =~ /\(hd/ # unrecognized partition
+ || !-d $dir; # dir doesn't exist (probably !mounted foreign part)
# for /boot on dos partitions when installing on loopback file on dos partition
my $loop_boot = fs::loopback::prepare_boot();