Make new disk module for mkinitfs
cat /etc/mkinitfs/features.d/disk.modules
kernel/drivers/ata/ahci.ko.gz
kernel/drivers/ata/libahci.ko.gz
kernel/drivers/ata/libata.ko.gz
kernel/drivers/nvme/host/nvme.ko.gz
kernel/drivers/nvme/host/nvme-core.ko.gz
kernel/drivers/scsi/scsi_mod.ko.gz
kernel/drivers/scsi/sd_mod.ko.gz
edit mkinitfs config
cat /etc/mkinitfs/mkinitfs.conf
features="disk base ext4 "
cd /boot
doas mv initramfs-lts initramfs-lts-o
generate new initramfs
doas mkinitfs
doas apk add gummiboot or gummiboot-efistub
-------------------------------------------------------------------------
how to find which kernel modules to put in initramfs
cat /etc/mkinitfs/mkinitfs.conf
ata base ext4 nvme
to trim ata and nvme
cat /etc/mkinitfs/features.d/ata.modules
kernel/drivers/ata/*.ko*
cat /etc/mkinitfs/features.d/nvme.modules
kernel/drivers/nvme
kernel/drivers/pci/controller/vmd.ko*
path kernel is inside /lib/modules/$(uname -r)/kernel/
Module Size Used by
ipv6 638976 168
af_packet 53248 6
ctr 16384 2
ccm 20480 6
algif_aead 16384 0
des_generic 16384 0
libdes 24576 1 des_generic
algif_skcipher 16384 0
cmac 16384 0
md4 16384 0
algif_hash 16384 0
af_alg 32768 3 algif_hash,algif_skcipher,algif_aead
uvcvideo 126976 0
videobuf2_vmalloc 16384 1 uvcvideo
videobuf2_memops 16384 1 videobuf2_vmalloc
videobuf2_v4l2 36864 1 uvcvideo
videobuf2_common 69632 4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
videodev 274432 3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc 57344 4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_hda_codec_hdmi 69632 1
snd_ctl_led 24576 0
snd_hda_codec_realtek 159744 1
snd_hda_codec_generic 90112 1 snd_hda_codec_realtek
psmouse 155648 0
serio_raw 16384 0
pcspkr 16384 0
efi_pstore 16384 0
processor_thermal_device_pci_legacy 16384 0
processor_thermal_device 16384 1 processor_thermal_device_pci_legacy
processor_thermal_rfim 16384 1 processor_thermal_device
processor_thermal_mbox 16384 2 processor_thermal_rfim,processor_thermal_device
processor_thermal_rapl 16384 1 processor_thermal_device
intel_soc_dts_iosf 16384 1 processor_thermal_device_pci_legacy
xhci_pci 24576 0
xhci_pci_renesas 16384 1 xhci_pci
xhci_hcd 278528 1 xhci_pci
mei_hdcp 20480 0
usbcore 299008 3 xhci_hcd,uvcvideo,xhci_pci
i915 3067904 17
usb_common 16384 3 xhci_hcd,usbcore,uvcvideo
mei_me 40960 1
mei 118784 3 mei_hdcp,mei_me
snd_sof_pci_intel_icl 16384 0
snd_sof_intel_hda_common 86016 1 snd_sof_pci_intel_icl
soundwire_intel 40960 1 snd_sof_intel_hda_common
soundwire_generic_allocation 16384 1 soundwire_intel
soundwire_cadence 32768 1 soundwire_intel
snd_sof_intel_hda 16384 1 snd_sof_intel_hda_common
snd_sof_pci 16384 2 snd_sof_pci_intel_icl,snd_sof_intel_hda_common
snd_sof_xtensa_dsp 16384 1 snd_sof_intel_hda_common
snd_sof 122880 2 snd_sof_pci,snd_sof_intel_hda_common
snd_soc_hdac_hda 20480 1 snd_sof_intel_hda_common
joydev 24576 0
i2c_algo_bit 16384 1 i915
snd_hda_ext_core 32768 3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match 57344 2 snd_sof_pci_intel_icl,snd_sof_intel_hda_common
ttm 81920 1 i915
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
intel_gtt 24576 1 i915
snd_soc_core 315392 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_compress 20480 1 snd_soc_core
snd_hda_intel 53248 0
snd_intel_dspcfg 24576 2 snd_hda_intel,snd_sof_intel_hda_common
mousedev 24576 0
snd_intel_sdw_acpi 16384 2 snd_sof_intel_hda_common,snd_intel_dspcfg
snd_hda_codec 167936 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
snd_hda_core 114688 9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep 20480 1 snd_hda_codec
snd_pcm 139264 9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_hda_core
hid_multitouch 28672 0
snd_timer 45056 1 snd_pcm
hid_generic 16384 0
snd 114688 11 snd_ctl_led,snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm
soundcore 16384 2 snd_ctl_led,snd
i2c_designware_platform 16384 0
i2c_designware_core 28672 1 i2c_designware_platform
intel_lpss_pci 28672 0
ee1004 16384 0
intel_lpss 16384 1 intel_lpss_pci
idma64 20480 0
virt_dma 16384 1 idma64
iTCO_wdt 16384 0
intel_pmc_bxt 16384 1 iTCO_wdt
iTCO_vendor_support 16384 1 iTCO_wdt
mfd_core 16384 2 intel_pmc_bxt,intel_lpss
i2c_i801 32768 0
i2c_smbus 16384 1 i2c_i801
ath10k_pci 49152 0
ath10k_core 438272 1 ath10k_pci
mac80211 1028096 1 ath10k_core
libarc4 16384 1 mac80211
ath 36864 1 ath10k_core
cfg80211 1048576 3 ath,mac80211,ath10k_core
input_leds 16384 0
dell_smm_hwmon 16384 0
intel_rapl_msr 16384 0
dell_laptop 32768 0
rfkill 28672 3 dell_laptop,cfg80211
coretemp 16384 0
intel_rapl_common 24576 2 intel_rapl_msr,processor_thermal_rapl
intel_tcc_cooling 16384 0
x86_pkg_temp_thermal 16384 0
intel_powerclamp 16384 0
crct10dif_pclmul 16384 1
ghash_clmulni_intel 16384 0
dell_wmi 20480 1 dell_laptop
ledtrig_audio 16384 5 snd_ctl_led,snd_hda_codec_generic,dell_wmi,snd_sof,dell_laptop
aesni_intel 380928 4
crypto_simd 16384 1 aesni_intel
dell_smbios 20480 2 dell_wmi,dell_laptop
dcdbas 16384 1 dell_smbios
cryptd 24576 2 crypto_simd,ghash_clmulni_intel
rapl 16384 0
intel_cstate 20480 0
dell_wmi_sysman 40960 0
wmi_bmof 16384 0
firmware_attributes_class 16384 1 dell_wmi_sysman
dell_wmi_descriptor 16384 2 dell_wmi,dell_smbios
intel_wmi_thunderbolt 16384 0
wmi 32768 6 dell_wmi_sysman,intel_wmi_thunderbolt,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor
battery 24576 0
video 57344 3 dell_wmi,dell_laptop,i915
button 20480 0
tpm_crb 16384 0
tpm_tis 16384 0
tpm_tis_core 24576 1 tpm_tis
tpm 90112 3 tpm_tis,tpm_crb,tpm_tis_core
rng_core 16384 1 tpm
pinctrl_icelake 24576 0
int3403_thermal 16384 0
int340x_thermal_zone 16384 2 int3403_thermal,processor_thermal_device
evdev 28672 10
int3400_thermal 16384 0
acpi_thermal_rel 16384 1 int3400_thermal
intel_hid 24576 0
sparse_keymap 16384 2 intel_hid,dell_wmi
i2c_hid_acpi 16384 0
i2c_hid 28672 1 i2c_hid_acpi
hid 143360 3 i2c_hid,hid_multitouch,hid_generic
acpi_pad 24576 0
ac 16384 0
efivarfs 16384 1
crc32_pclmul 16384 0
nvme 49152 1
nvme_core 139264 2 nvme
hwmon 32768 4 coretemp,nvme_core,dell_smm_hwmon,ath10k_core
ahci 45056 0
libahci 45056 1 ahci
libata 303104 2 libahci,ahci
simpledrm 16384 0
drm_kms_helper 319488 2 i915,simpledrm
cfbfillrect 16384 1 drm_kms_helper
syscopyarea 16384 1 drm_kms_helper
cfbimgblt 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
cfbcopyarea 16384 1 drm_kms_helper
cec 49152 2 drm_kms_helper,i915
drm 643072 11 drm_kms_helper,i915,simpledrm,ttm
i2c_core 106496 14 i2c_designware_platform,videodev,i2c_hid,i2c_designware_core,drm_kms_helper,intel_hid,i2c_algo_bit,ee1004,i2c_smbus,i2c_i801,i2c_hid_acpi,i915,psmouse,drm
drm_panel_orientation_quirks 24576 1 drm
agpgart 49152 3 intel_gtt,ttm,drm
loop 40960 0
ext4 954368 1
crc32c_generic 16384 0
crc32c_intel 24576 2
crc16 16384 1 ext4
mbcache 16384 1 ext4
jbd2 167936 1 ext4
sd_mod 53248 0
t10_pi 16384 2 sd_mod,nvme_core
scsi_mod 221184 2 sd_mod,libata
lsmod | grep nvme
nvme 49152 1
nvme_core 139264 2 nvme
hwmon 32768 4 coretemp,nvme_core,dell_smm_hwmon,ath10k_core
t10_pi 16384 2 sd_mod,nvme_core
cat /etc/mkinitfs/features.d/nvme.modules
kernel/drivers/nvme
kernel/drivers/pci/controller/vmd.ko*
modulename: vmd.ko
lsmod | grep vmd
is empty so not added
for nvme we need nvme_core, modules
modinfo nvme_core -F 'depends'
hwmon,t10-pi
modinfo nvme -F 'depends'
nvme-core
modinfo nvme-core nvme -F 'filename'
/lib/modules/5.15.90-0-lts/kernel/drivers/nvme/host/nvme-core.ko.gz
/lib/modules/5.15.90-0-lts/kernel/drivers/nvme/host/nvme.ko.gz
lsmod | grep ata
libata 303104 2 libahci,ahci
scsi_mod 221184 2 sd_mod,libata
modinfo libata
depends: scsi_mod
modinfo ahci
depends: libahci,libata
modinfo libata libahci ahci scsi_mod sd_mod -F 'filename'
/lib/modules/5.15.90-0-lts/kernel/drivers/ata/libata.ko.gz
/lib/modules/5.15.90-0-lts/kernel/drivers/ata/libahci.ko.gz
/lib/modules/5.15.90-0-lts/kernel/drivers/ata/ahci.ko.gz
/lib/modules/5.15.90-0-lts/kernel/drivers/scsi/scsi_mod.ko.gz
/lib/modules/5.15.90-0-lts/kernel/drivers/scsi/sd_mod.ko.gz
src::
https://www.kernelconfig.io/config_vmd
https://man7.org/linux/man-pages/man8/lsmod.8.html
https://man7.org/linux/man-pages/man8/modinfo.8.html
Comments
Post a Comment