[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't reboot after power failure (RAID problem?)

In <4D49816B.1040604@alcor.concordia.ca>, David Gaudine wrote:
>I have one more question, just out of curiousity so bottom priority.
>Why does this work?  mdadm.conf is in the initramfs which is in /boot
>which is on /dev/md0, but /dev/md0 doesn't exist until the arrays are
>assembled, which requires mdadm.conf.

Finding the initramfs on disk and copying it into RAM is not actually done by 
the kernel.  It is done by the boot loader, the same way the boot loader finds 
the kernel image on disk on copies it into RAM.

As such, it doesn't use kernel features to load the initramfs.  There are a 
number of techniques that boot loaders take to be able to do this "magic".  
GRUB normally uses the gap between the partition table and the first partition 
to store enough modules to emulate the kernel's dm/md layer and one or more of 
the kernel's file system modules in order to do the loading.  If those modules 
are not available or not in sync with how the kernel handles things, GRUB 
could fail to read the kernel image or initramfs or it could think it read 
both and transfer control to a "kernel" that is just random data from the 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply to: