Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Forcing re-compile of initramfs?
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
PeeJay
n00b
n00b


Joined: 15 Aug 2004
Posts: 46
Location: Sydney, Australia

PostPosted: Sun Oct 16, 2016 11:11 am    Post subject: Forcing re-compile of initramfs? Reply with quote

How do I force a recompile of everything that goes into the initramfs (using genkernel-next)? Have have changed my system from an intel to amd cpu.
I recompiled @world and the kernel in advance, but forgot about the initramfs, so I'm getting a kernel panic. I managed to work around the issue by using another machine with less aggressive compiler flags to build the same kernel, but I'd like to fix it.
I've looked everywhere but I can't find where the files are cached.
Would it be considered a bug with genkernel that there is no command option to totally recreate the initramfs?

Thanks.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Sun Oct 16, 2016 2:23 pm    Post subject: Reply with quote

think this should do it:
genkernel --mrproper all
reference: https://wiki.gentoo.org/wiki/Genkernel#Options
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1477
Location: KUUSANKOSKI, Finland

PostPosted: Sun Oct 16, 2016 2:34 pm    Post subject: Reply with quote

There are man pages and --help too.
genkernel --help | head:
Gentoo Linux Genkernel 64

Usage:
  genkernel [options] action

Available Actions:
  all               Build all steps
  bzImage           Build only the kernel
  initramfs         Build only the ramdisk/initramfs
  kernel            Build only the kernel and modules

_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Sun Oct 16, 2016 4:47 pm    Post subject: Reply with quote

Well it depends on whether you mean to rebuild the initramfs or recompile everything in it. Rebuilding it is a simple genkernel built-in command:
Code:
genkernel initramfs
but this doesn't rebuild the executables in the initramfs. Genkernel builds those but caches the binaries in /var/cache/genkernel. Erasing the contents of that directory (no need to erase its subdirectories) will force Genkernel to recompile them:
Code:
rm /var/cache/genekernel/*
genkernel initramfs
@DONAHUE, --mrproper will not erase this cache and also causes the recompile of the whole kernel, something the OP didn't ask for.

- 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
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Sun Oct 16, 2016 11:37 pm    Post subject: Reply with quote

Thanks.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
PeeJay
n00b
n00b


Joined: 15 Aug 2004
Posts: 46
Location: Sydney, Australia

PostPosted: Mon Oct 17, 2016 1:18 am    Post subject: Reply with quote

John R. Graham wrote:
Code:
rm /var/cache/genekernel/*


That was what I needed. Thanks!
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