Skip to content

Commit

Permalink
Fix for bsc #1069905
Browse files Browse the repository at this point in the history
update kexec usage
  • Loading branch information
fsundermeyer committed May 22, 2018
1 parent 6c56a39 commit 9cc9775
Showing 1 changed file with 32 additions and 62 deletions.
94 changes: 32 additions & 62 deletions xml/tuning_kexec.xml
Original file line number Diff line number Diff line change
Expand Up @@ -536,83 +536,53 @@ cio_ignore=all,!da5d,!f500-f502</screen>
<title>Basic &kexec; Usage</title>

<para>
To verify if your &kexec; environment works properly, follow these
steps:
To use &kexec;, ensure the respective service is enabled and running:
</para>

<procedure>
<step>
<para>
Make sure no users are currently logged in and no important services
are running on the system.
</para>
</step>
<step>
<para>
Log in as &rootuser;.
</para>
</step>
<step>
<para>
Switch to the rescue target with <command>systemctl isolate
rescue.target</command>
</para>
</step>
<step xml:id="step.kexec.usage.load.kernel">
<para>
Load the new kernel to the address space of the production kernel with
the following command:
</para>
<screen>&prompt.root;<command>kexec</command> -l <replaceable>/boot/vmlinuz</replaceable> --append=<replaceable>"$(cat /proc/cmdline)"</replaceable> \
--initrd=<replaceable>/boot/initrd</replaceable></screen>
</step>
<step>
<para>
Unmount all mounted file systems except the root file system with:
</para>
<screen><command>umount</command> <option>-a</option></screen>
<important>
<title>Unmounting the Root File System</title>
<para>
Unmounting all file systems will most likely produce a <literal>device
is busy</literal> warning message. The root file system cannot be
unmounted if the system is running. Ignore the warning.
</para>
</important>
</step>
<step>
<itemizedlist>
<listitem>
<para>
Remount the root file system in read-only mode:
Make sure the &kexec; service is loaded at system start:
</para>
<screen>&prompt.root;<command>mount</command> -o remount,ro /</screen>
</step>
<step>
<screen>&prompt.sudo;systemctl enable kexec-load.service</screen>
</listitem>
<listitem>
<para>
Initiate the reboot of the kernel that you loaded in
<xref linkend="step.kexec.usage.load.kernel"/> with:
Make sure the &kexec; service is running:
</para>
<screen>&prompt.root;<command>kexec</command> -e</screen>
</step>
</procedure>
<screen>&prompt.sudo;systemctl start kexec-load.service</screen>
</listitem>
</itemizedlist>

<para>
It is important to unmount the previously mounted disk volumes in
read-write mode. The <systemitem>reboot</systemitem> system call acts
immediately upon calling. Hard disk volumes mounted in read-write mode
neither synchronize nor unmount automatically. The new kernel may find
them <quote>dirty</quote>. Read-only disk volumes and virtual file
systems do not need to be unmounted. Refer to
<filename>/etc/mtab</filename> to determine which file systems you need
to unmount.
To verify if your &kexec; environment works properly, try rebooting into a
new Kernel with &kexec;. Make sure no users are currently logged in and no
important services are running on the system. If this is the case, run the
following command:
</para>

<screen>systemctl kexec</screen>

<para>
The new kernel previously loaded to the address space of the older kernel
rewrites it and takes control immediately. It displays the usual start-up
messages. When the new kernel boots, it skips all hardware and firmware
checks. Make sure no warning messages appear. All file systems are
supposed to be clean if they had been unmounted.
checks. Make sure no warning messages appear.
</para>

<tip>
<title>Using &kexec; with the reboot command</title>
<para>
To make <command>reboot</command> use kexec; rather than performing a
regular reboot, run the following command:
</para>
<screen>ln -s /usr/lib/systemd/system/kexec.target /etc/systemd/system/reboot.target</screen>
<para>
You can revert this at any time by deleting
<filename>etc/systemd/system/reboot.target</filename>.

This comment has been minimized.

Copy link
@bmwiedemann

bmwiedemann May 23, 2018

Member

missing a leading slash? etc => /etc

</para>
</tip>

</sect1>
<sect1 xml:id="cha.tuning.kexec.config">
<title>How to Configure &kexec; for Routine Reboots</title>
Expand Down

0 comments on commit 9cc9775

Please sign in to comment.