summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 0afad1983..1939401c3 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -226,6 +226,9 @@ sub read_grub {
$bootloader;
}
+# nb:
+# - $boot_part comes from /boot/grub/install.sh "root (hd...)" line
+# - $grub2dev is /boot/grub/device.map
sub _may_fix_grub2dev {
my ($fstab, $grub2dev, $boot_part) = @_;
my $real_boot_part = fs::get::root_($fstab, 'boot') or
@@ -239,7 +242,7 @@ sub _may_fix_grub2dev {
log::l("WARNING: we have detected that device.map is inconsistent with the system");
- my ($hd_grub, undef, undef) = parse_grub_file($boot_part);
+ my ($hd_grub, undef, undef) = parse_grub_file($boot_part); # extract hdX
if (my $prev_hd_grub = find { $grub2dev->{$_} eq $real_boot_dev } keys %$grub2dev) {
$grub2dev->{$prev_hd_grub} = $grub2dev->{$hd_grub};
log::l("swapping result: $hd_grub/$real_boot_dev and $prev_hd_grub/$grub2dev->{$hd_grub}");