What is "Recovery mode" in GRUB?

I haven’t seen any useful info online that uses the same terminology.

@rokejulianlockhart:

The only explicit reference I’ve found is here: <https://askubuntu.com/questions/150367/how-do-i-boot-into-recovery-mode>


But, there’s also these openSUSE documents:
<https://en.opensuse.org/SDB:Disaster_Recovery>
<https://en.opensuse.org/GRUB>


There’s also this ArchWiki article: <https://wiki.archlinux.org/title/GRUB>
And, the GRUB Manual: <https://www.gnu.org/software/grub/manual/grub/grub.html>

@rokejulianlockhart Pretty much no user added kernel boot options… You can see the options in menuentry sections of /boot/grub2/grub.cfg.

@rokejulianlockhart:

I suspect that, the GRUB2 Recovery Mode is really only needed if nothing else can be done apart from, re-installing the system.

  • Are you aware that, systemd offers a “Rescue” mode?

# systemctl rescue

And, if you boot an openSUSE ISO Installation image, there’s an option to use the Rescue System: <https://doc.opensuse.org/documentation/leap/startup/html/book-startup/cha-trouble.html#sec-trouble-data-recover-rescue>

Also this help for the case that GRUB2 doesn’t behave as expected – <https://doc.opensuse.org/documentation/leap/startup/html/book-startup/cha-trouble.html#sec-trouble-boot-nogrub>

Please elaborate what you mean by this, @malcolmlewis. I don’t quite understand.


Likewise, although (in hindsight) rather foolishly browsed past it, expecting that it would be Ubuntu-specific. Thanks, @dcurtisfra.

Considering that grub2 - How do I boot into recovery mode? - Ask Ubuntu states:

  • After a few moments, your workstation should display a menu with a number of options. One of the options (you may need to scroll down to the bottom of the list) will be “Drop to root shell prompt”. Press Return with this option highlighted.
  • The root partition is mounted read-only. To mount it read/write, enter the command
mount -o remount,rw /

does it provide the same abilities as

  1. adding

    linux  init=/bin/sh
    

    to the boot flags

  2. and then performing

    mount -o remount,rw /
    

(per How to boot to root shell when GRUB recovery menu fails to load a shell? - Ask Ubuntu and own experience following that advice)?

@rokejulianlockhart if you run the command cat /proc/cmdline you can see all the added kernel options, booting (recovery mode) excludes those… Look at the menuentry option in the grub.cfg file the look at the one marked (recovery mode) and compare.

1 Like

Apologies, but where is grub.cfg, @malcolmlewis?

PS /home/rokejulianlockhart> cat /boot/grub/grub.conf
/usr/bin/cat: /boot/grub/grub.conf: No such file or directory
NativeCommandExitException: Program "cat" ended with non-zero exit code: 1.
PS /home/rokejulianlockhart> cat /boot/grub/grub.cfg # https://askubuntu.com/a/15056/1002900
/usr/bin/cat: boot/grub/grub.cfg: No such file or directory
NativeCommandExitException: Program "cat" ended with non-zero exit code: 1.

@rokejulianlockhart grub.cfg not grub.conf :wink:

1 Like

/boot/grub2/grub.cfg

1 Like