|
|
摘录自redhat.com上,有本人亲自翻译
有疑问的朋友请跟贴
What is an initrd? 啥是initrd?
Resolution:An initrd image is an initial RAM disk image that contains configuration and
kernel modules required at boot time.
解释:initrd.img 是一个初始化的ram disk 它包含了在启动时要用到的配置文件和内核驱动模块
The initial RAM disk image file is created when a kernel is installed and is located in
the /boot directory. The files are named 'initrd-<kernel version>.img'. When multiple
kernels are installed, each kernel will have it's own initial RAM disk image.
ram disk image在内核创建时建立,它并且位于/boot目录下,文件名为"initrd-"内核版本".img
如果存在多个内核,那他们有自己的ram disk image
At boot time the kernel and the initrd image are loaded into memory by the system
motherboards Basic Input Output System (BIOS). The BIOS locates the kernel and the
initrd image files on a disk drive by reading the Master Boot Record, located in the
first 512 bytes of the boot disk. The Master Boot Record (MBR) generally will contain
information required to locate the kernel and initial RAM disk files. In Red Hat
Linux the boot loader (Either GRUB or LILO) sets up the MBR.
启动时,内核和initrd.img由系统BIOS调入内存,BIOS通过读入MBA来判定内核和initrd.img的所在,
MBA中包含了,确定内核和ramdisk位置的信息,REDHAT一般使用lilo或grub做MBA
The kernel mounts the initial RAM disk image as a temporary root filesystem (/), and
loads the needed kernel modules to continue with the rest of the boot process.
内核加载初始化的ram disk image作为临时的根文件系统(/) 并且加载以后启动过程中所需要的
模块
It is important to note that the BIOS controls all of the system's hardware and
attached devices until the kernel is ready to take over. All access to the installed
disk drives is done by the BIOS until the BIOS hands control of the hardware to the
kernel.
很重要的一点是,在内核接管控制权前,是有系统BISO控制系统的硬件和其它外设.所有对磁盘
驱动器的访问也由BIOS控制
Until the BIOS hands over control of the hardware, the kernel at this stage has never
accessed or read from any disk drives, only from the initial RAM disk image in memory.
在BIOS控制阶段,内核并没有从磁盘上读入内存,仅仅只有ram disk image读入到内存
The initial RAM disk image must contain kernel modules that will allow the kernel to
access the root file system, so that the rest of the boot process can continue. The
standard Red Hat kernel is capable of using most IDE controllers and accessing most
IDE disks without additional kernel modules, so the initial RAM disk image on such a
system will most likely only have the kernel modules needed to read the type of
filesystem that is on.
初始化的ram disk必须包含能访问文件系统的内核模块,以保证以后启动的顺利进行.标准的
REDHAT内核不需要加载另外的模块下就能认出大多数的IDE磁盘,所以在这种情况下,ram disk
image的重要作用是对文件系统访问的支持
Systems that have the root filesystem on SCSI or RAID devices, or some other device
will need to have additional kernel modules present in the initial RAM disk image to
be able to access these devices.
对于根系统在SCSI或RAID磁盘上的,就需要ram disk image包含另外的模块来使内核能访问
这些设备
Once the kernel has loaded all the modules needed from the initial RAM disk image,
and has mounted the real root filesystem from the disk drive, the kernel performs what
is known as a 'pivot root'. This replaces the temporary root filesystem of the initial
RAM disk with the real root filesystem. The rest of the boot process can now continue
by reading the root filesystem from the disk drive.
一旦,内核从ram disk中加载了所需要的所有模块后,并且这时挂载了正宗的根系统时候,此时的
根叫做"核心,轴心根",用这个真正的根替换了由ram disk生成的临时根.在读出了根文件系统后,
剩下的过程就由磁盘上的INIT控制了 |
|