如何在 OpenSuSE linux 上创建 initrd 映像?

如何在 OpenSuSE linux 上创建 initrd 映像?
/usr/src/linux-3.2.1 # make install
scripts/kconfig/conf --silentoldconfig Kconfig
sh /usr/src/linux-3.2.1/arch/x86/boot/install.sh 3.2.1-12-desktop arch/x86/boot/bzImage \
                System.map "/boot"
You may need to create an initial ramdisk now.

--

/boot # mkinitrd initrd-3.2.1-12-desktop.img 3.2.1-12-desktop

Kernel image:   /boot/vmlinuz-2.6.34-12-desktop
Initrd image:   /boot/initrd-2.6.34-12-desktop
Kernel Modules: <not available>
Could not find map initrd-3.2.1-12-desktop.img/boot/System.map, please specify a correct file with -M.
There was an error generating the initrd (9)

查看 mkinitrd 命令期间的错误。我错过了什么?
这是什么意思?Kernel Modules: <not available>

OpenSuse 11.3 64 位

编辑1:

我做了“制作模块”。
我将System.map文件从/usr/src/linux-3.2.1目录复制到/boot,现在运行initrd命令出现以下错误:

linux-dopx:/boot # mkinitrd initrd-3.2.1.img 3.2.1-desktop

Kernel image:   /boot/vmlinuz-2.6.34-12-desktop
Initrd image:   /boot/initrd-2.6.34-12-desktop
Kernel Modules: <not available>
Could not find map initrd-3.2.1.img/boot/System.map, please specify a correct file with -M.

Kernel image:   /boot/vmlinuz-3.2.1-12-desktop
Initrd image:   /boot/initrd-3.2.1-12-desktop
Kernel Modules: <not available>
Could not find map initrd-3.2.1.img/boot/System.map, please specify a correct file with -M.

Kernel image:   /boot/vmlinuz-3.2.1-12-desktop.old
Initrd image:   /boot/initrd-3.2.1-12-desktop.old
Kernel Modules: <not available>
Could not find map initrd-3.2.1.img/boot/System.map, please specify a correct file with -M.
There was an error generating the initrd (9)

답변1

你应该使用mkinitramfs,而不是mkinitrd。实际的 initrd 格式已过时,现在改用 initramfs,尽管它仍称为 initrd。更好的是,只需使用update-initramfs.您还需要运行make modules_install来安装模块。

답변2

通过 OpenSUSE,您可以使用

yast2 sysconfig

在“INITRD_MODULES”中填写您需要的模块并应用。

관련 정보