Skip to content

Commit

Permalink
Content without modified Troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
sounix000 committed Nov 19, 2024
1 parent 36941d9 commit bc04b62
Show file tree
Hide file tree
Showing 4 changed files with 271 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,55 +32,75 @@
</abstract>
</info>
<section xml:id="kernel-boot-parameters-modify-linuxrc-parameter-introduction">
<title>What are linuxrc parameters?</title>
<title>What are linuxrc parameters and why are they different from kernel boot parameters</title>
<para>
In &productname;, the <literal>linuxrc</literal> is a script that runs during the boot
process before the systems's root file system is mounted, and serves as the initial RAM disk
(initrd) entry point. The <literal>linuxrc</literal> parameters are used within this script
to configure the system further before transitioning to the actual root file system.
In &sle;, the <literal>linuxrc</literal> script is executed during the boot process before
the system's root file system is mounted. It acts as the initial RAM disk (initrd) entry
point and sets up the environment needed for the kernel to load the root file system.
<literal>linuxrc</literal> parameters are used to pass configurations that affect this early
stage of the boot process, such as driver loading, debugging options, or hardware
initialization.
</para>
<para>
Similar to kernel boot parameters, you can pass linuxrc parameters either using the command
line, or using configuration files. The entries for linuxrc parameters are similar in
appearance to that of the kernel boot parameters.
In contrast, kernel boot parameters are passed to the kernel by the boot loader (such as
&grub;) after the initial RAM disk has handed control to the kernel. The kernel boot
parameters directly influence how the kernel operates and manages system features such as
power management, debugging and hardware interaction after the root file system is mounted.
</para>
<para>
However, the kernel boot parameters and the linuxrc parameters are different concepts. To
learn more about the linuxrc parameters, refer to
<link xlink:href="https://documentation.suse.com/sles/html/SLES-all/appendix-linuxrc.html" os="sles"></link><link
xlink:href="https://en.opensuse.org/SDB:Linuxrc" os="non-sles"></link>.
The distinction is critical because <literal>linuxrc</literal> parameters are used to
configure the environment before the kernel fully initializes, whereas kernel boot parameters
control the behavior of the kernel after this point. Misinterpreting or interchanging the two
can lead to improper configurations and boot failures.
</para>
<para>
To learn more about the <literal>linuxrc</literal> parameters and their usage, refer to
<link xlink:href="https://documentation.suse.com/sles/html/SLES-all/appendix-linuxrc.html"></link>.
</para>
</section>
<section xml:id="kernel-boot-parameters-modify-linuxrc-parameter-examples">
<title>Examples of linuxrc parameters</title>
<para>
To highlight the similarity in appearance, observe the following examples:
The following examples highlight common <literal>linuxrc</literal> parameters and their use
cases to configure the environment before the kernel initializes:
</para>
<itemizedlist>
<listitem>
<para>
<literal>rd.driver.blacklist=</literal>: Specifies drivers to be blacklisted in the
initrd. For example, <literal>rd.driver.blacklist=nouveau</literal> prevents the
<literal>nouveau</literal> graphics driver from loading.
<literal>nouveau</literal> graphics driver from loading during the early stages of boot.
This can be useful when troubleshooting driver-related boot issues.
</para>
</listitem>
<listitem>
<para>
<literal>rd.break</literal>: Interrupts the boot process and drops the system to a shell
for debugging purposes within the initrd.
within the initrd for debugging purposes. This parameter is helpful for diagnosing issues
related to the early boot process, such as driver loading or file system mounting errors.
</para>
</listitem>
<listitem>
<para>
<literal>rd.retry=</literal>: Specifies the number of retries for device scanning in the
initrd. For example, <literal>rd.retry=3</literal>.
initrd. For example, <literal>rd.retry=3</literal> configures the system to retry
scanning devices three times before giving up, which can be critical for resolving
transient hardware initialization issues.
</para>
</listitem>
<listitem>
<para>
<literal>rd.luks=1</literal>: Activates support for encrypted devices in the initrd.
<literal>rd.luks=1</literal>: Enables support for encrypted devices in the initrd. This
parameter is essential for systems that use encrypted root file systems, ensuring that
decryption takes place during the initial boot stage.
</para>
</listitem>
</itemizedlist>
<para>
By contrast, equivalent kernel boot parameters such as <literal>quiet</literal> or
<literal>nomodeset</literal> are not used in the initrd phase but take effect after the
kernel is fully initialized. This reinforces the need to distinguish between these two types
of parameters.
</para>
</section>
</topic>
239 changes: 202 additions & 37 deletions concepts/kernel-boot-parameters-modify-introduction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,104 @@
<!-- can be changed via merge in the assembly -->
<para>
Before modifying kernel boot parameters, it is important to understand the basic concepts -
definition, examples and reasons for modifying kernel boot parameters.
definition, methods, benifits and examples of modifying kernel boot parameters.
</para>
</abstract>
</info>
<section xml:id="kernel-boot-parameters-modify-definition">
<title>What are kernel boot parameters?</title>
<para>
Kernel boot parameters are configurations passed to the &productname; kernel during the boot process
for &grub;, instructing it on how to configure certain features and make them behave in the
intended manner. You can modify these configurations either temporarily or permanently,
depending on whether you want the changes to persist subsequent boots.
Kernel boot parameters are configurations passed to the &sle; kernel during the boot process
managed by the &grub;. The configurations are instructions to the &grub; boot loader on how
to configure certain features and make them behave in the intended manner. The method of
modification depends on whether you want the changes to impact only the next boot, or all
subsequent boots till further changes are made.
</para>
</section>
<section xml:id="kernel-boot-parameters-modification-types">
<title>Methods of modification</title>
<para>

You can modify the kernel boot parameters using the following methods:
</para>
<variablelist>
<varlistentry>
<term>Temporarily</term>
<listitem>
<para>
Changes are held in memory and apply only to the upcoming boot process. These changes
made through the &grub; boot menu are not written to any configuration file and are
discarded after reboot.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Permanently</term>
<listitem>
<para>
Changes are written to <filename>/etc/default/grub</filename> file and persist across
all subsequent boot processes. For permanent changes, we
<emphasis role="strong">recommend</emphasis> using the &yastcc; instead of directly
editing the <filename>/etc/default/grub</filename> file.
</para>
<para>
However, if you directly edit the <filename>/etc/default/grub</filename> file, modify
the <varname>GRUB_CMDLINE_LINUX</varname> or
<varname>GRUB_CMDLINE_LINUX_DEFAULT</varname> variables. After modification, regenerate
the &grub; configuration by running the following command with administrative
privileges.
</para>
<screen>&prompt.sudo;<command>grub2-mkconfig -o /boot/grub2/grub.cfg</command></screen>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="kernel-boot-parameters-modify-reason">
<title>Benefits of modifying kernel boot parameters</title>
<para>
Modifying kernel boot parameters is essential for achieving specific system configurations
and addressing several scenarios, including:
</para>
<itemizedlist>
<listitem>
<formalpara>
<title>Performance optimization</title>
<para>
Tweaking parameters to enhance system performance, responsiveness, and overall
efficiency based on specific system requirements. For example, using the
<code>quiet</code> parameter suppresses most boot messages, reducing boot time and
improving performance during startup.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Hardware compatibility</title>
<para>
Tailoring parameters to ensure compatibility with specific hardware components,
addressing potential compatibility issues. For example, the <code>acpi=off</code>
parameter can be used to disable the Advanced Configuration and Power Interface (ACPI)
to resolve boot problems on older hardware.
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Troubleshooting</title>
<para>
Altering parameters to troubleshoot issues such as graphics driver problems, ensuring a
more stable and functional system. For instance, the <code>nomodeset</code> parameter
can be used to disable kernel mode setting, which is helpful when troubleshooting
issues with graphics drivers that prevent the system from booting.
</para>
</formalpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="kernel-boot-parameters-modify-examples">
<title>Examples of commonly modified kernel boot parameters</title>
<para>
There are several kernel parameters that you can optionally modify to customize your
boot process. Based on you your use case, you can consider few of the most commonly modified
There are several kernel parameters that you can optionally modify to customize your boot
process. Based on you your use case, you can consider few of the most commonly modified
kernel boot parameters:
</para>
<itemizedlist>
Expand Down Expand Up @@ -83,44 +160,132 @@
</listitem>
</itemizedlist>
<para>
Source documentation for kernel parameters is available at
<link xlink:href="https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt"/>
For a detailed understanding of all available kernel parameters and their possible values,
source documentation is available at
<link
xlink:href="https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt"/>.
</para>
</section>
<section xml:id="kernel-boot-parameters-modify-reason">
<title>Benefits of modifying kernel boot parameters</title>
<section xml:id="kernel-boot-parameters-modify-general-rules">
<title>General rules for specifying values of kernel boot parameters</title>
<para>
Modifying kernel boot parameters is essential for achieving specific system configurations
and addressing several scenarios, including:
When modifying kernel boot parameters, follow these essential formatting rules:
</para>
<itemizedlist>
<listitem>
<formalpara>
<title>Performance optimization</title>
<variablelist>
<varlistentry>
<term>Basic Parameter Spacing</term>
<listitem>
<para>
Tweaking parameters to enhance system performance, responsiveness, and overall
efficiency based on specific system requirements.
Separate individual parameters with a single space:
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Hardware compatibility</title>
<itemizedlist>
<listitem>
<para>
In the &yast;, navigate to <guimenu>System</guimenu>&gt;<guimenu>Boot
Loader</guimenu>&gt;<guimenu>Boot Loader Settings</guimenu>&gt;<guimenu>Kernel
Parameters</guimenu> enter parameters in the <guimenu>Optional Kernel Command Line
Parameter</guimenu> field with spaces between them.
</para>
</listitem>
<listitem>
<para>
In the <filename>/etc/default/grub</filename> configuration file for &grub;, use
spaces between kernel parameters when passing them as string values to the
<varname>GRUB_CMDLINE_LINUX</varname> or
<varname>GRUB_CMDLINE_LINUX_DEFAULT</varname> variables.
</para>
</listitem>
<listitem>
<para>
At the boot menu, press <keycap>E</keycap> to edit, locate the line starting with
<literal>linux</literal> or <literal>linux16</literal>, and add parameters with
spaces.
</para>
</listitem>
</itemizedlist>
<example>
<title>Separate individual parameters with a single space</title>
<screen>root=/dev/sda1 quiet splash</screen>
</example>
</listitem>
</varlistentry>
<varlistentry>
<term>Parameter Value Assignment</term>
<listitem>
<para>
Tailoring parameters to ensure compatibility with specific hardware components,
addressing potential compatibility issues.
When assigning values, use the equals sign (<literal>=</literal>) without spaces:
</para>
</formalpara>
</listitem>
<listitem>
<formalpara>
<title>Troubleshooting</title>
<example>
<title>Correct method of assigning values to kernel parameters</title>
<screen>root=/dev/sda1 video=1920x1080</screen>
</example>
<example>
<title>Incorrect method of assigning values to kernel parameters</title>
<screen>root = /dev/sda1 video = 1920x1080</screen>
</example>
</listitem>
</varlistentry>
<varlistentry>
<term>Values Containing Spaces</term>
<listitem>
<para>
Altering parameters to troubleshoot issues such as graphics driver problems, ensuring a
more stable and functional system.
For values containing spaces, the handling differs between methods:
</para>
</formalpara>
</listitem>
</itemizedlist>
<variablelist>
<varlistentry>
<term>&yastcc; Boot Loader</term>
<listitem>
<para>
Enter the value with quotes directly in the parameter field; the &yastcc; handles
the spacing appropriately before passing it on to &grub;.
</para>
<example>
<title>Kernel parameter values containing spaces in the &yastcc;</title>
<screen>root="/dev/mapper/<replaceable>USER VOLUME</replaceable>"</screen>
</example>
</listitem>
</varlistentry>
<varlistentry>
<term>&grub; onfiguration File</term>
<listitem>
<para>
Use either double quotes with escape characters, or use backslashes.
</para>
<example>
<title>Kernel parameter values containing spaces in the &grub; configuration file</title>
<screen>GRUB_CMDLINE_LINUX="root=\"/dev/mapper/<replaceable>USER VOLUME</replaceable>\""</screen>
<screen>GRUB_CMDLINE_LINUX="root=/dev/mapper/<replaceable>USER<emphasis>\</emphasis> VOLUME</replaceable>"</screen>
</example>
</listitem>
</varlistentry>
<varlistentry>
<term>&grub; Boot Menu</term>
<listitem>
<para>
Use only double quotes for values containing spaces:
</para>
<example>
<title>Kernel parameter values containing spaces in the &grub; boot menu</title>
<screen>root="/dev/mapper/<replaceable>USER VOLUME</replaceable>"</screen>
</example>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>Multiple values for a kernel parameter</term>
<listitem>
<para>
Use commas without spaces to separate multiple values for a single parameter in all
methods:
</para>
<example>
<title>Multiple values for a kernel parameter</title>
<screen>console=tty0,tty1 video=HDMI-A-1:1920x1080@60,VGA-1:1024x768</screen>
</example>
</listitem>
</varlistentry>
</variablelist>
</section>
</topic>
Loading

0 comments on commit bc04b62

Please sign in to comment.