Configuring a Custom Linux Kernel (5.6.7-gentoo)

Поділитися
Вставка
  • Опубліковано 2 чер 2024
  • In this video I show you how to configure a custom Linux kernel, and the options that I use in my kernel configuration
    Subscribe to my UA-cam channel goo.gl/9U10Wz
    and be sure to click that notification bell so you know when new videos are released. ₿💰💵💲Help Support the Channel by Donating Crypto💲💵💰₿
    Bitcoin
    3MMKHXPQrGHEsmdHaAGD59FWhKFGeUsAxV
    Ethereum
    0xeA4DA3F9BAb091Eb86921CA6E41712438f4E5079
    Litecoin
    MBfrxLJMuw26hbVi2MjCVDFkkExz8rYvUF
    Dash
    Xh9PXPEy5RoLJgFDGYCDjrbXdjshMaYerz
    Zcash
    t1aWtU5SBpxuUWBSwDKy4gTkT2T1ZwtFvrr
    Chainlink
    0x0f7f21D267d2C9dbae17fd8c20012eFEA3678F14
    Bitcoin Cash
    qz2st00dtu9e79zrq5wshsgaxsjw299n7c69th8ryp
    Etherum Classic
    0xeA641e59913960f578ad39A6B4d02051A5556BfC
    USD Coin
    0x0B045f743A693b225630862a3464B52fefE79FdB
  • Наука та технологія

КОМЕНТАРІ • 250

  • @zyptoskid
    @zyptoskid 4 роки тому +445

    I can't believe I just sat there silently for a bunch of minutes watching a kernel build in real time

    • @TheRealFaceyNeck
      @TheRealFaceyNeck 3 роки тому +34

      I suppose not everyone could appreciate a kernel build video, but to me it sure as hell beats watching pain dry or grass grow. :-P

    • @askhowiknow5527
      @askhowiknow5527 3 роки тому +30

      Silently?
      I couldn’t stop screaming in bone shattering terror

    • @TheRealFaceyNeck
      @TheRealFaceyNeck 3 роки тому +3

      @@askhowiknow5527 I commend you sharing! It certainly requires tremendous amounts of courage, strength and humility to admit such things.

    • @TheZakarumite
      @TheZakarumite 3 роки тому +1

      real kernel lover here :) i watched both the video and my kernel-make in qemu... its better

    • @oslogrigor8320
      @oslogrigor8320 2 роки тому

      @@askhowiknow5527 You know how it goes. Haha.

  • @BombedByMe
    @BombedByMe 4 роки тому +415

    I like how you didnt even notice the modules_isntall and just were like yea its done

    • @cocosloan3748
      @cocosloan3748 4 роки тому +9

      There is such option in linux to understand mistaken word you know...

    • @rahilarious
      @rahilarious 3 роки тому +27

      Did he really need to make modules_install? He disabled support for modules then why make?

    • @deleterium
      @deleterium 3 роки тому +55

      Ready to reboot and get first kernel panic!
      Then chroot again to fix!

    • @TheToniz4
      @TheToniz4 3 роки тому +6

      @@deleterium just have a backup kernel, and sometimes the modules that you forgot to install is not really important

    • @regenjacob
      @regenjacob 3 роки тому +14

      yeah now we know that the install isnt-all done

  • @Returnality
    @Returnality 4 роки тому +225

    An important note: if you are using GPT you want to go into enable the block layer, then partition types, and activate advanced partition selection and EFI GUID support.

    • @rosa1848
      @rosa1848 2 роки тому +3

      You can also disable msdos in those settings if you don't need it, for me it was enabled alongside gpt by default

    • @NicStrike
      @NicStrike 10 місяців тому +3

      What if I'm using Chat GPT? /s

  • @TheRealFaceyNeck
    @TheRealFaceyNeck 3 роки тому +149

    I haven't watched the full video yet, but I wanted to jot this down in case I forget later:
    I highly recommend downloading/'installing' the Gentoo distribution kernel to start out with. It'll allow you to have a kernel that's tested by the Gentoo devs and considered to be the most versatile/less likely to cause problems. It also takes very little time to install.
    Then, you can customize your kernel over-and-over-again, and if somehow it breaks, you have a fully-working and (moderately) up-to-date kernel to get back into your system easily, as well as comparing/contrasting performance/mem usage/you name it.
    I'll remove this comment if I hear that it's mentioned in the video. It's my standard procedure for a new Gentoo install; emerge -av gentoo-kernel-bin and go from there.

    • @applemarkwantsvids
      @applemarkwantsvids 3 роки тому +9

      Dig it, man! Thank you for that tip.

    • @TheRealFaceyNeck
      @TheRealFaceyNeck 3 роки тому +4

      @@applemarkwantsvids You are quite welcome :-)
      Thanks for letting me know it was helpful.

    • @danieleccleston7928
      @danieleccleston7928 2 роки тому +4

      Thanks for this, I was thinking about gentoo but I was worried about all the configuration, I'll use this approach.

    • @cookingboss888
      @cookingboss888 Рік тому +2

      thanks so much. this was so helpful

    • @TheRealFaceyNeck
      @TheRealFaceyNeck Рік тому +1

      @@cookingboss888 I'm very glad it helped you out! 🙂
      I know compiling the kernel, and building the toolchain and all that is part of the Gentoo experience, but sometimes you want a fucking kernel to work when everything goes tits up lol.

  • @teslainvestah5003
    @teslainvestah5003 2 роки тому +105

    15:50 My advice is the opposite. When a setting concerns protection against corruption, don't turn it off just for a bit of speed you will probably never notice. Nothing disrupts your workflow like trying to troubleshoot a brick that was your primary computer yesterday.

  • @micycle8778
    @micycle8778 3 роки тому +47

    14:00 when I pulled up the help tab for level 5 page tabel support I started laughing at 128 PiB OF ADDR SPACE

  • @mitchelvalentino1569
    @mitchelvalentino1569 4 роки тому +15

    The Lamborghini analogy nailed it 😎

  • @letsplayonlinux4383
    @letsplayonlinux4383 4 роки тому +35

    This is the best Linux Kernel video tutorial, I've watched on UA-cam, because you've gave an excellent detailed explanation. I' d like also to request a video tutorial on using "etc-update" and "dispatch-conf" to solve conflict packages on Gentoo. Thank you !

    • @vacant2012
      @vacant2012 4 роки тому +1

      etc-update and dispatch-conf aren't used to solve package conflicts, unless you're using autounmask-write, which at least IMO, is not a good idea.

    • @mpotane
      @mpotane 3 роки тому +1

      just do etc-update and then enter -5 right afterwards

    • @lvisgarcia
      @lvisgarcia 3 роки тому

      @@vacant2012 Why do you think autounmask-write is a bad idea?

    • @vacant2012
      @vacant2012 3 роки тому +1

      @@lvisgarcia To be fair, I've never actually put autounmask-write or -continue into my EMERGE_DEFAULT_OPTS, so I can't speak to the effectiveness of the parameter from first hand experience.
      My position about autounmasking was primarily formed through second and third hand experience when I used to hang out on #gentoo on freenode. More often than not, it seems like new users run into issues with portage because they rely a bit too much on autounmask to do things for them. When combined together with other questionable practices, portage can come up with some very wacky recommendations, including unmasking really old or really new versions of openssl because of bindist inconsistencies.
      So it's clear, --autounmask=y is incredibly useful because, in the grand scheme of things, portage is usually VERY good about properly telling me what configuration changes I need to make in order to update / install something. But I think autounmask-write and especially autounmask-continue can be dangerous if you put those parameters into your EMERGE_DEFAULT_OPTS, because in the circumstances where portage DOESN'T recommend the appropriate action to take for what you're trying to accomplish, automatically doing anything certainly causes more harm than good.
      And I also happen to think there's some value in manually updating my configuration files since it can give me some pause before I just randomly install software. If I have to add 20-30 different USE flags, is that something I really want to install? Maybe, but it's a habit I've gotten into.
      I do use autounmasking in some circumstances, typically relating to packages that require 32bit support (ie; wine, steam), but for those kinds of situations, I don't need autounmask-write. I just need autounmask=y and then hit y on the prompt when it asks if I want to add those USE flags.

  • @jojipy8309
    @jojipy8309 3 роки тому +53

    pro tip: use the -j option to specify an amount of threads

  • @anupdhond
    @anupdhond Місяць тому

    You have tremendous patience to go through and explain the features. Most people leave it at defaults. nice vid.

  • @maxsilvester1327
    @maxsilvester1327 3 роки тому +12

    A video about the experimental use flag of gentoo-sources would be good. This adds more processors to choose from and you can select "native" as the processor family, so gcc will autodetect your cpu (native is intel only for some reason)

  • @mrchristoph5674
    @mrchristoph5674 2 роки тому

    Aforementioned is one of my favorite words. I'm glad you could throw it in there once.

  • @g3nc0d3r2
    @g3nc0d3r2 3 роки тому +2

    Just discovered your channel, I'm impressed by your videos. I've compiled customized kernel for my gentoo system before. Next time I start a fresh gentoo install I'll definitely take note from your video

  • @codebitcookie8053
    @codebitcookie8053 3 роки тому +22

    This was insanely useful, thanks for taking out your time and teaching us this

  • @luigitech3169
    @luigitech3169 4 роки тому +117

    I'd like to see some benchmarks to see how much is worth the effort.

    • @archuser7607
      @archuser7607 4 роки тому +1

      Yeah I vote 👌 😎 you

    • @mattwilliams1844
      @mattwilliams1844 4 роки тому +88

      People have already done that, it's actually surprisingly not much of a difference, which is why gentoo autism memes are popular, the autistic hours spent configuring and compiling like its 2002 for a bit more performance. Useful knowledge to have for sure though

    • @archuser7607
      @archuser7607 4 роки тому +12

      @@mattwilliams1844 yeah yesterday night I started compiling lxde-base today morning it finished

    • @majorgamerjay5221
      @majorgamerjay5221 3 роки тому +28

      my gentoo used 200 something mb RAM after startup on tty using the debian-sources kernel, but after using xanmod sources while following config from this video, it went to straight 60mb at first and after enabling HD audio in kernel, it became 80mb

    • @awwastor
      @awwastor 3 роки тому +16

      @@mattwilliams1844 Yeah now you know why gentoo users use suckless. They build fast.

  • @raulalbertobetancurgarcia6083
    @raulalbertobetancurgarcia6083 2 місяці тому +1

    El mejor video, el más completo hasta el momento. Muchas gracias.

  • @nonamebear1136
    @nonamebear1136 4 роки тому +6

    Portage and use flags is why I chose to use gentoo, everything else was a bonus.
    Thank you for explaining all the options.

    • @jameshall5556
      @jameshall5556 4 роки тому +3

      I love gentoo for the use flags and the versatility, but my laptop takes ages to compile. :(

    • @nonamebear1136
      @nonamebear1136 4 роки тому +3

      @@jameshall5556 My computer is more beefy so the the compile times are not that long for me. I wish that I could afford a threadripper, then it would be really fast.

    • @jmills4313
      @jmills4313 3 роки тому +3

      i chose gentoo for the learning experience. that was 10yrs ago. still learn something new everyday.

    • @CommandoBlack123
      @CommandoBlack123 2 місяці тому

      @@jameshall5556I ONLY compile overnight. I never compile while i'm awake.

  • @DonAlcohol
    @DonAlcohol 3 роки тому +2

    not verry important side note and i might be wrong here but it was stated in the be beginning of the video that you get "this ncurses menu that looks like this" but i believe that 'make menuconfig' uses the dialog toolkit while make nconfig uses the ncurses toolkit. , some other extra options that might come in handy for certain purposes (like quickly scroll over all options to check your config for stuff you might have forgotten or missed during the actual configuration) `make MENUCONFIG_MODE=single_menu menuconfig` or `make NCONFIG_MODE=single_menu nconfig` or similar with qconfig(xconfig) makes all available options display on one single long list isntead of having to traverse multiple layers of menus

  • @codebitcookie8053
    @codebitcookie8053 3 роки тому +4

    This is one of the best videos on UA-cam, I love your videos They really got me using Linux AND gentoo, keep it up!

  • @IrishluckLinux
    @IrishluckLinux 4 роки тому +13

    Great video! keep them up!

  • @RealMephres
    @RealMephres 8 місяців тому

    Cheers for the guide, been able to make a kernel optimized for my own hardware that way. It's about 10.6MB large with LZ4 compression and without the usage of any initramfs files. I use about 150MB of RAM on the TTY and 225MB in bspwm/sway with htop and the suckless terminal running. Everything seems to work as expected, too.
    Minor Update: got it down to 8.4MB but somehow have an increased memory footprint of around 10-15MB. I'll look into that but it should be fixable.

  • @exitvelocity34
    @exitvelocity34 3 роки тому +9

    Great job going through this. Very common error on the make modules_install step (27:33). Error I've made is not including the underscore in modules_install. Looks very different as it begins if done correctly and should not get "make: ** no rule to make target..." error at the end. Again, great job. Only mentioning for correctness as I've certainly done this in the past.

  • @fahrradflucht7723
    @fahrradflucht7723 3 роки тому +16

    How did you come up with the kernel log buffer size? Is there a rule of thumb people use?

  • @sahaskamble4467
    @sahaskamble4467 Рік тому

    Thanks for this video I just build my custom Arch kernel with help of Arch Build System and it's just too good and also enabled tux logo on bootup it awesome : )

  • @rahilarious
    @rahilarious 3 роки тому +2

    Exactly what i was looking for thanks so much

  • @alphamilinux
    @alphamilinux 4 роки тому +2

    Thank-s a lot ... and for taking the effort too. Cool :)

  • @uwuwaifu101
    @uwuwaifu101 Рік тому +3

    Thank you so much for your gentoo tutorials! Main Source: Gentoo wiki. Main Source 2: Your channel! Thank you for your amazing work!

  • @DonAlcohol
    @DonAlcohol 2 роки тому +1

    if you want kernel frambuffer from efi support in combi with nvidia dirvers you should enable [*]mark vga/... fb aas generic (19:16) ,disable nouveau in drivers and efifb (efi frambuffer)and mark simple framebuffer support in framebuffer devices.
    funny sidenote , configuring the kernel from default sources config ~60minutes(of wich 40 reasearching options) , configuring the kernel starting from the manjaro config.gz, 3hours mostly changing Module to built in ,but having to go up the chain and finding the one blocking it, and disabling unneeded modules)

  • @jmills4313
    @jmills4313 3 роки тому +1

    a note on numa...according to numerous reports if you use cuda or nvenc you need numa enabled. this could have changed by now but just a heads up to everyone.

  • @oj0024
    @oj0024 3 роки тому +12

    No make -j ?

  • @shater1164
    @shater1164 4 роки тому +1

    Good good, we wanna see more :)

  • @skankhunt-ef3vw
    @skankhunt-ef3vw 2 роки тому

    u r best linux youtuber

  • @derev6126
    @derev6126 2 роки тому

    thank you very helpful video with your nice voice

  • @VixieTSQ
    @VixieTSQ 4 роки тому +4

    Extremely useful
    Thank you so much

  • @no-ld3hz
    @no-ld3hz 3 роки тому +4

    it helps if you do:
    make with -j and -l arguments set the amt of cores you have. You can use nproc:
    make -j$(nproc) -l($nproc) && sudo make install -j$(nproc) -l$(nproc)

    • @ddystopia8091
      @ddystopia8091 Рік тому

      I don't quite understand from manual what does -l option mean, can you explain?

    • @no-ld3hz
      @no-ld3hz Рік тому

      @@ddystopia8091 iirc its load average, I think gnumake won't push all cores unless told to, but I honestly can't remember.

  • @noctarin1516
    @noctarin1516 Рік тому

    I think your burps during the graphics support section provided very insightful commentary, that I did not find in any other video.

  • @archuser7607
    @archuser7607 4 роки тому +2

    What next your next video of these series have you booted successfully or not how much boot time and performance

  • @phrtao
    @phrtao 3 роки тому +12

    How on earth do they test all these compile options. It represents such a wide range of hardware options from a smart doorbell to a super computer of the future.

    • @rockytom5889
      @rockytom5889 3 роки тому +8

      That's the beauty of large community projects, there's always that one guy with weird hardware that somehow, through many hours of testing and collaboration, manages to get that device barely anyone knows exists, working. I have a load of old computers (we talking moderately old, the original athlon 64 proc being the newest) and I cannot begin to tell you how many times these kernel customizations save my ass on low ram systems. Like, those machines have 2 gb of ram tops

    • @KookoCraft
      @KookoCraft 2 роки тому

      Fuzz testing! It is where you rapidly select and compile random options until an error is found

  • @gonzajuarez4918
    @gonzajuarez4918 3 роки тому +6

    i'm doing my first kernel compilation on gentoo right now and just wanted to say:
    i found keyboards do have ps/2 option, it's merged with the AT keyboard option

  • @alexwexov4298
    @alexwexov4298 2 роки тому +1

    Question from new gentoo user :)
    So if I follow everything, the drivers will be baked in the kernel or it takes some other steps to integrate them ?

  • @johnnypepperonii
    @johnnypepperonii 3 роки тому +2

    So today i just installed Gentoo on my old macbook but even tho i checked twice i somehow don't get my wifi interface to be shown, seems like failed when i configured the kernel. Even tho i can boot i still need to plug in ethernet.
    Could i just run the configuration again nd recompile the kernel? Or would i harm my setup in this way? Or can i just install the module and add them to the kernel?

  • @userape
    @userape 2 роки тому

    hello black luke smith good video btw

  • @CommandoBlack123
    @CommandoBlack123 2 місяці тому

    It doesnt even compile for me. Just gets some random error that no one else in the entire internet ever had. Fantastic.

  • @cloakofshadow1
    @cloakofshadow1 4 роки тому

    Noob question: I'm aware Gentoo is even more RTFM than Arch and if I don't understand how to compile a kernel, then I should really just be using something else. But since there are only so many cpus available, and there are settings in the video that arguably aren't needed for most cases, has someone ever just listed the optimal settings for different cpus? For instance, I have a 4790K as well, so I could follow your video to the letter and have a high chance of getting the same results.

  • @memertarian2434
    @memertarian2434 2 роки тому +14

    Compiling your own kernel to optimize it for your hardware are remove unnecessary features: 🤓
    Compiling your own kernel to see the penguins at bootup: 😎

    • @zizlog_sound
      @zizlog_sound Рік тому

      Is that a kernel option to display the penguins?

    • @0xN1nja
      @0xN1nja 3 місяці тому

      @@zizlog_sound yeah. its CONFIG_LOGO

  • @AncientSocrates
    @AncientSocrates 3 роки тому +6

    You didn't show anything about lspci -k, or dmesg as tools to figure out what modules or firmware you might need. And you also didn't show how to use iucode-tool to detect the specific cpu microcode blobs you need to builtin into the kernel.
    You just did needlessly aggressive trimming of default menuconfig options. And when you upgrade the kernel you do make olddefconfig which says yes to a bunch of defaults...

    • @waffl3x438
      @waffl3x438 3 роки тому +8

      Make a video then, theres literally no complete resources out there for optimizing kernel configuration, all thats out there is basically "just get the modules for your hardware"

  • @marcello4258
    @marcello4258 3 роки тому +3

    thanks! so you need to do it from scratch every time you want a newer release of the kernel... right? is there a chance to save up the 'settings' ?

    • @owena6290
      @owena6290 3 роки тому +5

      Copy the .config file from your old kernel directory to your new one, then run "make oldconfig"

    • @chrkrngl
      @chrkrngl 3 роки тому +1

      Or 'make olddefconfig'
      See 'make help | less' for the options explained.

    • @stewie3128
      @stewie3128 9 місяців тому

      Gentoo also release a pre-built "Genkernel" somewhat regularly. I think the current one is built on 6.1.14
      Most people start with that one, save its config file, and customize as they get more advanced in learning Gentoo.

  • @ReschJodSchin94
    @ReschJodSchin94 4 роки тому

    You are a god!

  • @LinuxLuddite
    @LinuxLuddite 4 роки тому +1

    Can we still choose not to build the initramfs/initrd if we have out of tree modules like the the rtlwifi driver series ? or LVM ? Can these things be build into the kernel ?

    • @rm-rf4612
      @rm-rf4612 4 роки тому +3

      You need an initramfs if you use LVM.
      Basically, if you need to perform additional steps to mount your root filesystem (like vgscan or cryptsetup open), you need an initramfs since the kernel can't do that on its own.

    • @LinuxLuddite
      @LinuxLuddite 4 роки тому +1

      @@rm-rf4612 yeah, that's what I thought.

  • @veasman2274
    @veasman2274 3 роки тому

    This might be a dumb question. During my kernel compile I saw a few CC [M] processes. Should I be worried about something not loading if I'm not using an initramfs and some parts of my compile showed CC [M]?

    • @terminalvelocity4858
      @terminalvelocity4858 3 роки тому +1

      [M] = Module
      [ * ] = Compiled into Kernel
      No, nothing to worry about as long as you use command "make modules" and "make modules_install" after the Kernel is compiled.
      If you don't want to use modules, then you can also compile directly into the Kernel. This is why you see many options in "make menuconfig" as [M] or [ * ] when you select them. Either method will work fine, it just depends on your preference.

  • @oneilljr919
    @oneilljr919 4 роки тому +21

    I am new to Gentoo and i was wondering about runit can i install it during stage 3 installation instead of OpenRc or SystemD

    • @rm-rf4612
      @rm-rf4612 4 роки тому +7

      Certainly, but it might require some DIY since runit is not officially supported.
      You'll need to get the init scripts from an overlay, or better yet write them yourself.
      I suggest you get a working system first and switch to runit after properly looking into it.
      It's also nice to have OpenRC as a fallback in case you screw up while setting up runit.

    • @coows
      @coows 3 роки тому +3

      There's a dood that made some sorta runit 3 second boot init scripts for /etc/runit/, of course you'll have to modify it to match ur system, but you can always find some init scripts online

    • @zyan983
      @zyan983 3 роки тому +1

      Yes ofcourse, any non-systemd distro will allow you to migrate init system.

  • @azyn1525
    @azyn1525 3 роки тому +9

    Make sure to type modules_install instead of module_isntall at 27:38.

  • @yooouhouuu
    @yooouhouuu 3 роки тому +4

    Hi mental! Great video, I also got some tips :)
    Well regarding Graphics Support you can disable this:
    Device Drivers --->
    Graphics support --->
    < > Intel 8xx/9xx/G3x/G4x/HD Graphics
    [ ] Enable capturing GPU state following a hang
    [ ] Compress GPU error state
    [ ] Always enable userptr support
    and get this:
    device drivers --->
    [*] IOMMU Hardware Support --->
    [*] AMD IOMMU support
    AMD IOMMU Version 2 driver
    This will automatically set MMU_NOTIFIER=y so as nvidia-drivers be able to install without issues.

  • @peacemekka
    @peacemekka 3 роки тому +2

    Is gentoo just like arch but with the ability/need to compile everything? I'm currently using arch but I ran into a disk problem so will need to install an os again. So just wondering which should I go for. Btw I can't even install arch without referring to their guide so that's as good my knowledge gets.

    • @VitalyZdanevich
      @VitalyZdanevich 2 роки тому +2

      > Is gentoo just like arch but with the ability/need to compile everything?
      You can use binary kernel, Firefox/Chrome, LibreOffice, but I prefer to compile, just let it for night.
      With march=native your compiled software will run a little bit faster.

    • @peacemekka
      @peacemekka 2 роки тому +2

      @@VitalyZdanevich cool. I did install gentoo a couple of times(changed pc's) and had a lot of fun with it. Compiled everything I could and got a helluva minimal system(100mb RAM util was unbelievable). Later on I moved on from it since I was spending too much time tweaking configs without knowing what I really wanted from my workspace, so I made a switch to mac and it feels nice too. Overall I loved my gentoo experience and will go back someday when I know exactly what I want with my workspace.

  • @asabovesotabelow
    @asabovesotabelow 3 роки тому

    ....this is very rad,,

  • @crustjunkie
    @crustjunkie 2 роки тому +1

    I'm new to Gentoo, and well Linux in general, so basically my USB headset wasn't working, so I enabled the MIDI driver in the kernel, then ran the "make && make modules_install" command, but on the Gentoo wiki it says to then use command "mount /boot", but I see that you have skipped that in the video. Is that command not necessary?
    Because when I enter it, I get an error "mount /boot can't find in /etc/fstab" and have absolutely no idea what to do moving forward

    • @khatdubell
      @khatdubell Рік тому +1

      If you're new to linux, i wouldn't start with gentoo.

    • @alexestefan7521
      @alexestefan7521 Рік тому

      Have you configured fstab correctly?

  • @darklytravelingboxofficial6622
    @darklytravelingboxofficial6622 4 роки тому +1

    What are some options to enable to minimize ram usage? I'm using a ryzen APU on void linux musl

    • @orepetrovic2289
      @orepetrovic2289 3 роки тому

      disable bunch of drivers you will most likely never use (for example, PS2 controller vibration support)

  • @slackmaster1970
    @slackmaster1970 2 роки тому +1

    Congrats you've added 1.2 seconds to your boot time!

  • @vintovkasnipera
    @vintovkasnipera 2 роки тому

    When I compile a custom kernel (eg. xanmod from the AUR) the process takes 100% CPU usage, but when I follow your video and compile my own config it only takes 20%-30% as also in your VM. Is there a specific option in play?

    • @youhackforme
      @youhackforme 2 роки тому

      Yeah you need to pass -j to allow parallel compilation

  • @regenjacob
    @regenjacob 3 роки тому +3

    i think if you want to remove PS/2 Support for keyboards you need to dissable AT keyboard

  • @HH-bq3sp
    @HH-bq3sp Рік тому +1

    How to know if my phone installed stock kernel artificially or has never modified kernel

  • @pixelcatcher123
    @pixelcatcher123 2 роки тому +1

    thank you, can i use the method for ps4 kernel?

  • @FrankieVasquez-yt6gy
    @FrankieVasquez-yt6gy 3 місяці тому

    How can I know everything that my hardware needs? Is there a place or a book out there?

  • @SFSAtlas
    @SFSAtlas 3 роки тому +3

    I'm doing exactly that right now

    • @SFSAtlas
      @SFSAtlas 3 роки тому

      But with Manjaro kernel

  • @bharathkumar-uz7zh
    @bharathkumar-uz7zh 3 роки тому

    i am getting only ttyUSB0 but unable to gedt ttyUSB1.ttyUSB2 etc in /etc/dev folder in linux when connected gsm modem
    please help me

  • @Liliana-he4mc
    @Liliana-he4mc Рік тому

    10:44 Which is the option if I use an Intel Celeron processor?

  • @tolgagamer6139
    @tolgagamer6139 4 роки тому +4

    if you dont care about power savings then only compile performance cpu govenor and disable the others

  • @aletubecordoba
    @aletubecordoba 3 роки тому +8

    27:30 >>"isntall"?

    • @Zorroness
      @Zorroness 3 роки тому +3

      He might have gotten away with it since he avoided building modules or using an initramfs, but yeah

  • @lukemeissner1741
    @lukemeissner1741 Рік тому +1

    Was that a war of the worlds sound effect or something at 2:42 ?

  • @wizard7314
    @wizard7314 2 роки тому

    Why would you set the "Maximum number of CPUs" option when you can just "Enable Maximum number of SMP Processors and NUMA Nodes"?

  • @0xssff
    @0xssff 2 роки тому +5

    i like how you spell "Nouveau" haha

  • @lucklucas998
    @lucklucas998 3 роки тому +6

    personally, I've never even installed linux before but installing Gentoo looks like an easy first distro

  • @grxgghxrpxr
    @grxgghxrpxr 2 роки тому

    Can we do the same thing for an arch installation? What are the advantages of doing this in Gentoo over other distributions?

    • @qanon4realvsqanon4gery70
      @qanon4realvsqanon4gery70 2 роки тому +2

      You should be able to make and install a custom kernel in most distros, just have to be aware if a component of the distro requires a specific feature in the kernel so you have to keep it. Gentoo is designed around building your programs from source and offers some conveniences for doing so you will have to manage without in a binary distribution, for example your custom programs being handled by the package manager.

    • @grxgghxrpxr
      @grxgghxrpxr 2 роки тому

      @@qanon4realvsqanon4gery70 brilliant, do you know how to access this on arch?

    • @qanon4realvsqanon4gery70
      @qanon4realvsqanon4gery70 2 роки тому

      @@grxgghxrpxr Unfortunately I cant give you any specifics as I have never used arch

    • @christianb9077
      @christianb9077 2 роки тому

      You can actually do this for any Linux. The advantages of doing it on Gentoo are, for one thing, that you have everything already in there to do it. On other distros you might need to install a tool chain that allows compilation of the kernel, kernel source packages and so on. All this is there when you have a basic gentoo installation running.

  • @ga2257
    @ga2257 2 роки тому

    How can I become as knowledgeable as you are ? PLZ help me.also, your vids are so great and helpful thanks a lot for making them.

    • @zizlog_sound
      @zizlog_sound Рік тому

      man pages and docs are quite helpful. The kernel also has its own docs.

    • @ga2257
      @ga2257 Рік тому

      @@zizlog_sound lol, it's been a year since this question was posted. I am a cs student now and aced my Linux course last semester. Thanks though, appreciate you man!

  • @elshafieabdelgadir4365
    @elshafieabdelgadir4365 4 роки тому

    I did follow your help but my system hang after booting with the error 0.126028 system 00:04 [mem 0xfec00000-0xfecfffff ] could not be reserved. any help

  • @dabutchaistoxic
    @dabutchaistoxic Рік тому

    Please make a video on how to configure Windows NT Kernel.

  • @AshasuChan
    @AshasuChan Рік тому

    30:37 my favorite moment

  • @gspapp
    @gspapp 3 роки тому +1

    What user enviroment did you use?

    • @Raphipod
      @Raphipod 3 роки тому +1

      I think he's using DWM (Dynamic Window Manager) for Gentoo

    • @peacemekka
      @peacemekka 3 роки тому +2

      @@Raphipod well its not just for gentoo. Its for any linux distro.

  • @archuser7607
    @archuser7607 4 роки тому +1

    Yeah we are waiting but make display bigger or font size big

  • @hamdi-kadri
    @hamdi-kadri 2 роки тому +1

    You mistyped the make target 'modules_install' command, you better correct it.

  • @killistan
    @killistan 2 роки тому +1

    So you've turned of high resolution timers. It's my current understanding that most of the spectre/meltdown attacks rely on that. Why not disable those protections in the kernel? ...unless anyone knows something I don't... those attacks are probably not how you're going to get hacked anyway...

    • @VitalyZdanevich
      @VitalyZdanevich 2 роки тому

      > Why not disable those protections in the kernel?
      How?

  • @inzig0752
    @inzig0752 3 роки тому

    Very helpful, especially for a dumbass like me who uses Arch Linux

  • @VitalyZdanevich
    @VitalyZdanevich 2 роки тому

    MTRR is not commented :(
    What is that?

  • @PylonTQx
    @PylonTQx 3 роки тому +2

    首先,这里出现指令错误,应该是:make modules_install ; 其次,如果你的系统从来没有进行过大的修改,在编译内核的时候,去掉initramfs 及 RAM disk的支持,则,你的系统将会完蛋。再则,如果贸然改为LZ4压缩格式,那么,系统也会因为没有勾选相应的解压选项,而根本无法启动。所有的朋友,都千万不要按照这里的视频去编译Gentoo内核,若有疑问,我可以提供解答。Do not try this!!! Or your Gentoo will never been boot!!!

    • @denniscleaver3559
      @denniscleaver3559 2 роки тому +1

      I can't spot more mistakes, apart from leaving the graphics drivers as built-in and not building the firmware itself in as well.
      Anyone with a more complicated install (LVM2 / RAID / crypt / LUKS) should leave the initramfs on, as far as I know.
      Also, what sources would you recommend for kernel configuration?

    • @gencis44
      @gencis44 2 роки тому +1

      I followed this tut and my gentoo will not boot .... kernel panic , i had to use genkernel to be able to boot my system.

  • @giammi56
    @giammi56 3 роки тому

    Super!! What about doing this for Ubuntu?

    • @nuc5042
      @nuc5042 3 роки тому

      You can but its a bit different

    • @rockytom5889
      @rockytom5889 3 роки тому

      Pretty much the same, you need to enable getting source packages in your package manager, get the kernel you're using, and then do the modifications you need.

  • @dubbynelson
    @dubbynelson 2 роки тому +6

    the three stages of grief
    "kexec system call"
    "keyex system call"
    "key sex system call"

  • @BradenBest
    @BradenBest Рік тому +1

    The one time I attempted to build my own kernel, it sat there compiling for, I shit you not, 6 hours, and then failed. Almost certainly my fault, but that experience spooked me away from custom kernels.

    • @shallex5744
      @shallex5744 Рік тому

      it took me 3 hours to compile my first kernel, then i changed the make command to use all of my cpu threads, and the second time it took only 30 minutes

  • @arabcian
    @arabcian 4 роки тому +4

    Youre building kernel with only one thread you have to use make -j8 commad with your cpu

    • @jumsdogpetter7610
      @jumsdogpetter7610 3 роки тому

      some people set -jn in make.conf

    • @arabcian
      @arabcian 3 роки тому

      @Learn Linux Yes

    • @arabcian
      @arabcian 3 роки тому

      @Learn Linux Yes especially if you using a generic kernel configuration it will take forever.

    • @jojipy8309
      @jojipy8309 3 роки тому +3

      @@jumsdogpetter7610 thats portage specific configuration. For general compilation it doesn't take affect

  • @SamWard_linux
    @SamWard_linux 3 роки тому +4

    POSIX (poz-icks)

  • @yourcreed104
    @yourcreed104 2 роки тому +1

    There's no directory named linux inside /usr/src
    There are debug and kernals inside it
    What do i do? Please help

    • @alexwexov4298
      @alexwexov4298 2 роки тому

      You should first install the kernel sources ...

  • @juzujuzu4555
    @juzujuzu4555 4 роки тому +6

    3:59 I would assume that with modern CPUs the compression will make the system boot faster if you have HDD and with really fast CPUs it probably is faster even with SSDs. Though NVMe etc. is another story.
    8:30 I cannot say for sure, but I think optimizing for size can help with CPUs that have very limited caches. And I would assume it lowers the memory usage, so for ancient computers with minimal RAM this could be the better option.
    I'm not an expert by any means. Decompression speeds are so huge that mathematically speaking I think the space we save takes more time to load than we add to decompression time on modern CPUs. I have compiled kernel using optimize for size, and I think my Celeron from 2005 was more responsive. But that might have been placebo, as I don't have any solid evidence for it.
    I had 2gb of RAM with that CPU so there was enough memory. Because that CPU was only 1.6ghz, it had pretty short time per thread until kernel took the control back, and with smaller caches this might have caused much more of loading from RAM with -O2 optimization compared to -Os. Or it might have been just placebo. In any case, it's something worth investigating with old hardware.

    • @rockytom5889
      @rockytom5889 3 роки тому

      Sorry to necropost, but what is your advice for optimizing a kernel for an old athlon xp palomino@1ghz, packing 512mb of ram? The thing is 32 bit only and it's literally a single cpu, like 1 core 1 thread single. I have no fucking idea where to start, that's the problem, so many people describe optimizations for new amd or generally intel, I'm in the dark on what this thing likes, and to top it off the dinasour pc uses agp for gfx (not exactly something talked about a lot now).

    • @juzujuzu4555
      @juzujuzu4555 3 роки тому

      @@rockytom5889 You should include the use flag "experimental" for the kernel-sources package, then you have the option "Use GCC autodetected configuration for AMD CPUs" where you normally would select CPU Class.
      Check out Mental Outlaw on UA-cam or Alphanerd on Odysee, he has decent kernel configuration videos that strip down a lot of useless stuff.
      Kernel configuration takes time. Watching videos that go through the process is good stating place. But then it needs work and experimentation. Slowly strip away things that you feel quite confident that you don't need, make things be modules as much as possible as at least the useless parts are not loaded.
      Mental Outlaw's video and that experimental USE flag part that I described is already quite good place. Though I might try to switch the config where you have "optimize more O2" in kernel config to "Optimize for size Os".
      Optimizing to size makes smaller kernel, and that might be better for CPUs with small caches. Most likely it's slightly slower that way, just saves some memory, though I would try it nonetheless because it really could be faster.

    • @rockytom5889
      @rockytom5889 3 роки тому

      @@juzujuzu4555
      Thank you. I'll try changing and stripping away most unused things, basically I need to have serial, parport, ps2, ide and floppy. Problem is since its old hw just finding the optimal configuration for building on that cpu is...weird. My lscpu output matches the handbook table for that generation in all but family number. So far I've managed to get it slimmed down by disabling support for unused filesystems, sata, and most networking (atheros pci ethernet card is my only link). Since it's an old system (around 2005 maybe idk), I'm reluctant about disabling legacy options, since the machine itself has caps that are fairly close to expiring. Bigger problem is the agp card and video drivers. It's proprietary nvidia drivers only work on ancient kernels, and idk if it's me, but nouveau trips when starting xorg, or if it starts, it just gives me a yellow screen and acts as if it's running all fine and dandy.

    • @juzujuzu4555
      @juzujuzu4555 3 роки тому

      @@rockytom5889 Linux in general should be great with ancient hardware. I ran Linux on one Athlon XP machine that had nvidia chipset and AGP graphics. Though Nvidia graphics is something I haven't ever owned so can't help with that.
      With Gentoo you can always ask help from Gentoo IRC channel. It's really friendly place for anyone who acts respectfully.

  • @temocaballero6856
    @temocaballero6856 Місяць тому

    Help, i cant open a "make menuconfing" i only get a text saying that it cant be build

  • @NexViewChannel
    @NexViewChannel 3 роки тому +1

    (Maximum number of GPUs) "Change to whatever you're using, unless you already have 16 GPUs whitch case you're a really cool guy, right?"

  • @JuusoAlasuutari
    @JuusoAlasuutari 3 роки тому +7

    *Laughs in maintaining my own custom patch set in a git repo*

  • @daltonwither5246
    @daltonwither5246 2 роки тому

    Could you use this kernel on debiam?

    • @daltonwither5246
      @daltonwither5246 2 роки тому

      Debian, I mean debian

    • @RealMephres
      @RealMephres 8 місяців тому

      ​@@daltonwither5246If you got similar hardware, then yes.

  • @LevisRaju
    @LevisRaju 4 місяці тому

    Please do it for kernel 6.x

  • @louishassett8587
    @louishassett8587 4 роки тому +3

    I know this is unrelated to this video's content but , why do you use gentoo ?

    • @MentalOutlaw
      @MentalOutlaw  4 роки тому +10

      Gentoo allows for more customization than any other Distro.

    • @UpcycleElectronics
      @UpcycleElectronics 4 роки тому +9

      It's like Arch but with a real package manager instead of "pacman" - the proof of concept first ever prototype package manager. The Arch curators maintain it for historic authenticity, but it's garbage for practical use. It behaves worse than most malware by design. You're expected to know all of it's quirks and issues, as the Arch devs have no interest in fixing it. The actual problems you will experience with Arch are not documented either. Well..they are, it's just in the deleted revision history removed from the main articles by the devs. Basically, Gentoo is the only DIY distro. It's where you go after discovering Arch is a dubious plot to harden rsync.
      The only other Linux distro option are the Debians. Actual Deb is about as exciting as a visit to the DMV. Also, most useful packages available in the native deb sources are so outdated the first step to using them is to uninstall and directly download something current.
      Lastly, Gentoo has the best documentation. There are real G2 tutorials to help develop a good foundation to build upon. Deb's stuff is broken link city as far as the eye can see, and what is there is usually outdated. Arch is nothing but convoluted fractal wiki link references and devs writing their magnam opus about a dependency of a dependency of a dependency you have to read 10 pages of before selecting some option designed to force an rsync of your system if you choose wrong (usually the default option is wrong). There are no tutorials in Arch either, only guides. There is a difference. Gentoo has a primary guide too, the handbook, but it's better organized and pairs very well with Sakaki's official Tutorial. If you follow the gentoo install you'll come away with a working system. If you follow the Arch guide and fail to follow every link to a link of a link in a link, botnets will pwn you within 24 hours. The default Arch security setup is a dropped bar of soap in a prison shower level of stupid.
      Gentoo just takes strategic overnight updates to get around the install times. The only other OS option is BSD.

    • @UpcycleElectronics
      @UpcycleElectronics 3 роки тому +1

      @Agnish Roy
      I don't have the internet bandwidth for the new message notifications.
      Those aren't real Arch users anyway. Real Arch users spend their free time lost in the fractal manual while waiting on the backup to load.

    • @DebuggerKnight
      @DebuggerKnight 3 роки тому +7

      @@UpcycleElectronics holy shit i cant even imagine the shitstorm if you posted this.

    • @jumsdogpetter7610
      @jumsdogpetter7610 3 роки тому +3

      @@UpcycleElectronics this described the progression of my thoughts that brought me to gentoo, almost in the same order. i didn't mind the stacking of browser tabs in the arch wiki though, i learned quite a bit of errata from that. you and i think alike about pacman though. some people might wake up to this once they realize how many aur packages they're installing even on a minimal system.

  • @Bricky2021
    @Bricky2021 3 місяці тому

    Is that Debian?

  • @PieyIsAPie
    @PieyIsAPie Рік тому

    how do you do this with Fedora?

    • @maikeru6158
      @maikeru6158 Рік тому

      Pretty much the same way. Go to /usr/src/linux, make menuconfig, after configuring type make && make modules_install, then make install, then update-grub.
      You can also look it um, I’m not sure if I got everything right

    • @PieyIsAPie
      @PieyIsAPie Рік тому

      @@maikeru6158 i already figured it out, also that is not how you do it

  • @umarfarukishaq7888
    @umarfarukishaq7888 2 роки тому

    wow