I read that the bootloader (Grub, or U-boot etc. ) locates the kernel (from maybe the HDD, or even flash memory if it's an embedded system) and loads it into memory on startup.
Now, does this mean that the bootloader loads the kernel fully into available RAM and then passes control to it? My guess is that the kernel will not fully fit into the RAM and so there will be swapping of the kernel instructions from RAM to the storage device and vice-versa.
What I don't understand is, the bootloader has stopped executing at this stage and the kernel has taken over, so how can the bootloader take care about loading the rest of the kernel in and out of memory if it doesn't fully fit at first?