Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Rebuilding my Kernel 5.0.4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
braz2kuk
n00b
n00b


Joined: 26 Apr 2007
Posts: 60

PostPosted: Wed Apr 03, 2019 1:22 pm    Post subject: Rebuilding my Kernel 5.0.4 Reply with quote

Hi,

I currently have Gentoo Sources 5.0.4 installed, configured and running fine, I want to add a couple of things to my kernel compilation and just want to check my steps before i break something:

- cd to /usr/src/linux
- run make oldconfig
- set options
- make -j13
- make modues_install
- make install

- run grub config to update boot loader to newly compiled Kernel

anything i'm missing this will be the first time i've done a manual kernel compilation inside a working system.

Thanks in advance
Back to top
View user's profile Send private message
Kosmas
Apprentice
Apprentice


Joined: 14 Sep 2006
Posts: 276
Location: Greece

PostPosted: Wed Apr 03, 2019 9:23 pm    Post subject: Reply with quote

Hi braz2kuk,

Quite right, if you need initram then you need one more step.
For me it is:
1. cd /usr/src/linux-x.x.x
2. make oldconfig
3. do all the changes you need in the configuration
4. make -j13 (whatever processors you have +1)
5. make modules install
6. make install
7. genkernel --install initramfs
8. grub-mkconfig -o /boot/grub/grub.conf
9. (Not needed, but I occasionally run) grub-install /dev/sdx (sda probably)

You should be fine after these.
P.S. You can also create initramfs by dracut or maybe by hand, but genkernel rocks! Also if you have a monolithic kernel (without modules), you may not need initram at all.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14188

PostPosted: Thu Apr 04, 2019 12:51 am    Post subject: Re: Rebuilding my Kernel 5.0.4 Reply with quote

braz2kuk wrote:
I currently have Gentoo Sources 5.0.4 installed, configured and running fine, I want to add a couple of things to my kernel compilation and just want to check my steps before i break something:

- cd to /usr/src/linux
- run make oldconfig
This step is not necessary when you are modifying an existing kernel.
braz2kuk wrote:
- make -j13
You did not mention setting $KBUILD_OUTPUT. If you do not set it, running make in the kernel source directory will only work if you are root or have modified the ownership of the directories. Did you intend to use root to compile the kernel?
Back to top
View user's profile Send private message
Kosmas
Apprentice
Apprentice


Joined: 14 Sep 2006
Posts: 276
Location: Greece

PostPosted: Thu Apr 04, 2019 9:04 am    Post subject: Reply with quote

Hi Hu,

You are right, I assumed that all the actions will be performed as root.
Also an eselect kernel list and eselect kernel set should be appropriate, when changing kernels.

I stand corrected! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum