Last active
September 17, 2023 20:37
-
-
Save jdeathe/402a76031bb8a625397d68e4d86ca16b to your computer and use it in GitHub Desktop.
Revisions
-
jdeathe revised this gist
Sep 17, 2023 . No changes.There are no files selected for viewing
-
jdeathe revised this gist
Sep 17, 2023 . 1 changed file with 2 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,13 +7,8 @@ ## Identify the latest installed kernel ``` # kernel_release_default="$( grubby --default-kernel \ | sed -r -e 's~^/boot/vmlinuz-(.*)$~\1~' )" ``` -
jdeathe revised this gist
Sep 17, 2023 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ## Identify the latest installed kernel ``` # kernel_release_default="$( find /boot/ -name "$( grubby --default-kernel \ | sed -r -e 's~^(/boot/)(vmlinuz-[0-9]+).*$~\2~' @@ -19,17 +19,17 @@ ## Identify the running kernel ``` # kernel_release_running="$( uname -r )" ``` ## Load new kernel if available and apply with fast-reboot ``` # if [[ ${kernel_release_default} != ${kernel_release_running} ]]; then \ kexec --reuse-cmdline --no-checks \ --load /boot/vmlinuz-${kernel_release_default} \ --initrd=/boot/initramfs-${kernel_release_default}.img && \ systemctl kexec; \ fi ``` -
jdeathe revised this gist
Sep 17, 2023 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ## Identify the latest installed kernel ``` # kernel_default="$( find /boot/ -name "$( grubby --default-kernel \ | sed -r -e 's~^(/boot/)(vmlinuz-[0-9]+).*$~\2~' @@ -26,10 +26,10 @@ ## Load new kernel if available and apply with fast-reboot ``` # if [[ ${kernel_default} != ${kernel_running} ]]; then \ kexec --reuse-cmdline --no-checks \ --load /boot/vmlinuz-${kernel_default} \ --initrd=/boot/initramfs-${kernel_default}.img && \ systemctl kexec; \ fi ``` -
jdeathe revised this gist
Sep 16, 2023 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,12 +8,12 @@ ``` # kernel_release="$( find /boot/ -name "$( grubby --default-kernel \ | sed -r -e 's~^(/boot/)(vmlinuz-[0-9]+).*$~\2~' )"* \ | sort -rg -t. -k 2 -k 3 -k 4 -k 5 -k 6 \ | head -n1 \ | sed -r -e 's~^/boot/vmlinuz-~~' )" ``` -
jdeathe revised this gist
Sep 16, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ ## Load new kernel if available and apply with fast-reboot ``` # if [[ ${kernel_release} != ${kernel_running} ]]; then \ kexec --reuse-cmdline --no-checks \ --load /boot/vmlinuz-${kernel_release} \ --initrd=/boot/initramfs-${kernel_release}.img && \ -
jdeathe created this gist
Sep 16, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ # Kernel Update with Fast Boot via kexec ``` # <-- NOTE: This represents the command prompt of a root user ``` ## Identify the latest installed kernel ``` # kernel_release="$( find /boot/ -name "$( grubby --default-kernel \ | sed -r -e 's~^(/boot/)(vmlinuz-[0-9]+).*$~\2~' )"* \ | sort -rg -t. -k 2 -k 3 -k 4 -k 5 -k 6 \ | head -n1 \ | sed -r -e 's~^/boot/vmlinuz-~~' )" ``` ## Identify the running kernel ``` # kernel_running="$( uname -r )" ``` ## Load new kernel if available and apply with fast-reboot ``` if [[ ${kernel_release} != ${kernel_running} ]]; then \ kexec --reuse-cmdline --no-checks \ --load /boot/vmlinuz-${kernel_release} \ --initrd=/boot/initramfs-${kernel_release}.img && \ systemctl kexec; \ fi ```