#1754 PR merged
: additional check for Hah!IdontNeedEFI #1752¶
Labels: fixed / solved / done
, minor bug
gdha opened issue at 2018-03-12 15:43:¶
Pull Request Details:¶
-
Type: Bug Fix
-
Impact: Low
-
Reference to related issue (URL): https://github.com/rear/rear/issues/1752
-
How was this pull request tested? on AWS system
-
Brief description of the changes in this pull request: AWS system uses GRUB as bootloader, but the boot disk was identified as EFI
jsmeix commented at 2018-03-13 14:55:¶
Perfect!
jsmeix commented at 2018-04-20 09:37:¶
Via
https://github.com/rear/rear/pull/1779
I enhanced the "Hah!IdontNeedEFI" case
so that now it also detects other non-EFI bootloaders
(in particular also GRUB2).
jsmeix commented at 2018-04-23 07:19:¶
The basic logic of the code for the "Hah!IdontNeedEFI" case is still
wrong
because currently it goes as the following pseudo code:
if "Hah!IdontNeedEFI" case then try to find a non-EFI bootloader return if a non-EFI bootloader was found endif try to find any bootloader return if any bootloader was found error exit no bootloader found
The problem is when in the "Hah!IdontNeedEFI" case
no non-EFI bootloader was found it proceeds with
finding any bootloader where the "EFI" sub-string
in "Hah!IdontNeedEFI" matches so that we are back
at the initial problem of
https://github.com/rear/rear/issues/1752
The solution is not (cf. below) to have no separated "Hah!IdontNeedEFI"
special case
but to exclude known misleading strings when trying to find any
bootloader
like
# Check for known bootloaders # but exclude known misleading strings like "Hah!IdontNeedEFI": for known_bootloader in GRUB2-EFI EFI GRUB2 GRUB ELILO LILO ; do if grep -v 'Hah!IdontNeedEFI' $bootloader_area_strings_file | grep -q -i "$known_bootloader" ; then
I will do a pull request...
jsmeix commented at 2018-04-23 10:39:¶
It does not help to only exclude 'Hah!IdontNeedEFI' because
in
https://github.com/rear/rear/issues/1752#issue-303856221
there is
#-> cat /tmp/rear.V9AKAEZDKjqVbWE/tmp/bootloader_area_strings ZRr= `|f \|f1 GRUB Geom Hard Disk Read Error EFI PART Hah!IdontNeedEFI"s8<
so that grep -v 'Hah!IdontNeedEFI'
still leaves the EFI PART
line
which again results that EFI
is falsely guessed.
jsmeix commented at 2018-04-23 11:00:¶
I think the sloution is
when in the 'Hah!IdontNeedEFI' case no known non-EFI bootloader is found
then
continue guessing the used bootloader by inspecting the first bytes on
the next disk
and I implememted that via
https://github.com/rear/rear/pull/1780
jsmeix commented at 2018-04-24 14:15:¶
With
https://github.com/rear/rear/pull/1780
merged
this issue should be (hopefully) fully fixed.
[Export of Github issue for rear/rear.]