Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly choose /boot or / prefix for 'Relax-and-Recover' GRUB 2 menu entry #948

Merged
merged 1 commit into from Aug 2, 2016
Merged

Conversation

gozora
Copy link
Member

@gozora gozora commented Aug 1, 2016

No description provided.

Determine which prefix (/boot or /) should be used in grub.cfg (when using GRUB_RESCUE=y)
@@ -11,7 +11,10 @@ is_true "$GRUB_RESCUE" || return
# (grub-probe or grub2-probe only exist in GRUB 2)
# in particular do not run this script when GRUB Legacy is used
# (for GRUB Legacy output/default/94_grub_rescue.sh is run):
type -p grub-probe >&2 || type -p grub2-probe >&2 || { LogPrint "Skipping GRUB_RESCUE setup for GRUB 2 (no GRUB 2 found)." ; return ; }
if [[ ! $( type -p grub-probe ) && ! $( type -p grub2-probe ) ]]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed to make grub(2)-probe quiet.
Previous test made output (/usr/sbin/grub-probe) to rear logfile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I liked to have the 'type -p' stdout output in the log file.
I thought having a verbose log file is good in general.
In contrast by default rear should be silent
on the terminal where rear was launched
cf. #929
Therefore I redirected stdout to stderr because
stderr gets logged but not shown on the terminal
cf. #885

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, OK
I just thought that pure /usr/sbin/grub-probe in log file (without any further information or date) is just typo ...

Will correct it then.

Copy link
Member

@jsmeix jsmeix Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to correct it.
I merged it as is.

It is a matter of personal taste what should be in the log.

In my old log it was:

++ type -p grub-probe
++ type -p grub2-probe
/usr/sbin/grub2-probe

In the current log it is:

+++ type -p grub-probe
++ [[ ! -n '' ]]
+++ type -p grub2-probe
++ [[ ! -n /usr/sbin/grub2-probe ]]

For my personaly eyes the current log looks
less clean than the old one - but again - this
is a matter of personal taste.

Copy link
Member Author

@gozora gozora Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I start to understand.
You are talking about "cleanness" when debugging enabled :-) that explains a lot.
I was looking more on situation, when debugging was disabled.

Copy link
Member

@jsmeix jsmeix Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh - yes - I should have mentioned
that I always run it as "rear -d -D ..."

I simply ignore the log (when things worked well)
but when something failed or looked suspicious
then I need the log with debug info already in it.

Cf. "Debugging issues with Relax-and-Recover (rear)"
in https://en.opensuse.org/SDB:Disaster_Recovery

But currently I miss stdout in the log because I would need
that to get the complete picture in the log. Therefore
I did #885

I need the complete picture in the log so that I could
better understand customer isssues when I only
get the customer's log file.

@jsmeix jsmeix added enhancement Adaptions and new features fixed / solved / done labels Aug 2, 2016
@jsmeix jsmeix added this to the Rear v1.19 milestone Aug 2, 2016
@jsmeix
Copy link
Member

jsmeix commented Aug 2, 2016

Works for me on SLES12-SP1 with its default btrfs structure.
Therefore I merge it.

@jsmeix jsmeix merged commit 4aa3b0b into rear:master Aug 2, 2016
@jsmeix jsmeix self-assigned this Aug 2, 2016
@gozora
Copy link
Member Author

gozora commented Aug 2, 2016

What about rollback of my "enhancement" code:

if [[ ! $( type -p grub-probe ) && ! $( type -p grub2-probe ) ]]; then
    LogPrint "Skipping GRUB_RESCUE setup for GRUB 2 (no GRUB 2 found)."
    return
fi

Should I correct it with new pull request or will you correct it "some day"?

@jsmeix
Copy link
Member

jsmeix commented Aug 2, 2016

Leave it as is for now because now it works well.
If really needed I could change it later myself.

jsmeix added a commit that referenced this pull request Aug 3, 2016
…n_94_grub2_rescue_issue948

Better ordering of what is done in 94_grub2_rescue
see #948
and #946
and #942
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants