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
Conversation
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Works for me on SLES12-SP1 with its default btrfs structure. |
What about rollback of my "enhancement" code:
Should I correct it with new pull request or will you correct it "some day"? |
Leave it as is for now because now it works well. |
No description provided.