summaryrefslogtreecommitdiffstats
path: root/en-US/GRUB-configuration.xml
blob: 386f57bbddf9d253375f687e29f58353e405258e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Fedora_Multiboot_Guide.ent">
%BOOK_ENTITIES;

]>

<section id="GRUB-configuration">
  <title>Configuring the GRUB Bootloader</title>
  <para>
    GRUB configuration files can be found in several places:
  </para>
  <formalpara>
    <title><filename>/etc/default/grub</filename></title>
    <para>
      Configuration for GRUB itself is defined in <filename>/etc/default/grub</filename>.  The default options used when creating new entries for Fedora can also be found here.
    </para>
  </formalpara>
  <formalpara>
    <title><filename class="directory">/etc/grub.d/</filename></title>
    <para>
      Files in <filename class="directory">/etc/grub.d</filename> are used as templates for creating new GRUB entries as well as custom boot entries.
    </para>
  </formalpara>
  <formalpara>
    <title><filename class="directory">/boot</filename></title>
    <para>
      The <filename class="directory">/boot</filename> directory contains Fedora's kernel and <systemitem class="filesystem">initramfs</systemitem>.
    </para>
  </formalpara>
    <para>
      On BIOS systems, this directory also contains the configuration for GRUB itself.
    </para>
  <formalpara>
    <title><filename class="directory">/boot/efi/EFI</filename></title>
    <para>
      This directory is only found on UEFI systems, and is within the UEFI System Partition. Both GRUB configuration files and the GRUB executable can be found in <filename class="directory">/boot/efi/EFI</filename>.
    </para>
  </formalpara>
  <section id="GRUB-configuration-permanent_arg">
    <title>Permanently adding to Fedora boot entries</title>
    <para>
      The options that GRUB passes to Fedora when booting are generated from the discovered filesystems and from the value of <parameter>GRUB_CMDLINE_LINUX</parameter> in <filename>/etc/default/grub</filename>.
    </para>
    <para>
      Adding a parameter to the end of <parameter>GRUB_CMDLINE_LINUX</parameter> and regenerating <filename>grub.cfg</filename> will apply the parameter to all current and future Fedora boot entries.
    </para>
    <example id="GRUB-configuration-permanent_arg-backlight_example">
      <title>In practice: Fixing backlight issues with kernel parameters</title>
      <para>
        Some laptops have problems with the display backlight using the default configuration. The screen might be too bright, too dim, flicker, or even appear to be completely black.
      </para>
      <para>
        The issue can often be resolved by directing the system to prefer vendor-specific drivers for the backlight using the <parameter>acpi_backlight=vendor</parameter> parameter.
      </para>
      <procedure>
        <step>
          <para>
            With root permissions, open the file <filename>/etc/default/grub</filename>.
            <screen>
              <command>nano /etc/default/grub</command>
              <computeroutput>
                GRUB_TIMEOUT=0
                GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
                GRUB_DEFAULT=saved
                GRUB_DISABLE_SUBMENU=true
                GRUB_TERMINAL_OUTPUT="console"
                GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] &amp;&amp; /usr/sbin/rhcrashkernel-param || :) vconsole.keymap=us rhgb quiet"
                GRUB_DISABLE_RECOVERY="true"
              </computeroutput>
            </screen>
          </para>
        </step>
        <step>
          <para>
            Add the parameter to the end of <parameter>GRUB_CMDLINE_LINUX</parameter> and save the file.
            <screen>
              <computeroutput>
                GRUB_TIMEOUT=0
                GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
                GRUB_DEFAULT=saved
                GRUB_DISABLE_SUBMENU=true
                GRUB_TERMINAL_OUTPUT="console"
                GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] &amp;&amp; /usr/sbin/rhcrashkernel-param || :) vconsole.keymap=us rhgb quiet acpi_backlight=vendor"
                GRUB_DISABLE_RECOVERY="true"
              </computeroutput>
            </screen>
          </para>
        </step>
        <step>
          <para>
            Regenerate the GRUB configuration to apply the new changes.
          </para>
          <substeps>
            <step>
              <para>
                For BIOS systems:
                <screen>
                  <command>grub2-mkconfig -o /boot/grub/grub2.cfg</command>
                </screen>
              </para>
            </step>
            <step>
              <para>
                For UEFI systems:
                <screen>
                  <command>grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg</command>
                </screen>
              </para>
            </step>
          </substeps>
        </step>
      </procedure>
    </example>
  </section>

</section>