#1843 PR merged
: Fixed, simplified and enhanced GRUB2 installation¶
Labels: enhancement
, bug
, documentation
, cleanup
,
fixed / solved / done
jsmeix opened issue at 2018-06-26 14:50:¶
Fixed, simplified and enhanced GRUB2 installation
plus fixed typos 'whereto' -> 'where to'
-
Type: Bug Fix and Enhancement
-
Impact: High
-
Reference to related issue (URL):
https://github.com/rear/rear/issues/1828 -
How was this pull request tested?
Currently tested only on SLES12 to keep backward compatibility
(as far as I can test it with reasonable effort for me).
I need to also test it on SLES15 (tomorrow). -
Brief description of the changes in this pull request:
Fixed finalize/Linux-i386/620_install_grub2.sh according to
https://github.com/rear/rear/issues/1828#issuecomment-398717889
Enhanced GRUB2 installation by the new config variable
GRUB2_INSTALL_DEVICES so that now the user can specify
what he wants if needed.
Cleaned up finalize/Linux-i386/620_install_grub2.sh
from old inconsistent and even contradictory looking code.
jsmeix commented at 2018-06-27 12:17:¶
With the current state things do "just work" for me also on SLES15.
jsmeix commented at 2018-06-28 13:53:¶
With the current state things work much safer for me on SLES12.
SLES15 will be tested tomorrow.
I am still not fully satisfied how
finalize/GNU/Linux/250_migrate_disk_devices_layout.sh
behaves (e.g. it replaces disks like sda => sdb
also in comments) but
for now
its changes are no longer possibly fatal for the user because since
https://github.com/rear/rear/pull/1843/commits/632bc2dee4d5b82cfe91416c81254f0bc9919a70
it behaves safer because the original restored files get saved before
they get modified.
jsmeix commented at 2018-06-29 08:10:¶
In finalize/GNU/Linux/250_migrate_disk_devices_layout.sh
I will add the inexplicably missing popd
at the end
which is missing since the beginning of that script according to
# git log -p --follow usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh
I cannot see a reason why it is not there in this particular script
but all other finalize
scripts have paired pushd
and popd
:
# for f in $( usr/sbin/rear -s recover | grep -o 'finalize/.*' ) ; do f=usr/share/rear/$f ; echo $f ; egrep '^pushd|^popd' $f ; done usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh pushd $TARGET_FS_ROOT >/dev/null usr/share/rear/finalize/GNU/Linux/250_migrate_lun_wwid.sh pushd $TARGET_FS_ROOT >&2 popd >&2 usr/share/rear/finalize/GNU/Linux/280_migrate_uuid_tags.sh pushd $TARGET_FS_ROOT >/dev/null popd >/dev/null
I found another lonely pushd
in
output/ISO/Linux-ia64/800_create_isofs.sh
by inspecting the output of
# for f in $( find usr/sbin/rear usr/share/rear/ ) ; do test -f $f || continue ; echo $f ; egrep 'pushd|popd|return' $f 2>/dev/null ; echo =================================== ; done
jsmeix commented at 2018-06-29 11:23:¶
With the current state things do "just work" for me
on SLES12 and also on SLES15.
SLES11 is not affected because SLES11 uses GRUB Legacy.
I will merge it soon today unless there are objections
because I like to have those changes tested by users
who use our latest GitHub master code.
Next week I like to clean up the GRUB2 installation
in the same way for the PPC64LE architecture, i.e.
usr/share/rear/finalize/Linux-ppc64le/620_install_grub2.sh
gdha commented at 2018-08-22 07:19:¶
A recent test ( https://github.com/gdha/rear-automated-testing/issues/65 ) revealed that the new code fails on centos/7
[Export of Github issue for rear/rear.]