## 8.7. Recovering a Broken System 

Sometimes, things go wrong, and the system you’ve carefully installed is no longer bootable. Perhaps the boot loader configuration broke while trying out a change, or perhaps a new kernel you installed won’t boot, or perhaps cosmic rays hit your disk and flipped a bit in /sbin/init . Regardless of the cause, you’ll need to have a system to work from while you fix it, and rescue mode can be useful for this. 

There are several options to rescue a broken Ubuntu system on arm64: 

• To access rescue mode, select rescue from the boot menu (if available) or append the boot param- eter rescue or systemd.unit=emergency.target to the linux kernel boot entry of the boot loader. 

While booting the system enter the boot loader menu: 

* Ubuntu Advanced options for Ubuntu 

Use the ↑ and ↓ keys to select which entry is highlighted. Press enter to boot the selected OS, ’e’ to edit the commands before booting or ’c’ for a command-line. 

## GNU GRUB version 2.02 

Then type e to edit the boot loader configuration and entries, navigate to your prefered Linux kernel line and append either rescue or systemd.unit=emergency.target . 

## GNU GRUB version 2.02 

insmod ext2 set root=’hd0,gpt2’or Ubuntu if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,g\ pt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 ea967ae0-7519-11eB-85b\ d-5254008bdef4 else search --no-floppy --fs-uuid --set=root ea967ae0-7519-11e\ 8-85bd-5254008bdef4 fi echo ’Loading Linux 4.15.0-23-generic ...’ linux /boot/vmlinuz-4.15.0-23-generic root=UUID=ea96\ 7ae0-7519-11eB-85bd-5254008bdef4 ro maybe-ubiquity rescue 

Minimum Emacs-like screen editing is supported. TAB lists completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for a command-line or ESC to discard edits and return to the GRUB menu. 

Then press either Ctrl-x or F10 to boot with the modified entry and the system will enter the rescue mode. 

... 

[ OK ] Started Update UTMP about System Runlevel Changes. You are in rescue mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" 

