I Compiled the Linux Kernel myself for the first time

It’s not really a big deal, but I am currently writing this using a linux kernel I compiled from source, which certainly feels like an accomplishment. The Arch Wiki has made the process fairly easy to follow. I just took the stock Arch Linux configuration without changes for now.

The most important part of this is of course that I have the option to do that, to take the source code of this incredible project and build my own kernel binary.

oo1,
forgotmylastusername,

Fun times. Always keep a fallback kernel installed. Even if you’re not compiling your own.

I had to learn what chroot is when I borked my own kernel compile and there wasn’t fallback.

JuxtaposedJaguar,

I feel like compiling your own kernel officially makes you not a normie. So… Welcome to the club!

erwan,

Hey, I did compile my kernel so I’m part of the club!

But now that I think about it, the last time was 20 years ago and it’s because it was the only way to get my sound card and network card working…

mtchristo,

Can I ask what are your pc specs , and how long did it take? + do you have a degree in computer science or prior knowledge of compiling code?

Gobbel2000,
@Gobbel2000@feddit.de avatar

It took roughly 10-15 minutes on a Ryzen 5800X with 32GB RAM. I have compiled other programs before, but none nearly as large and notable as the kernel. I am in fact very close to getting a computer science degree, but that is in no way required to be able to do this. If you are able to follow the wiki-page I linked, you can do it too.

addie,
@addie@feddit.uk avatar

It’s not the compiling that kernel is hard - ironically, it’s one of the easiest things in the whole ecosystem to compile, got great tooling. It’s breaking down the mental barrier of something that you thought would be hard, but turns out to be completely within your grasp. Great work, keep it up, and never be afraid to keep pushing onwards.

Gobbel2000,
@Gobbel2000@feddit.de avatar

Yes, that was my experience as well. And of course there is the added tension that if you mess up somehow your system might become unbootable.

rbos,
@rbos@lemmy.ca avatar

Wow, well done. I haven’t done that in like 20 years!

fmstrat,

Congrats! Keep this kind of mindset if you can, even later in life. It will continue to take you farther in life than you would imagine.

min_fapper,

Yep. The mindset will take you much further than the kernel itself.

TenTypekMatus,

I compiled Hyprland 2 hours ago, since it’s not in NixOS repos.

Makussu,

But there is a modul! Look into Hyprland wiki

glibg10b,

Damn, you ran make?

Gobbel2000,
@Gobbel2000@feddit.de avatar

Sure did.

abieNathanTheyThem,
@abieNathanTheyThem@lemmy.ml avatar

I hope it was in an airgapped environment.

snor10,

Now this is what gives a man the feeling of power.

banazir,
@banazir@lemmy.ml avatar

Nice! I also compiled the kernel multiple times when I used Gentoo back in mid 00’s. It may not be a big deal as such, but I feel kind of good being able to say I’ve done it.

Next challenge: write your own kernel.

tony,

I installed gentoo from stage 1 or maybe 2 back in the day… it compiles to compiler to compile the rest of the build process and then compiles the kernel and base… quite fascinating but it took about 3 hours on the hardware I was using.

muddybulldog,

Achievement unlocked… now try this… www.linuxfromscratch.org/lfs/

happyhippo,

8MB for an entire thing running a web server.

Mind: blown

GenBlob,

Nice! After the first time you get the hang of it but keep in mind, If you do make your own config you will have to recompile your kernel for any hardware that isn’t automatically enabled in the config like graphics, touchpad, tablets, and other peripherals you will plug into your computer. Reading up on what hardware you have helps a lot but I still manage to forget something when I have to create my own config. Thankfully you can just transfer your config to the next kernel instead of creating it all over again.

housepanther,

That’s certainly nothing to shake a stick, OP! Very well done. The last time I compiled a kernel was back in 1999 with Slackware. If I remember correctly it was a version previous to 7.

Shadow,
@Shadow@lemmy.ca avatar

I have vague memories around that time of doing it, I think it took 3 days to compile IIRC.

Or maybe I’m thinking of early Gentoo installs…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • kavyap
  • thenastyranch
  • cubers
  • ethstaker
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • GTA5RPClips
  • JUstTest
  • khanakhh
  • normalnudes
  • osvaldo12
  • cisconetworking
  • provamag3
  • Durango
  • tacticalgear
  • modclub
  • Leos
  • megavids
  • tester
  • anitta
  • lostlight
  • All magazines