Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 252 #278
i
i
i
i
i
i
i
i
program can now do all the things necessary to mount the proper root file
system.
As soon as linuxrc finishes, the temporary initrd is unmounted and the
boot process continues as normal with the mount of the proper root file
system. Mounting the initrd and running linuxrc can be seen as a short
interlude during a normal boot process.
The kernel tries to remount initrd to the /initrd immediately after
the actual root partition is booted. If this fails because the mount point
/initrd does not exist, for example, the kernel attempts to unmount
initrd. If this does not work, the system is fully functional, but the mem-
ory taken up by initrd cannot be unlocked, so will no longer be available.
linuxrc
The only requirements for the program linuxrc in the initrd are: it must
have the special name linuxrc, it must be located in the root directory of
the initrd, and it must be executable by the kernel. This means that lin-
uxrc may be dynamically linked. In this case, the shared libraries in /lib
must be completely available in initrd. linuxrc can also be a shell script.
For this to work, a shell must exist in /bin. In short, initrd must contain
a minimal Linux system that allows the program linuxrc to be run. When
SUSE LINUX is installed, a statically-linked linuxrc is used to keep initrd
as small as possible. linuxrc is run with root permissions.
The Real Root File System
As soon as linuxrc terminates, initrd is unmounted and discarded, the
boot process carries on as normal, and the kernel mounts the real file sys-
tem. What is mounted as the root file system can be influenced by linuxrc.
It just needs to mount the /proc file system and write the value of the real
root file system in numerical form to /proc/sys/kernel/real-root-
dev.
10.3.3 Boot Loaders
Most boot loaders, including GRUB, LILO, and syslinux, can handle
initrd. Give individual boot loaders instructions for accessing initrd
as follows:
GRUB Enter the following line in /boot/grub/menu.lst:
252 10.3. Booting with the Initial RAM Disk