From 686dce4b02d462ade83d71cfe4a61b062782c660 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 15 Dec 2024 22:28:04 +0100 Subject: Move to posts --- content/gentoo-kernel-upgrade.md | 132 --------------------------------- content/posts/_index.md | 4 + content/posts/gentoo-kernel-upgrade.md | 132 +++++++++++++++++++++++++++++++++ hugo.toml | 3 +- themes/chilldark | 2 +- 5 files changed, 138 insertions(+), 135 deletions(-) delete mode 100644 content/gentoo-kernel-upgrade.md create mode 100644 content/posts/_index.md create mode 100644 content/posts/gentoo-kernel-upgrade.md diff --git a/content/gentoo-kernel-upgrade.md b/content/gentoo-kernel-upgrade.md deleted file mode 100644 index c806c31..0000000 --- a/content/gentoo-kernel-upgrade.md +++ /dev/null @@ -1,132 +0,0 @@ -+++ -title = "Gentoo kernel upgrade" -summary = "Little howto on updating the kernel in a Gentoo system" -+++ - -## Preliminary steps - -Fetch the sources of the kernel that you want to install. - -```sh {class="cmd-root"} -emerge -uDUa --with-bdeps=y =sys-kernel/gentoo-sources-X.Y.Z -``` -You may also need to update @world set before updating the kernel. - -```sh {class="cmd-root"} -emerge -uDUa --with-bdeps=y @world -``` - -Using eselect, select the kernel version that you want to upgrade to. - -```sh {class="cmd-root"} -eselect kernel list -eselect kernel set X -``` - -Go to the directory containing kernel sources. - -```sh {class="cmd-root"} -cd /usr/src/linux -``` - -## Configuration - -Start by copying your `.config` from the old kernel sources. - -```sh {class="cmd-root"} -cp /usr/src/linux-A.B.C-gentoo/.config /usr/src/linux -``` - -Then, you will have to update the configuration file. The oldconfig command will interactively prompt you to insert values for the new options. - -```sh {class="cmd-root"} -make oldconfig -``` - -Alternatively, the olddefconfig command will automatically insert default values for the new options. - -```sh {class="cmd-root"} -make olddefconfig -``` - -To easily change more configuration options you can use the menuconfig command, which will start an interactive ncurses interface. - -```sh {class="cmd-root"} -make menuconfig -``` - -{{< note Warning >}} -Manually editing the `.config` file is highly discouraged. -{{< /note >}} - -## Building - -Once you finished setting your configuration, you can build your kernel with make. -You can speed up the build process by using multiple make jobs (determine the number with nproc). - -```sh {class="cmd-root"} -make -jN -``` - -## Intel microcode addendum - -Firstly, install the microcode firmware and the tool to manage it. - -```sh {class="cmd-root"} -emerge sys-firmware/intel-microcode -``` - -Use the newly installed `iucode_tool` to get the processor signature and search a microcode bundle with a matching signature. - -```sh {class="cmd-root"} -iucode_tool -S -iucode_tool -S -l /lib/firmware/intel-ucode/* -``` - -Enable in the kernel configuration the microcode loading features. Then, add in the `Firmware loading facility` the microcode -bundle found before as a named firmware blob. - -After building the kernel, you can easily verify after the boot that the microcode is loaded with dmesg. - -```sh {class="cmd-root"} -dmesg | grep microcode -``` - -## Installation - -First of all, mount the boot partition, if it is not already mounted. - -```sh {class="cmd-root"} -mount /dev/XXX /boot -``` - -Then, you can install the new kernel and modules. - -```sh {class="cmd-root"} -make install -make modules_install -``` - -Update your bootloader configuration. If you are using GRUB, you can use grub-mkconfig. - -```sh {class="cmd-root"} -grub-mkconfig -o /boot/grub/grub.cfg -``` - -Some kernel modules may be installed by packages and live outside of the kernel source tree (e.g. Nvidia drivers), and need to be rebuilt. - -```sh {class="cmd-root"} -emerge @module-rebuild -``` - -Additionally, updating the firmware may be required by some drivers. - -```sh {class="cmd-root"} -emerge sys-kernel/linux-firmware -``` - -## References -- https://wiki.gentoo.org/wiki/Kernel -- https://wiki.gentoo.org/wiki/Kernel/Upgrade -- https://wiki.gentoo.org/wiki/Kernel/Removal -- https://wiki.gentoo.org/wiki/Intel_microcode diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..9e0d0df --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Posts" ++++ + diff --git a/content/posts/gentoo-kernel-upgrade.md b/content/posts/gentoo-kernel-upgrade.md new file mode 100644 index 0000000..c806c31 --- /dev/null +++ b/content/posts/gentoo-kernel-upgrade.md @@ -0,0 +1,132 @@ ++++ +title = "Gentoo kernel upgrade" +summary = "Little howto on updating the kernel in a Gentoo system" ++++ + +## Preliminary steps + +Fetch the sources of the kernel that you want to install. + +```sh {class="cmd-root"} +emerge -uDUa --with-bdeps=y =sys-kernel/gentoo-sources-X.Y.Z +``` +You may also need to update @world set before updating the kernel. + +```sh {class="cmd-root"} +emerge -uDUa --with-bdeps=y @world +``` + +Using eselect, select the kernel version that you want to upgrade to. + +```sh {class="cmd-root"} +eselect kernel list +eselect kernel set X +``` + +Go to the directory containing kernel sources. + +```sh {class="cmd-root"} +cd /usr/src/linux +``` + +## Configuration + +Start by copying your `.config` from the old kernel sources. + +```sh {class="cmd-root"} +cp /usr/src/linux-A.B.C-gentoo/.config /usr/src/linux +``` + +Then, you will have to update the configuration file. The oldconfig command will interactively prompt you to insert values for the new options. + +```sh {class="cmd-root"} +make oldconfig +``` + +Alternatively, the olddefconfig command will automatically insert default values for the new options. + +```sh {class="cmd-root"} +make olddefconfig +``` + +To easily change more configuration options you can use the menuconfig command, which will start an interactive ncurses interface. + +```sh {class="cmd-root"} +make menuconfig +``` + +{{< note Warning >}} +Manually editing the `.config` file is highly discouraged. +{{< /note >}} + +## Building + +Once you finished setting your configuration, you can build your kernel with make. +You can speed up the build process by using multiple make jobs (determine the number with nproc). + +```sh {class="cmd-root"} +make -jN +``` + +## Intel microcode addendum + +Firstly, install the microcode firmware and the tool to manage it. + +```sh {class="cmd-root"} +emerge sys-firmware/intel-microcode +``` + +Use the newly installed `iucode_tool` to get the processor signature and search a microcode bundle with a matching signature. + +```sh {class="cmd-root"} +iucode_tool -S +iucode_tool -S -l /lib/firmware/intel-ucode/* +``` + +Enable in the kernel configuration the microcode loading features. Then, add in the `Firmware loading facility` the microcode +bundle found before as a named firmware blob. + +After building the kernel, you can easily verify after the boot that the microcode is loaded with dmesg. + +```sh {class="cmd-root"} +dmesg | grep microcode +``` + +## Installation + +First of all, mount the boot partition, if it is not already mounted. + +```sh {class="cmd-root"} +mount /dev/XXX /boot +``` + +Then, you can install the new kernel and modules. + +```sh {class="cmd-root"} +make install +make modules_install +``` + +Update your bootloader configuration. If you are using GRUB, you can use grub-mkconfig. + +```sh {class="cmd-root"} +grub-mkconfig -o /boot/grub/grub.cfg +``` + +Some kernel modules may be installed by packages and live outside of the kernel source tree (e.g. Nvidia drivers), and need to be rebuilt. + +```sh {class="cmd-root"} +emerge @module-rebuild +``` + +Additionally, updating the firmware may be required by some drivers. + +```sh {class="cmd-root"} +emerge sys-kernel/linux-firmware +``` + +## References +- https://wiki.gentoo.org/wiki/Kernel +- https://wiki.gentoo.org/wiki/Kernel/Upgrade +- https://wiki.gentoo.org/wiki/Kernel/Removal +- https://wiki.gentoo.org/wiki/Intel_microcode diff --git a/hugo.toml b/hugo.toml index f0ea480..1257dcb 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,10 +1,9 @@ baseURL = 'https://fedang.net' languageCode = 'en-us' title = '~fedang' - theme = 'chilldark' - enableRobotsTXT = true +enableGitInfo = true [params.author] name = "Federico Angelilli" diff --git a/themes/chilldark b/themes/chilldark index 2402263..c621bef 160000 --- a/themes/chilldark +++ b/themes/chilldark @@ -1 +1 @@ -Subproject commit 2402263a9790dee38d2b5c57fbdaed1fe8bacd27 +Subproject commit c621befb930ebf3422316a4286d5f8cc848763b0 -- cgit v1.2.3