View previous topic :: View next topic |
Author |
Message |
braz2kuk Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 26 Apr 2007 Posts: 89
|
Posted: Thu Mar 14, 2019 4:52 pm Post subject: First time kernel config - any advice? |
|
|
Hi all,
I have a fully functional working i3 system with Nvidia using OpenRC so far so good I’m
Happy.
The only thing I haven’t done manually is configure my kernel I used genkernel, I’m now thinking I’d like to build my own after what I feel is a slow boot time and lots of modules being loaded.
However looking though a config there seems to be hundreds of options, and I’m not sure what I need and don’t need, I’ve run lspci and had a look but can’t fathom what I should be focusing on or pulling out, I don’t have any unusual hardware more recent hardware.
Is there anything I can read / look at to help better understand or any pointers? I essentially don’t want to break my system after I’ve spent so long getting it right, I’m really liking it so far it’s been a challenge but I’m happy.
Thanks |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Jaglover Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/179708169458f2999e44e26.gif)
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Thu Mar 14, 2019 8:51 pm Post subject: |
|
|
Kernel is the OS. You can't expect custom configuration to be simple, there is no magic wand you can wave which will read your mind and set up your kernel. You either learn it (lots of learning) or you leave it. Handling hardware is only one part of kernel tasks, there is much more functionality you may want and even more functions and features you may not want. If you feel ready start with 'make allnoconfig', then start enabling features you need. This is not one hour task. May take days, every brain needs rest. In case you pull through the results are rewarding, knowledge wise. If you give up then boot your genkernel and admit the grapes are sour. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Blind_Sniper Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 20 Apr 2018 Posts: 370
|
Posted: Fri Mar 15, 2019 8:00 am Post subject: |
|
|
Start with
it gives you default config which suitable in most cases.
Build kernel with that config and try to boot. If you cannot boot - add missed options (usually sata drivers) to config and try again.
Once you booted - continue with tinkering your config by removing modules which your hardware doesn't use.
It's an easiest way to build minimal kernel
Another one option is
Code: | make localmodconfig |
it creates config depending on currently loaded modules.
Connect hardware you're planning to use e.g. USB sticks (USB2 and USB3) and run command. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Verdazil n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/5440753575c653e6bb8983.png)
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Fri Mar 15, 2019 8:29 am Post subject: |
|
|
I suggest a different approach (I always use it myself), unlike previous users. Follow the step-by-step instructions from this guide and you will get a kernel with basic settings that will allow you to boot: https://wiki.gentoo.org/wiki/Kernel/Gentoo_Kernel_Configuration_Guide
Then you can add hardware&&software-specific options into your kernel. _________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Makersmarx n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/2642718585c6b1d37c493f.jpg)
Joined: 16 Feb 2019 Posts: 57 Location: Costa Rica
|
Posted: Fri Mar 15, 2019 12:32 pm Post subject: |
|
|
I am also a new user and what I have been doing to ensure I have a working system is running genkernel --menuconfig all this allows me to remove the obvious stuff ex. Intel graphic support etc, without screwing up so bad I cant boot immediately. I have only been using gentoo for about 2 months, but figure running this a bit more and keeping notes I will progress and do this from scratch. _________________ Pura Vida |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
braz2kuk Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 26 Apr 2007 Posts: 89
|
Posted: Fri Mar 15, 2019 2:36 pm Post subject: |
|
|
Guys,
Thanks for all the help, I’ve now configured and booted my own kernel and all is good.
One thing though on first boot I got a kernel panic, due to not having built an initramfs, I then had to emerge genkernel and use this to generate one.
Is it possible to build your own initramfs?
Thanks in advance |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Verdazil n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/5440753575c653e6bb8983.png)
Joined: 14 Feb 2019 Posts: 47 Location: One small country ...
|
Posted: Fri Mar 15, 2019 2:50 pm Post subject: |
|
|
braz2kuk wrote: | Is it possible to build your own initramfs? | This is usually not necessary. Initramfs is built into the kernel by default. _________________ GA-Z170X-UD3 / i7-6700K / DDR4 32GB / Radeon RX 570 / TL-WDN4800 / Samsung SSD 850 EVO 250 Gb + WD Green WDC 2 Tb / BenQ BL2711U + LG TV 42LF650V |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kite14 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/2058712428536bf60be3d18.jpg)
Joined: 07 Nov 2006 Posts: 216 Location: Italy
|
Posted: Fri Mar 15, 2019 2:56 pm Post subject: |
|
|
braz2kuk wrote: | Guys,
Thanks for all the help, I’ve now configured and booted my own kernel and all is good.
One thing though on first boot I got a kernel panic, due to not having built an initramfs, I then had to emerge genkernel and use this to generate one.
Is it possible to build your own initramfs?
Thanks in advance |
I don't use it myself, but I can point you to the wiki's guide about making your own custom initramfs → https://wiki.gentoo.org/wiki/Custom_Initramfs
This guide describes how to build an initramfs whitout using any tools like genkernel or Dracut |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Blind_Sniper Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 20 Apr 2018 Posts: 370
|
Posted: Fri Mar 15, 2019 3:00 pm Post subject: |
|
|
braz2kuk wrote: |
Is it possible to build your own initramfs?
|
You can build kernel which doesn't require initramfs. Just select appropriate option when configuring kernel. BTW why did you decide that the kernel panic was caused by lack of initramfs? Usually it occurs due to lack of sata driver or misconfigured fstab (wrong root partition) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kite14 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/2058712428536bf60be3d18.jpg)
Joined: 07 Nov 2006 Posts: 216 Location: Italy
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
braz2kuk Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 26 Apr 2007 Posts: 89
|
Posted: Fri Mar 15, 2019 4:53 pm Post subject: |
|
|
Verdazil wrote: | braz2kuk wrote: | Is it possible to build your own initramfs? | This is usually not necessary. Initramfs is built into the kernel by default. |
I did wonder this I’m using UEFI and my root partition is ext4, all this and support for my boot partition VFAT was built into the kernel so I was surprised when it didn’t boot, it mentioned something about not being able to mount root.
Hence why I thought potentially I needed an initramfs
Any ideas what I could have been missing? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54821 Location: 56N 3W
|
Posted: Fri Mar 15, 2019 6:32 pm Post subject: |
|
|
braz2kuk,
The kernel never mounts the boot partition during the boot process. If it could do that, you wouldn't need a boot loader.
The boot loader makes its own arrangements to load the kernel and optionally, the initrd, then jumps to the kernel start address.
Its just the kernel and initrd in RAM now.
The kernel decompresses itself, initalises the built in code and if there is an initrd, mounts that as root.
With no initrd, it mounts the real root filesystem directly.
Your error message Quote: | ... mentioned something about not being able to mount root. | will have said Kernel Panic! Unable to mount the rootfs unknown-block(x,y).
We need the last part of the message, x and y are the kernel major and minor device numbers.
Indirectly, they point to what went wrong. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|