I am trying to understand the Linux boot process, and after reading quite some amount of documentation there is one point that I still can't seem to understand.
So the basicis is BIOS -> Grub MBR -> Grub CONF -> Kernel ...
with a grub conf that can look like this
title CentOS (2.6.32-358.2.1.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.2.1.el6.i686 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-358.2.1.el6.i686.img
So based on my understanding of the documentation + post I read, kernel will be loaded + mount initramfs as root filesystem. Then init will be executed which will be in charge to do a bunch of various stuff to get the system up and running.
My question is : How is the Kernel loaded?
I mean since the kernel is in /boot/vmlinuz-2.6.32-358.2.1.el6.i686 of my device (hd0,0) the filesystem needs to be mounted somehow first so it can be accessed.
If (what I suspect) Grub mounts hd0,0 partition does it do first a pivot_root with initramfs then another pivot_root with the actual root= fs specificied as kernel parameter ?
Any explanation / links that can help me understand a bit better how is this all working togetheris welcome,