#2108 PR merged: Fixes for more than one disk

Labels: fixed / solved / done, minor bug

jsmeix opened issue at 2019-04-04 12:00:

1.)
The changes in layout/prepare/default/250_compare_disks.sh
avoid that it goes into MIGRATION_MODE with

Ambiguous possible target disks need manual configuration (more than one with same size found)

in any case when there is more than one disk.

Before it compared for all disks how often any original disk size
matches any possible target disk size and when there are
more disks e.g. both on the original system and on the target system
there are /dev/sda with 10 GiB and /dev/sdb with 20 GiB
then 10 GiB original disk size matches 10 GiB target disk size
and 20 GiB original disk size matches 20 GiB target disk size
which are all together two matches which falsely leads to the
"more than one with same size found".

Now it compares separatedly for each original disk size
if there are more than one (target disk) with same size found.

Basically a reset found_orig_size_on_replacement_hardware=0
was missing for each original disk size.

2.)
The changes in finalize/Linux-i386/660_install_grub2.sh
avoid that GRUB2 gets needlessly installed two times on the same device.

When there are more disks like /dev/sda and /dev/sdb it can happen that
for /dev/sda bootdisk=/dev/sda and GRUB2 gets installed on /dev/sda and
also for /dev/sdb bootdisk=/dev/sda and GRUB2 would get installed again there.

Now we remember in the grub2_installed_disks array where GRUB2
was already successfully installed and skip installing GRUB2 on a disk
in that array.

jsmeix commented at 2019-04-04 12:04:

@gdha
could you have a look at the plain code changes if they look o.k. to you
because I would like to have it in ReaR 2.5 - except it smells "fishy" ;-)

jsmeix commented at 2019-04-05 12:52:

If there are no objections I woud like to merge it today.


[Export of Github issue for rear/rear.]