首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Dracut将不会创建包含当前系统未使用的模块的映像。

Dracut将不会创建包含当前系统未使用的模块的映像。
EN

Unix & Linux用户
提问于 2020-09-02 12:53:44
回答 1查看 4.7K关注 0票数 1

好的,dracut没有像我所认为的那样表演,我也找不到解决办法。我以前已经创建了几个映像,但现在我正在尝试创建一个实时引导initramfs,以便与自定义的live一起运行。每次我尝试下面的cmdlind参数时,它都会失败,我也尝试将额外的模块放入dracut.conf中,但每次都会发出警告(我在另一个帖子中看到它们只是您可以忽略的警告),但是在消息返回到终端提示之后,我没有选择忽略或继续使用dracut构建等等。

代码语言:javascript
复制
#dracut.conf short and sweet
add_dracutmodules+="nfs dmsquash-live livenet "
omit_dracutmodules+="biosdevname"

#dracut terminal argument
dracut -v testinitramfs.img 

#output
dracut: Executing: /usr/bin/dracut -v testinitramfs.img
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'livenet' depends on 'dmsquash-live', which can't be installed
dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'dmsquash-live' cannot be found or installed.

我已经安装了软件包,我已经安装了dracut.x86 -tools -network -caps -live -squash,我的可用模块列表显示了busybox和dmsquash,但仍然失败,并表示无法找到它们。对于dracut build命令,我还缺少另一个依赖项吗?在这种情况下,我需要更多的依赖项,以使这些模块可以被dracut查看?

代码语言:javascript
复制
dracut --list-modules
/etc/dracut.conf: line 8: biosdevname : command not found
bash                            crypt                         terminfo   
systemd                         dm                            udev-rules
warpclock                       dmraid                        virtfs
fips                            **dmsquash-live**                 **biosdevname**
systemd-initrd                  **dmsquash-live-ntfs**            dracut-systemd
caps                            kernel-modules                ecryptfs
systemd-networkd                kernel-modules-extra          ...
modsign                         **livenet**                       ...
rescue                          mdraid                        squash
watchdog                        multipath
**busybox**                         qemu
nss-softokn                     qemu-net
rdma                            stratis
rngd                            crypt-gpg
i18n                            crypt-loop
convertfs                       cifs
network-legacy                  debug
network-manager                 fcoe
network                         fcoe-uefi
ifcfg                           fstab-sys
url-lib                         iscsi
drm                             lunmask
plymouth                        nbd
prefixdevname                   **nfs**
prefixdevname-tools             resume
lvmmerge                        rootfs-block
btrfs                           ssh-client
EN

回答 1

Unix & Linux用户

发布于 2021-03-12 14:06:15

我相信您缺少了手册页中的--no-hostonly参数:

代码语言:javascript
复制
  -H, --hostonly        Host-Only mode: Install only what is needed for
                        booting the local host instead of a generic host.
  -N, --no-hostonly     Disables Host-Only mode

另一个常见的问题是缺少模块所依赖的包,例如,在添加device-mapper-multipath模块之前需要使用multipath

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/607519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档