Download kernel # Κατέβασμα πυρήνα
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.16.12.tar.xz
Extract kernel # Αποσυμπίεση πυρήνα
tar -xvpf linux-5.16.12.tar.xz
cd /usr/src/linux-5.16.12
Copy the config file of the current kernel # Αντιγραφή του ήδη υπάρχων config αρχείου
zcat /proc/config.gz > .config
blacklist keys # Απενεργοποιούμε την επιβεβαίωση των κλειδιών
nano .config
#CONFIG_SYSTEM_TRUSTED_KEYS
#CONFIG_SYSTEM_TRUSTED_KEYRING
#CONFIG_SYSTEM_REVOCATION_KEYS
(optional) If you want to have a “more personal and generic” config # (Αν θέλουμε) δίνουμε όνομα στον πυρήνα μας
make menuconfig
Press Enter on General set up---->
------------------------------------------------------------->( ) Local version - append to kernel release
Write here your kernel`s name, then save and exit if you dont need more configuration.
Kernel and modules compile # Μεταγλώτηση πυρήνα και μονάδων
make -j
---------now you need to be root for all the other commands---------
Modules installation # Εγκατάσταση μονάδων
#make modules_install
(optional) If you want take a look of your modules # Αν θέλουμε να τις δούμε βρίσκονται εδώ
ls /lib/modules/5.16.12mykernel
or whatever name you gave to kernel # το όνομα του πυρήνα αλλά ζει μ αυτό που δώσατε
Copy the generated bzImage to the system boot directory and some others (optional) also
Αντιγραφή του πυρήνα στο /boot και του System.map
cp arch/x86_64/boot/bzImage /boot/vmlinuz-5.16.12mykernel
cp System.map /boot/System.map-5.16.12mykernel
cd /boot && rm System.map
ln -s System.map-5.16.12mykernel System.map
Now run # Εκτελούμε
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 5.16.12mykernel
It will be something like this # θα πάρουμε αποτέλεσμα κάπως έτσι
take the last line and run it again # παίρνουμε την τελευταία γραμμή του mkinitrd και την εκτελούμε
mkinitrd -c -k 5.16.12mykernel -f ext4 -r /dev/sda3 -m jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz
it will be like this # θα πάρουμε κάτι αντοίστιχο
Update Grub # ενημέρωση του Grub
grub-mkconfig -o /boot/grub/grub.cfg
now you can #επανεκκίνηση
reboot
You may find your 5.16.10mykernel on Grub`s menu and enjoy it!
Ο πυρήνα είναι στο μενού του Grub τελευταίος , καλή τύχη!