How to compile a custom Linux kernel

preview_player
Показать описание
Denshi downlods, configures and compiles his very own Linux kernel. This works on every distro, btw!

Рекомендации по теме
Комментарии
Автор

Great video! A thing that wasn't mentioned is the options: `make olddefconfig` which creates a new config file based on a previous config file that you have (it may be the previous one you used) and makes sure to give the fill the new values with their default options. From my understanding, this means that, I will not have to always modify the same options every time I build a custom kernel which is nice because I don't want to do that every time. Of course the new values will need configuration (unless I leave their default value) but this makes sense.

Also, I've saw another video that talks specifically about building a custom kernel on Arch Linux and before updating the bootloader, he tells about generating an "initial ramdisk" using `mkinitcpio -k <kernel_number> -g Of course replace the <kernel_number> with the number of the kernel you are using. I don't know if this is needed only for Arch users or if it is needed in general but I just thought to add it here.

Edit: Creating an "initial ramdisk" is necessary for Arch Linux even if you don't enable it in the kernel. I'll find how to fix it and I'll update.

godnyx
Автор

Well time to recompile gentoo, see you next week!

shrimp_on_internet
Автор

Wow, It's a lot easier than I thought.

VDani
Автор

This is the most fascinating part that goes with Linux and I am hooked on making my kernel just for the computer I am using!

kentlisius
Автор

Thank you for that ! It was my first exposure to how to customize the Linux kernel. Looks tempting...

fotografm
Автор

Free should always be run at startup.
Verify with uptime. Then run free.
A system with higher uptime typically has more resources being utilized.

Always run free immediately after boot if using for comparison purposes

ejbully
Автор

Uhhh... Everything worked fine until i booted the new kernel. My laptop freezed and i need to reboot it manually to start de old kernel.

Bruh-hdrj
Автор

Should also say, your current running Linux has a config file. If you simply want to copy that and use it, that's mostly a safe option.
I found, if you copy it and don't ever even open it with the menu-config, you get problems. If you make a copy of it, then open it with menu-config, change nothing, save it, and then run your make / compile with that, it works. At least it works inside a VM. I've had one & only one go at doing this on bare metal in the last 4 years or so, and it didn't load. I had to re-install from scratch. What was the problem? I never found out. I think the problem had something to do with that version of Mint and the version then current of the binary utilities, but I'm half guessing about that. I know I did precisely the same steps on bare metal I'd been doing in the VMs, and it worked flawlessly in them, but when I tried it on the real-steel ...
If & when I get my hands on a 16c-32t R9, I will be extremely interested in having another go at it. There's stacks of stuff in the generic kernel now about side_channel_exploit_mitigation, which I would be prepared to simply edit out. I'm not a data centre. No example of exploits using those has yet been reported in the wild, and they're mostly only an issue on Intel processors. If I'm running Linux as a home desktop user, and nobody has ever reported Spectre+Melt Down exploits being used in the wild, I think I'd like that 20% or something performance back. Like Astra-Zenica and blood-clots, it's a chance I'm willing to take.

Kneedragon
Автор

Thanks for the into. I am compiling it now. See u next month.

milkyay
Автор

Great content and video, but could you slow it down a bit on the next video? It's hard to follow along and work on multiple computers if you're trying to duplicate the steps. Thank you!

joeleone
Автор

+1 for the always sunny in philadelphia soundtracks

JihedCh
Автор

12:17 If you run -j4 instead, will it still compile the kernel? My laptop only has 4 cores.

MasterH
Автор

is it still relevant to be implemented in 2023?

muhamadzainimansur
Автор

Help please!
sudo make modules _install -j16
does not work. It says:

sed: modules.order can't be read: File or directory not found
make: *** [Makefile:1479: __modinst_pre] Error 2

I have no clue what the Problem is

xperience-evolution
Автор

isn't lz4 compression faster than zst ?

Neucher
Автор

I'm psyched. Definitely gonna fuck w/ this. Viva revolution.

PaullyRobots
Автор

Can I compile the custom Linux kernel for embedded devices like this? i.e. risk--v / cortex m0 etc.

MrDombosfi
Автор

Hi! Why didn't you create a new initial ramdisk? Did you forget it? I was expecting a "mkinitcpio -p linuxAlex".

ruirosado
Автор

Does this work on a raspberry pi? Like pi 5?

luigiprovencher
Автор

Hi Denshi, thanks for you the video. So I created a custom kernel, copied to boot folder and so on. But it is not adding in the GRUB list when I update the grub. Any suggestions? Thanks

Ja.KooLit