How to boot Ubuntu Core in recovery mode

Configurare noua (How To)

Situatie

Accessing recovery hidden boot menu

If you prefer to recover the system when booting or if the system is no longer accessible via the network, you can use the recovery hidden menu:

  1. Start or reboot the device with the ‘1’ key held on a connected keyboard. In some systems or with some keyboards it is necessary to press the key repeatedly.
  2. After the initial boot process completes, a status screen appears to show “System mode selection triggered. Proceed to select one of the available systems and actions.”. Press OK.
  3. On the next screen, select with TAB or cursor keys the desired action and press ENTER.
  4. A message indicating the selected mode is displayed. Press CONFIRM to proceed.
  • If “Run normally” has been selected, the system boots in run mode.
  • If “Recover” has been selected, the system boots in recovery mode.
  • If “Reinstall” has been selected, the system boots in reinstall mode.
Using console

First, you have to log into your device using SSH. Run the ssh command which will be something like:

ssh <user>@<device_address> And you should be welcome to Ubuntu Core:
pasted image 0

Once you are in the device console, you can check the list of recovery systems that can be used for recovering.

snap recovery
 pasted image 0

The snap reboot command allows you to boot in the different booting modes (run, recovery, install) from the console. The procedure is as simple as just typing the following command:

sudo snap reboot --recover 20210112

The system shows a message on the console indicating that it is going to reboot with the system indicated in the label.

This process takes some time. The device will be accessible via SSH but the snaps take some time to install and update. You can check by running the command “snap list” until the full list of packages is up to date.

Using Recovery mode

Once the system has booted in recovery mode, you can access via SSH with your prior credentials, and have a clean system where the desired maintenance action can be performed. For exiting recovery mode, you can use any of the following options:

  • Enter the following command
snap reboot --run
  • Power off and on the system

Either method returns the system to run mode, and all changes done to the temporary system are lost.

Solutie

Tip solutie

Permanent

Voteaza

(9 din 24 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?