Why Compile a Linux Kernel from Source?

preview_player
Показать описание
I have had a few requests to walk through a linux kernel source build from start to finish, so today I am going to use Debian 12 stable as my starting point and I am going to compile and install the lated (as of today) Linux Kernel 6.7.9. I will also discuss some of the reasons why you might want to compile a Linux Kernel in this video.

AI thumbnail: One of the most fascinating of all the trades a blacksmith working a forge to create something from a lump of metal.

Chapters
00:00 - Why Compile the Linux Kernel From Source?
05:01 - Retrieve the Linux Kernel Source Code
06:08 - Install Build Packages
10:00 - Compile TIme Errors
10:25 - Fixing the Error
11:22 - Install the Modules
11:49 - Make Install (Copy to /boot)
11:57 - Reboot
12:09 - Verify the Kernel is Working
12:48 - Final Thoughts

Follow me:
Twitter @djware55

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

Many of you who watch this channel know I use VM's for playing around, learning stuff and in this case compiling a linux kernel on a Debian 12 VM. My workstation is Fedora KDE which runs under Asahi Linux on a Mac Mini...so that is just how I roll. So suspicious .... I never ever put a new kernel on hardware until I have tested it out...one thing I do not need is a kernel build which fails, breaks or mutalates my data...

CyberGizmo
Автор

Ability to compile your own kernel from source is a privilege in a world of today where everything is served to you based on general user requirements

SajjadRizvi
Автор

I fondly remember 20 - 30 years ago when the only way to add drivers was to recompile the kernel. (Before kernel modules were added)

Nighthawk
Автор

I first compiled a kernel in the mid 1990's. I had an old 386DX machine and wanted to have as stripped down a kernel as I could get so there were more resources for the stuff I was trying to do. Many hours and many broken compiles later I had something that worked and I felt great that I'd achieved that. The hardware was a lot simpler in those days and working through menuconfig wasn't as daunting a prospect as it would be today; I haven't tried a kernel build recently.
I might just have to give it another shot, just for old time's sake.

dingokidneys
Автор

Just compiled the latest version of the NetBSD 9.3 kernel for an old 486 system that was upgraded to an 83 MHz Pentium Overdrive. Compiling it myself reduced the footprint to <2 MB and built in ISA bus support. Worked perfectly!

mke
Автор

My favorite YouTuber providing us more useful information! Thank you for existing, sir!

theplaymakerno
Автор

I love the Fedora icon for the KDE menu panel. Thank you for this great tutorial, I think we need more of this. You probably don't appriciate how much value your little tutorials have. Watching someone who did that gazillion times is completely different from watching tutorials by people who make tutorials. We can learn from your knowlege and experience, it's very much appriciated.

isopticon
Автор

As a Gentoo user for 21 years now, compiling kernels for me is "par for the course" - once you have a good and working kernel config then just re-using that every time you upgrade works pretty flawlessly.

Every couple of years I do try to streamline the configuration because of "bloat" due to blindly accepting default options when doing a "make oldconfig" to upgrade a config to a newer kernel release.

terrydaktyllus
Автор

Due to the weirdness of YouTube algorithms, I hadn't watched a Cybergizmo episode for several months. Totally loving the beard!!

drkskwlkr
Автор

a good reason to compile the kernel is if you are using Linux From Scratch or Gentoo. There may be a few other distros too.

whtiequillBj
Автор

You sir are absolutely awesome! This was most educational. I always look forward to all your content, thank you! 🎉

repairstudio
Автор

Nice one DJ, many thanks for this, sure indeed bring some old memories, well done!

abobader
Автор

Thanks, DJ! I just happened to be compiling 6.7.9 this week as I'm working on some new drivers for prototype hardware. Very timely!

robertleemeyer
Автор

That's why I am a Slackware user. Compiling your own kernel or just software in general is very easy to do with Slackware.

matthew-to
Автор

A lot of people look at it as unnecessary, but I'd say learning is always necessary. Never stop learning because the day you do is the day you cease to exist.

anon_y_mousse
Автор

Hey DJ. Well this video was just fascinating. Thank you for this!!

Appalling
Автор

Man, to think that the first time I tried installing gentoo with all the kernel configuration and such was before youtube even existed is wild. What I'd've given for the resources of today

LordHonkInc
Автор

Interesting info. Never crossed my mind that you can compile you're own kernel and that could easily become Pandora's box later down the road. I'm only 3+ years in atm so it's a later project but something to think about. Thanks for sharing.

Nixima
Автор

Last time I recall compiling custom kernel was for Asterisk's PBX because some phone card drivers requires unofficial kernel patches to be applied.

AntonioGallo
Автор

It's funny that there are still magazines with Linux on DVD. I got my first PC with Windows 95 pre-installed when I was 13/14. I immediately unscrewed it because Windows kept crashing. Of course, it wasn't the hardware, so I went to the gas station and bought a booklet with a Linux CD. The magazine contained instructions on how to compile Linux. It was a bit more complicated, but at least the 133 MHZ, 16MB computer ran without any problems. Well, 26 years later I still use Linux.

No-no-no-no-nope