Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Initramfs 15 times larger than other system
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
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Sat Nov 17, 2018 4:14 pm    Post subject: Initramfs 15 times larger than other system Reply with quote

Hi, I run two systems, one a laptop, another a workstation, and I realized that my /boot partition was 100% full today when inserting another kernel on my workstation. When inspecting I realized that the initramfs was close to 75Mb large while my laptops initramfs was only 5Mb large.

The build processes are nearly identical besides a few command line flags.

Process:
1) make menuconfig #if I need to change anything
1) make oldconfig #if moving to a newer kernel source
2) mount my /boot partition
3) build-kernel #custom function to build my kernels

My build-kernel functions are as follows:

On my laptop (with the smaller initramfs sizes):
Code:
build-kernel is a function
build-kernel ()
{
    genkernel --initramfs-overlay=/var/lib/genkernel/overlay --luks --lvm all;
    grub-mkconfig -o /boot/grub/grub.cfg
}


On my workstation:

Code:
build-kernel is a function
build-kernel ()
{
    genkernel all;
    grub-mkconfig -o /boot/grub/grub.cfg
}


My genkernel.conf is setup so that it only builds my custom config, and not the normal genkernel config.

The genkernel.conf on my laptop (with smaller initramfs size):
Code:
OLDCONFIG="yes"
MENUCONFIG="no"
GCONFIG="no"
NCONFIG="no"
XCONFIG="no"
CLEAN="yes"
MRPROPER="no"
MOUNTBOOT="yes"
SAVE_CONFIG="yes"
USECOLOR="yes"
LVM="yes"
LUKS="yes"
BUSYBOX="yes"
FIRMWARE="yes"
FIRMWARE_FILES="/lib/firmware/iwlwifi-2030-6.ucode,/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw,/lib/firmware/htc_9271.fw"
DISKLABEL="yes"
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
CACHE_DIR="/var/cache/genkernel"
DISTDIR="${GK_SHARE}/distfiles"
LOGFILE="/var/log/genkernel.log"
LOGLEVEL=1
DEFAULT_KERNEL_SOURCE="/usr/src/linux"


The genkernel.conf of the workstation (larger genkernel size):
Code:
OLDCONFIG="yes"
MENUCONFIG="no"
GCONFIG="no"
NCONFIG="no"
XCONFIG="no"
CLEAN="yes"
MRPROPER="no"
MOUNTBOOT="yes"
SAVE_CONFIG="yes"
USECOLOR="yes"
BUSYBOX="yes"
FIRMWARE="yes"
FIRMWARE_DIR="/lib/firmware"
DISKLABEL="yes"
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
CACHE_DIR="/var/cache/genkernel"
DISTDIR="${GK_SHARE}/distfiles"
LOGFILE="/var/log/genkernel.log"
LOGLEVEL=1
DEFAULT_KERNEL_SOURCE="/usr/src/linux"


As you can see they are nearly identical besides the fact the workstation does not use llvm or luks in the initramfs. The only difference I can see is that I provide an overlay on my laptop to fix suspend/hibernation support, so perhaps genkernel on my workstation is including a bunch of bloat? Or the fact that on the workstations genkernel config, I left it to include /lib/firmware, where as on my laptop I only include specific firmwares. Would that cause such bloat?

Anyone have any thoughts?

Thanks
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3687
Location: Hamburg

PostPosted: Sat Nov 17, 2018 8:46 pm    Post subject: Reply with quote

Compiling a kernel with certain DEBUG configure options turned on makes it sometimes very fat.
Back to top
View user's profile Send private message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Sat Nov 17, 2018 10:12 pm    Post subject: Reply with quote

Is there a way to see if DEBUG is enabled? I haven't specifically set it on either of my systems. Everything posted is my entire build routine, so besides the things I pointed out, I'm not sure where the bloat is coming from.
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