Root RAID HOWTO cookbook: Appendix G. - linuxrc theory of operation
14. Appendix G. - linuxrc theory of operationThis is the complex form of the linuxrc file for root mounted raid.
It must be processed with 'bash' or another shell that recognizes
shell functions.The advantage is that it is generic and is not dependent on startup
files and parameters located in the initrd image.A Raid_Conf parameter passed to linuxrc by the kernel at boot from lilo or loadlin contains a pointer to the boot devices and location the of
initial 2 raidboot files needed by linuxrc (raidboot.etc and
raidboot.cfg placed by the shutdown script).raidboot.etc containing the 'tar'ed files:
raid*
mdtab*
fstab
lilo.conf ( if applicable )from the primary system that are transferred to the
initrd /etcetc directory at startup. With care, this file may
be edited if necessary when your system 'really' crashes.raidboot.cfg contains the name of the boot partition in use
and applicable backup(s) as well as the path to the rest of the raid start up file used by linuxrc.
This file is normally created by the shutdown file
and may be created manually if necessary.raidboot.cfg is of the form, 3 lines - no comments
/dev/bootdev1 /dev/bootdev2 [/dev/bootdev3 ... and so on]
raid-status/path
name_of_raidX.conf_filethe raid-status/path does not include the name of the mountpointthe raidX.conf filename is that one found in /etc and normally used for ckraid and mkraid.The following additional files reside on the permanent raid boot partitions.
This is usually the same as above, but in emergency situations
may be loaded from anywhere they are available, such as a floppy boot disk.raidgood.ref created by the command
cat /proc/mdstat | grep md0 >/{raid_status_path}/raidgood.refSee the shutdown scripts
for saving this file and the nextraidstat.ro created at each shutdown by the shutdown rc file,
saving the exit status of the raid array.