|
| 1 | +.. _change_kernel_boot: |
| 2 | + |
| 3 | +Change Kernel Boot |
| 4 | +######################## |
| 5 | + |
| 6 | +This tutorial explains the process of change kernel boot entry |CL-ATTR|. |
| 7 | + |
| 8 | +.. contents:: |
| 9 | + :local: |
| 10 | + :depth: 1 |
| 11 | + |
| 12 | +Description |
| 13 | +*********** |
| 14 | + |
| 15 | +For this tutorial, you will modify your kernel list to boot with the kernel you want to use. This process is valid when you cannot compile third-party kernel modules and need to come back to old, or if you compile your custom kernel. |
| 16 | + |
| 17 | + |
| 18 | +Get the current boot status |
| 19 | +*************************** |
| 20 | + |
| 21 | +.. code-block:: bash |
| 22 | +
|
| 23 | + bootctl status |
| 24 | +
|
| 25 | +This is an example output: |
| 26 | + |
| 27 | +.. code-block:: bash |
| 28 | +
|
| 29 | + System: |
| 30 | + Firmware: UEFI 2.70 (HP 265.256) |
| 31 | + Firmware Arch: x64 |
| 32 | + Secure Boot: disabled |
| 33 | + TPM2 Support: yes |
| 34 | + Measured UKI: no |
| 35 | + Boot into FW: supported |
| 36 | + |
| 37 | + Current Boot Loader: |
| 38 | + Product: systemd-boot 255 |
| 39 | + Features: ✓ Boot counting |
| 40 | + ✓ Menu timeout control |
| 41 | + ✓ One-shot menu timeout control |
| 42 | + ✓ Default entry control |
| 43 | + ✓ One-shot entry control |
| 44 | + ✓ Support for XBOOTLDR partition |
| 45 | + ✓ Support for passing random seed to OS |
| 46 | + ✓ Load drop-in drivers |
| 47 | + ✓ Support Type #1 sort-key field |
| 48 | + ✓ Support @saved pseudo-entry |
| 49 | + ✓ Support Type #1 devicetree field |
| 50 | + ✓ Enroll SecureBoot keys |
| 51 | + ✓ Retain SHIM protocols |
| 52 | + ✓ Menu can be disabled |
| 53 | + ✓ Boot loader sets ESP information |
| 54 | + ESP: /dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5 |
| 55 | + File: └─/EFI/org.clearlinux/loaderx64.efi |
| 56 | + |
| 57 | + Random Seed: |
| 58 | + System Token: set |
| 59 | + Exists: yes |
| 60 | + |
| 61 | + Available Boot Loaders on ESP: |
| 62 | + ESP: /boot (/dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5) |
| 63 | + File: ├─/EFI/systemd/systemd-bootx64.efi (systemd-boot 255) |
| 64 | + └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 255) |
| 65 | + |
| 66 | + Boot Loaders Listed in EFI Variables: |
| 67 | + Title: Linux bootloader |
| 68 | + ID: 0x0007 |
| 69 | + Status: active, boot-order |
| 70 | + Partition: /dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5 |
| 71 | + File: └─/EFI/org.clearlinux/bootloaderx64.efi |
| 72 | + |
| 73 | + Title: Linux Boot Manager |
| 74 | + ID: 0x0001 |
| 75 | + Status: active, boot-order |
| 76 | + Partition: /dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5 |
| 77 | + File: └─/EFI/systemd/systemd-bootx64.efi |
| 78 | + |
| 79 | + Title: Windows Boot Manager |
| 80 | + ID: 0x0000 |
| 81 | + Status: active, boot-order |
| 82 | + Partition: /dev/disk/by-partuuid/48d8a9eb-d84d-4a62-8302-edff383290e5 |
| 83 | + File: └─/EFI/Microsoft/Boot/bootmgfw.efi |
| 84 | + |
| 85 | + Boot Loader Entries: |
| 86 | + $BOOT: /boot (/dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5) |
| 87 | + token: clear-linux-os |
| 88 | + |
| 89 | + Default Boot Loader Entry: |
| 90 | + type: Boot Loader Specification Type #1 (.conf) |
| 91 | + title: Clear Linux OS (Clear-linux-native-6.8.10-1434.conf) |
| 92 | + id: Clear-linux-native-6.8.10-1434.conf |
| 93 | + source: /boot//loader/entries/Clear-linux-native-6.8.10-1434.conf |
| 94 | + linux: /boot//EFI/org.clearlinux/kernel-org.clearlinux.native.6.8.10-1434 |
| 95 | + initrd: /boot//EFI/org.clearlinux/freestanding-00-early-ucode.cpio |
| 96 | + /boot//EFI/org.clearlinux/initrd-org.clearlinux.native.6.8.10-1434 |
| 97 | + /boot//EFI/org.clearlinux/freestanding-clr-init.cpio.gz |
| 98 | + /boot//EFI/org.clearlinux/freestanding-i915-firmware.cpio |
| 99 | + options: root=UUID=67e7ac9a-f7a1-4d5e-bbd6-012f5fa81cb5 rd.luks.uuid=abe6aaf2-3425-4eb1-b7f5-3f36746426fa quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall> |
| 100 | + lines 20-71/71 (END) |
| 101 | + ✓ Support @saved pseudo-entry |
| 102 | + ✓ Support Type #1 devicetree field |
| 103 | + ✓ Enroll SecureBoot keys |
| 104 | + ✓ Retain SHIM protocols |
| 105 | + ✓ Menu can be disabled |
| 106 | + ✓ Boot loader sets ESP information |
| 107 | + ESP: /dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5 |
| 108 | + File: └─/EFI/org.clearlinux/loaderx64.efi |
| 109 | + |
| 110 | + Random Seed: |
| 111 | + System Token: set |
| 112 | + Exists: yes |
| 113 | + |
| 114 | + Available Boot Loaders on ESP: |
| 115 | + ESP: /boot (/dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5) |
| 116 | + File: ├─/EFI/systemd/systemd-bootx64.efi (systemd-boot 255) |
| 117 | + └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 255) |
| 118 | + |
| 119 | + Boot Loaders Listed in EFI Variables: |
| 120 | + Title: Linux bootloader |
| 121 | + ID: 0x0007 |
| 122 | + Status: active, boot-order |
| 123 | + Partition: /dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5 |
| 124 | + File: └─/EFI/org.clearlinux/bootloaderx64.efi |
| 125 | + |
| 126 | + Title: Linux Boot Manager |
| 127 | + ID: 0x0001 |
| 128 | + Status: active, boot-order |
| 129 | + Partition: /dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5 |
| 130 | + File: └─/EFI/systemd/systemd-bootx64.efi |
| 131 | + |
| 132 | + Title: Windows Boot Manager |
| 133 | + ID: 0x0000 |
| 134 | + Status: active, boot-order |
| 135 | + Partition: /dev/disk/by-partuuid/48d8a9eb-d84d-4a62-8302-edff383290e5 |
| 136 | + File: └─/EFI/Microsoft/Boot/bootmgfw.efi |
| 137 | + |
| 138 | + Boot Loader Entries: |
| 139 | + $BOOT: /boot (/dev/disk/by-partuuid/ea2e4278-5c0c-4498-bc99-dfc48a71ceb5) |
| 140 | + token: clear-linux-os |
| 141 | + |
| 142 | + Default Boot Loader Entry: |
| 143 | + type: Boot Loader Specification Type #1 (.conf) |
| 144 | + title: Clear Linux OS (Clear-linux-native-6.8.10-1434.conf) |
| 145 | + id: Clear-linux-native-6.8.10-1434.conf |
| 146 | + source: /boot//loader/entries/Clear-linux-native-6.8.10-1434.conf |
| 147 | + linux: /boot//EFI/org.clearlinux/kernel-org.clearlinux.native.6.8.10-1434 |
| 148 | + initrd: /boot//EFI/org.clearlinux/freestanding-00-early-ucode.cpio |
| 149 | + /boot//EFI/org.clearlinux/initrd-org.clearlinux.native.6.8.10-1434 |
| 150 | + /boot//EFI/org.clearlinux/freestanding-clr-init.cpio.gz |
| 151 | + /boot//EFI/org.clearlinux/freestanding-i915-firmware.cpio |
| 152 | + options: root=UUID=67e7ac9a-f7a1-4d5e-bbd6-012f5fa81cb5 rd.luks.uuid=abe6aaf2-3425-4eb1-b7f5-3f36746426fa quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp page_alloc.shuffle=1 rcupdate.rcu_expedited=1 rootfstype=ext4,btrfs,xfs,f2fs tsc=reliable rw module.sig_unenforce rootflags=x-systemd.device-timeout=0 |
| 153 | +
|
| 154 | +Get the kernel list installed |
| 155 | +***************************** |
| 156 | + |
| 157 | +.. code-block:: bash |
| 158 | +
|
| 159 | + bootctl list |
| 160 | +
|
| 161 | +And example output: |
| 162 | + |
| 163 | +.. code-block:: bash |
| 164 | +
|
| 165 | + type: Boot Loader Specification Type #1 (.conf) |
| 166 | + title: Clear Linux OS (Clear-linux-preempt_rt-6.1.38-105.conf) |
| 167 | + id: Clear-linux-preempt_rt-6.1.38-105.conf |
| 168 | + source: /boot//loader/entries/Clear-linux-preempt_rt-6.1.38-105.conf |
| 169 | + linux: /boot//EFI/org.clearlinux/kernel-org.clearlinux.preempt_rt.6.1.38-105 |
| 170 | + initrd: /boot//EFI/org.clearlinux/freestanding-00-early-ucode.cpio |
| 171 | + /boot//EFI/org.clearlinux/freestanding-clr-init.cpio.gz |
| 172 | + /boot//EFI/org.clearlinux/freestanding-i915-firmware.cpio |
| 173 | + options: root=UUID=67e7ac9a-f7a1-4d5e-bbd6-012f5fa81cb5 rd.luks.uuid=abe6aaf2-3425-4eb1-b7f5-3f36746426fa quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp page_alloc.shuffle=1 rcupdate.rcu_expedited=1 rootfstype=ext4,btrfs,xfs t> |
| 174 | +
|
| 175 | + type: Boot Loader Specification Type #1 (.conf) |
| 176 | + title: Clear Linux OS (Clear-linux-native-6.9.1-1436.conf) |
| 177 | + id: Clear-linux-native-6.9.1-1436.conf |
| 178 | + source: /boot//loader/entries/Clear-linux-native-6.9.1-1436.conf |
| 179 | + linux: /boot//EFI/org.clearlinux/kernel-org.clearlinux.native.6.9.1-1436 |
| 180 | + initrd: /boot//EFI/org.clearlinux/freestanding-00-early-ucode.cpio |
| 181 | + /boot//EFI/org.clearlinux/initrd-org.clearlinux.native.6.9.1-1436 |
| 182 | + /boot//EFI/org.clearlinux/freestanding-clr-init.cpio.gz |
| 183 | + /boot//EFI/org.clearlinux/freestanding-i915-firmware.cpio |
| 184 | + options: root=UUID=67e7ac9a-f7a1-4d5e-bbd6-012f5fa81cb5 rd.luks.uuid=abe6aaf2-3425-4eb1-b7f5-3f36746426fa quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp page_alloc.shuffle=1 rcupdate.rcu_expedited=1 rootfstype=ext4,btrfs,xfs,f> |
| 185 | +
|
| 186 | + type: Boot Loader Specification Type #1 (.conf) |
| 187 | + title: Clear Linux OS (Clear-linux-native-6.8.10-1434.conf) (default) (selected) |
| 188 | + id: Clear-linux-native-6.8.10-1434.conf |
| 189 | + source: /boot//loader/entries/Clear-linux-native-6.8.10-1434.conf |
| 190 | + linux: /boot//EFI/org.clearlinux/kernel-org.clearlinux.native.6.8.10-1434 |
| 191 | + initrd: /boot//EFI/org.clearlinux/freestanding-00-early-ucode.cpio |
| 192 | + /boot//EFI/org.clearlinux/initrd-org.clearlinux.native.6.8.10-1434 |
| 193 | + /boot//EFI/org.clearlinux/freestanding-clr-init.cpio.gz |
| 194 | + /boot//EFI/org.clearlinux/freestanding-i915-firmware.cpio |
| 195 | + options: root=UUID=67e7ac9a-f7a1-4d5e-bbd6-012f5fa81cb5 rd.luks.uuid=abe6aaf2-3425-4eb1-b7f5-3f36746426fa quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp page_alloc.shuffle=1 rcupdate.rcu_expedited=1 rootfstype=ext4,btrfs,xfs,f> |
| 196 | +
|
| 197 | + type: Automatic |
| 198 | + title: Reboot Into Firmware Interface |
| 199 | + id: auto-reboot-to-firmware-setup |
| 200 | + source: /sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f |
| 201 | +
|
| 202 | +Set default kernel to boot |
| 203 | +************************** |
| 204 | + |
| 205 | +You can check the id from the latest command: |
| 206 | + |
| 207 | +.. code-block:: bash |
| 208 | +
|
| 209 | + bootctl list |grep id: |cut -f 2 -d ":" |
| 210 | + id: Clear-linux-preempt_rt-6.1.38-105.conf |
| 211 | + id: Clear-linux-native-6.9.1-1436.conf |
| 212 | + id: Clear-linux-native-6.8.10-1434.conf |
| 213 | + id: auto-reboot-to-firmware-setup |
| 214 | +
|
| 215 | +
|
| 216 | +Set the kernel |
| 217 | + |
| 218 | +.. code-block:: bash |
| 219 | +
|
| 220 | + sudo bootctl set-default ID |
| 221 | +
|
| 222 | +For example to set 6.9.1 entry: |
| 223 | + |
| 224 | +.. code-block:: bash |
| 225 | +
|
| 226 | + sudo bootctl set-default Clear-linux-native-6.9.1-1436.conf |
| 227 | +
|
| 228 | +Just reboot |
| 229 | + |
| 230 | +.. code-block:: bash |
| 231 | +
|
| 232 | + sudo systemctl reboot |
| 233 | +
|
| 234 | +You will boot with the kernel set before. |
0 commit comments