Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Genkernel with custom kernel config
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Mon Mar 05, 2018 4:03 am    Post subject: [Solved] Genkernel with custom kernel config Reply with quote

Hi, I was reading https://wiki.gentoo.org/wiki/Full_Disk_Encryption_From_Scratch_Simplified and noticed that it used genkernel with the `all' action which from my reading generates a kernel with default values similar to the minimal live cd.

I would rather enable drivers myself in my kernel config, get genkernel to build the initramfs and other options, then drop it all into place for me.

I read the genkernel wiki and found `--config=/path/to/genkernel.conf' with the description of `points to the genkernel configuration file to use'. Does this mean I can issue a `make menuconfig', save my configuration, then point genkernel --config to /path/to/.config?

I also see a `--menuconfig' flag, does this drop you into the standard menuconfig screen and then use these settings to generate the kernel with? Do I have to load into this menuconfig option each time to change my kernel settings?



I am basically after a way to run `make menuconfig' as I normally would, then pass the `.config' file to genkernel to have it build the kernel along with --luks --lvm and initramfs to complete the full disk encryption setup.


Last edited by abduct on Mon Mar 05, 2018 4:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1048
Location: Massachusetts USA

PostPosted: Mon Mar 05, 2018 5:27 am    Post subject: Reply with quote

You can also use --kernel-config=/proc/config.gz to use the configuration for the current kernel and --menuconfig to allow you to modify the configuration.
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Mon Mar 05, 2018 11:32 am    Post subject: Reply with quote

jburns wrote:
You can also use --kernel-config=/proc/config.gz to use the configuration for the current kernel and --menuconfig to allow you to modify the configuration.


So the equivelent to their `genkernel --luks --lvm all` would equate to `genkernel --luks --lvm --kernel-config=/path/to/kernel/.config initramfs' ?

Or would I still use the `all' action rather than `initramfs'?

I am just trying to figure out which flags and action I need to run if I want to include luks, lvm, my custom kernel config, and then get genkernel to drop it all into place for me.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10261
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Mar 05, 2018 12:38 pm    Post subject: Reply with quote

Regardless of any other options, you need to specify a target, which is mostly one of:
  • kernel: Build the kernel and modules.
  • initramfs: Build the initramfs,
  • all: Build both of the above.
There are other targets; see the man page.

Also note that you can just set OLDCONFIG=yes in /etc/genkernel.conf and then place your custom .config file in /usr/src/linux. If you do those two things then there's no need for the --kernel-config option.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Mon Mar 05, 2018 4:39 pm    Post subject: Reply with quote

John R. Graham wrote:
Regardless of any other options, you need to specify a target, which is mostly one of:
  • kernel: Build the kernel and modules.
  • initramfs: Build the initramfs,
  • all: Build both of the above.
There are other targets; see the man page.

Also note that you can just set OLDCONFIG=yes in /etc/genkernel.conf and then place your custom .config file in /usr/src/linux. If you do those two things then there's no need for the --kernel-config option.

- John


Perfect that is exactly what I wanted to hear.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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