3
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
<title>8.7. Recovering a Broken System</title>
5
<link rel="stylesheet" type="text/css" href="install.css">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7
<link rel="home" href="index.html" title="Ubuntu Installation Guide">
8
<link rel="up" href="ch08.html" title="Chapter 8. Next Steps and Where to Go From Here">
9
<link rel="prev" href="ch08s06.html" title="8.6. Compiling a New Kernel">
10
<link rel="next" href="apa.html" title="Appendix A. Installation Howto">
12
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13
<div class="navheader">
14
<table width="100%" summary="Navigation header">
15
<tr><th colspan="3" align="center">8.7. Recovering a Broken System</th></tr>
17
<td width="20%" align="left">
18
<a accesskey="p" href="ch08s06.html"><img src="images/prev.png" alt="Prev"></a> </td>
19
<th width="60%" align="center">Chapter 8. Next Steps and Where to Go From Here</th>
20
<td width="20%" align="right"> <a accesskey="n" href="apa.html"><img src="images/next.png" alt="Next"></a>
27
<div class="titlepage"><div><div><h2 class="title">
28
<a name="rescue"></a>8.7. Recovering a Broken System</h2></div></div></div>
31
Sometimes, things go wrong, and the system you've carefully installed is no
32
longer bootable. Perhaps the boot loader configuration broke while trying
33
out a change, or perhaps a new kernel you installed won't boot, or perhaps
34
cosmic rays hit your disk and flipped a bit in
35
<code class="filename">/sbin/init</code>. Regardless of the cause, you'll need to
36
have a system to work from while you fix it, and rescue mode can be useful
42
There are several options to rescue a broken Ubuntu system on i386:
45
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
50
To access rescue mode, select <strong class="userinput"><code>rescue</code></strong> from the
51
boot menu (if available) or append the boot parameter <strong class="userinput"><code>rescue</code></strong>
52
or <strong class="userinput"><code>systemd.unit=emergency.target</code></strong>
53
to the <span class="guimenuitem">linux</span> kernel boot entry of the boot loader.
58
While booting the system enter the boot loader menu:
61
<div class="informalexample"><pre class="screen">
65
Advanced options for Ubuntu
68
Use the ↑ and ↓ keys to select which entry is highlighted.
69
Press enter to boot the selected OS, 'e' to edit the commands
70
before booting or 'c' for a command-line.
74
Then type <span class="command"><strong>e</strong></span> to edit the boot loader configuration and entries,
75
navigate to your prefered Linux kernel line and append either
76
<strong class="userinput"><code>rescue</code></strong> or <strong class="userinput"><code>systemd.unit=emergency.target</code></strong>.
79
<div class="informalexample"><pre class="screen">
83
set root='hd0,gpt2'or Ubuntu
84
if [ x$feature_platform_search_hint = xy ]; then
85
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,g\
86
pt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 ea967ae0-7519-11eB-85b\
89
search --no-floppy --fs-uuid --set=root ea967ae0-7519-11e\
92
echo 'Loading Linux 4.15.0-23-generic ...'
93
linux /boot/vmlinuz-4.15.0-23-generic root=UUID=ea96\
94
7ae0-7519-11eB-85bd-5254008bdef4 ro maybe-ubiquity rescue
96
Minimum Emacs-like screen editing is supported. TAB lists
97
completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
98
a command-line or ESC to discard edits and return to the GRUB menu.
102
Then press either Ctrl-x or F10 to boot with the modified entry
103
and the system will enter the rescue mode.
106
<div class="informalexample"><pre class="screen">
108
[ OK ] Started Update UTMP about System Runlevel Changes.
109
You are in rescue mode. After logging in, type "journalctl -xb" to view
110
system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
111
to boot into default mode.
112
Press Enter for maintenance
113
(or press Control-D to continue):
120
<li class="listitem">
124
Alternatively the installer can be booted with the <strong class="userinput"><code>rescue=true</code></strong> boot parameter.
125
You'll be shown the first few screens of the installer, with a note in the
126
corner of the display to indicate that this is rescue mode, not a full
127
installation. Don't worry, your system is not about to be overwritten!
128
Rescue mode simply takes advantage of the hardware detection
129
facilities available in the installer to ensure that your disks,
130
network devices, and so on are available to you while repairing your system.
137
<li class="listitem">
140
A trivial option is to just boot the standard installation kernel and initrd without any additional kernel parameter, and select from the inital screen the <span class="guimenuitem">Start shell</span> entry.
143
<div class="informalexample"><pre class="screen">
146
This is the network console for the Debian installer. From here, you
147
may start the Debian installer, or execute an interactive shell.
149
To return to this menu, you will need to log in again.
151
Network console option:
154
Start installer (expert mode)
159
The functionality in the <code class="classname">debian-installer</code> shell is limited, however, it can still act as a rescue system to fix a broken installation.
160
While not using the rescue mode, be careful to not accidentially repartition or format any disk which may cause data loss.
167
In either case, after you exit the shell, the system will reboot.
172
Finally, note that repairing broken systems can be difficult, and this
173
manual does not attempt to go into all the things that might have gone wrong
174
or how to fix them. If you have problems, consult an expert.
178
<div class="navfooter">
180
<table width="100%" summary="Navigation footer">
182
<td width="40%" align="left">
183
<a accesskey="p" href="ch08s06.html"><img src="images/prev.png" alt="Prev"></a> </td>
184
<td width="20%" align="center"><a accesskey="u" href="ch08.html"><img src="images/up.png" alt="Up"></a></td>
185
<td width="40%" align="right"> <a accesskey="n" href="apa.html"><img src="images/next.png" alt="Next"></a>
189
<td width="40%" align="left" valign="top">8.6. Compiling a New Kernel </td>
190
<td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td>
191
<td width="40%" align="right" valign="top"> Appendix A. Installation Howto</td>