initramfs没有模块

时间:2018-12-04 06:38:31

标签: linux-kernel debian kernel-module boot initrd

我有proxmox容器。在容器 Debian 8 中托管 Debian 9 。 我制作了映像以迁移到VMWare。

现在我需要构建我的initranfs。但是,如果我运行update-initranfs -u -v -k 4.9.0-0.bpo.8-amd64,它将处理但不会复制模块。尝试在日志中复制“正在复制模块目录内核/驱动程序/ ata”,但没有错误,但没有复制任何模块。

$update-initranfs -u -v -k 4.9.0-0.bpo.8-amd64
Keeping /boot/initrd.img-4.9.0-0.bpo.8-amd64.dpkg-bak
update-initramfs: Generating /boot/initrd.img-4.9.0-0.bpo.8-amd64
Copying module directory kernel/drivers/usb/host
(excluding hwa-hc.ko sl811_cs.ko sl811-hcd.ko u132-hcd.ko whci-hcd.ko)
Copying module directory kernel/drivers/hid
(excluding hid-*ff.ko hid-a4tech.ko hid-cypress.ko hid-dr.ko hid-elecom.ko hid-gyration.ko hid-icade.ko hid-kensington.ko hid-kye.ko hid-lcpower.ko hid-magicmouse.ko hid-multitouch.ko hid-ntrig.ko hid-petalynx.ko hid-picolcd.ko hid-pl.ko hid-ps3remote.ko hid-quanta.ko hid-roccat-ko*.ko hid-roccat-pyra.ko hid-saitek.ko hid-sensor-hub.ko hid-sony.ko hid-speedlink.ko hid-tivo.ko hid-twinhan.ko hid-uclogic.ko hid-wacom.ko hid-waltop.ko hid-wiimote.ko hid-zydacron.ko)
Copying module directory kernel/drivers/gpio
Copying module directory kernel/drivers/i2c/busses
Copying module directory kernel/drivers/net
(excluding appletalk arcnet bonding can dummy.ko hamradio hippi ifb.ko irda macvlan.ko macvtap.ko pcmcia sb1000.ko team tokenring tun.ko usb veth.ko wan wimax wireless xen-netback.ko)
Copying module directory kernel/drivers/scsi
Copying module directory kernel/drivers/block
Copying module directory kernel/drivers/nvme
Copying module directory kernel/drivers/ata
Copying module directory kernel/drivers/mmc
Copying module directory kernel/drivers/usb/storage
Adding binary /usr/share/initramfs-tools/conf.d/compcache
Adding binary /sbin/modprobe
Adding library /lib/x86_64-linux-gnu/libc.so.6
Adding library /lib64/ld-linux-x86-64.so.2
Adding binary /sbin/rmmod
Calling hook busybox
Adding binary /usr/lib/initramfs-tools/bin/busybox
Calling hook casper
Adding binary /sbin/losetup
Adding library /lib/x86_64-linux-gnu/libsmartcols.so.1
Adding binary /sbin/blkid
Adding library /lib/x86_64-linux-gnu/libblkid.so.1
Adding library /lib/x86_64-linux-gnu/libuuid.so.1
Adding binary /usr/share/casper/casper-reconfigure
Adding binary /usr/share/casper/casper-preseed
Adding binary /usr/share/casper/casper-set-selections
Adding binary /lib/udev/cdrom_id
Adding library /lib/x86_64-linux-gnu/libpthread.so.0
Copying module directory kernel/drivers/net
(excluding appletalk arcnet bonding can dummy.ko hamradio hippi ifb.ko irda macvlan.ko macvtap.ko pcmcia sb1000.ko team tokenring tun.ko usb veth.ko wan wimax wireless xen-netback.ko)
Calling hook fsck
Adding binary /sbin/fsck
Adding library /lib/x86_64-linux-gnu/libmount.so.1
Adding library /lib/x86_64-linux-gnu/libselinux.so.1
Adding library /lib/x86_64-linux-gnu/libpcre.so.3
Adding library /lib/x86_64-linux-gnu/libdl.so.2
Adding binary /sbin/logsave
Adding binary /sbin/sulogin
Adding library /lib/x86_64-linux-gnu/libcrypt.so.1
Adding binary /sbin/e2fsck
Adding library /lib/x86_64-linux-gnu/libext2fs.so.2
Adding library /lib/x86_64-linux-gnu/libcom_err.so.2
Adding library /lib/x86_64-linux-gnu/libe2p.so.2
Calling hook keymap
Calling hook klibc
Calling hook kmod
Adding binary /bin/kmod
Calling hook resume
Calling hook thermal
Calling hook udev
Adding binary /lib/systemd/systemd-udevd
Adding library /lib/x86_64-linux-gnu/libkmod.so.2
Adding library /lib/x86_64-linux-gnu/libacl.so.1
Adding library /lib/x86_64-linux-gnu/libattr.so.1
Adding binary /bin/udevadm
Adding binary /lib/udev/ata_id
Adding binary /lib/udev/scsi_id
Calling hook zz-busybox
Adding binary /bin/busybox
Calling hook dmsetup
Adding binary /sbin/dmsetup
Adding library /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1
Adding library /lib/x86_64-linux-gnu/libudev.so.1
Adding library /lib/x86_64-linux-gnu/librt.so.1
/usr/share/initramfs-tools/scripts/init-bottom/ORDER ignored: not     executable
/usr/share/initramfs-tools/scripts/local-premount/ORDER ignored: not executable
/usr/share/initramfs-tools/scripts/init-top/ORDER ignored: not executable
/usr/share/initramfs-tools/scripts/casper-premount/ORDER ignored: not executable
/usr/share/initramfs-tools/scripts/casper-bottom/ORDER ignored: not executable
Building cpio /boot/initrd.img-4.9.0-0.bpo.8-amd64.new initramfs

没有我需要的模块

$lsinitramfs /boot/initrd.img-4.9.0-0.bpo.8-amd64 | grep modules
lib/modules
lib/modules/4.9.0-0.bpo.8-amd64
lib/modules/4.9.0-0.bpo.8-amd64/modules.alias.bin
lib/modules/4.9.0-0.bpo.8-amd64/modules.order
lib/modules/4.9.0-0.bpo.8-amd64/modules.devname
lib/modules/4.9.0-0.bpo.8-amd64/modules.dep
lib/modules/4.9.0-0.bpo.8-amd64/modules.symbols.bin
lib/modules/4.9.0-0.bpo.8-amd64/modules.alias
lib/modules/4.9.0-0.bpo.8-amd64/modules.symbols
lib/modules/4.9.0-0.bpo.8-amd64/modules.dep.bin
lib/modules/4.9.0-0.bpo.8-amd64/modules.builtin.bin
lib/modules/4.9.0-0.bpo.8-amd64/modules.softdep
lib/modules/4.9.0-0.bpo.8-amd64/modules.builtin
conf/modules

我的配置

#initramfs.conf 
MODULES=most
BUSYBOX=auto
COMPCACHE_SIZE=""
COMPRESS=gzip
DEVICE=
NFSROOT=auto

#update-initramfs.conf 
update_initramfs=yes
backup_initramfs=no

$ls /lib/modules/4.9.0-0.bpo.8-amd64/kernel/drivers/ata/ata_generic*
ata_generic.ko

我用MODULES=list尝试了lsmod | awk '{print $1}' > /etc/initramfs-tools/modules

为什么initramfs没有模块?

1 个答案:

答案 0 :(得分:1)

我的麻烦在于包裹破损了!!!!

apt-get install --reinstall kmod
mkinitramfs -o /boot/initrd.img-4.9.0-0.bpo.8-amd64 4.9.0-0.bpo.8-amd64