|
发表于 2007-7-28 03:03:32
|
显示全部楼层
Post by windwiny
cd /boot
mkinitrd -c -m xfs -f xfs -k 2.6.21.5 -r /dev/sda11
我想问一下slack 安装时不会自己创建内核对应的initrd 文件吗? 如果是手工创建的话要怎样创建? Slackware 共提供了两种类型的kernel,一个是huge, 另一个是generic, 每种kernel又有两个版本,SMP和non-SMP。在kernels/目录下的huge kernel是用来安装用的,包含了所有的文件系统,因此使用huge kernel则不需要initrd. 另一个gerneric kernel在/slackware/a/目录下,只包含了少量的文件系统支持,因此当使用gerneric 时,必须使用initrd加载所需要的文件系统。
如果你使用kernel-generic-2.6.21.5, 则- # installpkg kernel-generic-2.6.21.5-i486-1.tgz
- # installpkg kernel-modules-2.6.21.5-i486-1.tgz
- # cd /boot
- # mkinitrd -c -k 2.6.21.5 -m xft -f xft -r /dev/sda11
复制代码 如果你使用kernel-generic-2.6.21.5-smp, 则- # installpkg kernel-generic-smp-2.6.21.5-i486-1.tgz
- # installpkg kernel-modules-smp-2.6.21.5-i486-1.tgz
- # cd /boot
- # mkinitrd -c -k 2.6.21.5-smp -m xft -f xft -r /dev/sda11
复制代码 使用initrd,必须在/etc/lilo.conf增加一行 initrd = /boot/initrd.gz, 并重新安装lilo- # Linux bootable partition config begins
- image = /boot/vmlinuz
- initrd = /boot/initrd.gz
- root = /dev/sda11 <==[b]改成你自己的root[/b]
- label = Linux
- read-only
- # Linux bootable partition config ends
复制代码
注:Slackware 12.0 的huge kernel是安装系统用的, Slackware 不反对在安装完成后仍然使用huge kernel作为日常, 但Slackware 建议使用SMP版本的kernel. 详见Release Notes.
Slackeware的 kernelslackware/a/kernel-generic-2.6.21.5-i486-2.tgz
slackware/a/kernel-generic-smp-2.6.21.5_smp-i686-2.tgz
slackware/a/kernel-huge-2.6.21.5-i486-2.tgz
slackware/a/kernel-huge-smp-2.6.21.5_smp-i686-2.tgz
Reference: Slackware official announcementThere are two kinds of kernels in Slackware -- the huge kernels, which
contain support for just about every driver in the Linux kernel. These are
primarily intended to be used for installation, but there's no real reason
that you couldn't continue to run them after you have installed. The
other type of kernel is the generic kernel, in which nearly every driver
is built as a module. To use a generic kernel you'll need to build an
initrd to load your filesystem module and possibly your drive controller
or other drivers needed at boot time, configure LILO to load the initrd at
boot, and reinstall LILO. See the docs in /boot after installing for more
information. Slackware's Linux kernels come in both SMP and non-SMP types
now. The SMP kernel supports multiple processors, multi-core CPUs,
HyperThreading, and about every other optimization available. In our own
testing this kernel has proven to be fast, stable, and reliable. We
recommend using the SMP kernel even on single processor machines if it
will run on them. |
|