Fastboot has the following handy feature (if booting the custom image fails, the device just magically boots the default image next time, and all's gonna be alright):
To boot with a host-side kernel image
This command allows you to download a kernel image (and optional root filesystem image) and boot the phone with those, instead of using the kernel and rootfs in the boot flash partition. It is very useful while developing a kernel or modifying the rootfs.
fastboot boot < kernel > [ < ramdisk > ]
Does anyone know how it internally works? Is the kernel copied to a special boot partition before rebooting the device? (UPDATE: As the answer points out, there is no reboot, as fastboot is a step in the boot process, which basically makes my question meaningless.) I was looking into the source code of fastboot, but it seems it contains only what happens on the host side, and not on the device.
I mean, how the flashing feature works is pretty easy, I can imitate it by just copying a boot image with a custom kernel to the boot
partition, e.g., via:
dd if='<my_boot.img>' of='/dev/block/platform/msm_sdcc.1/by-name/boot'
Btw: I am asking the question because of an app I am developing; I'd like to "risk free" boot a custom kernel directly from the device, where it is stored e.g. on the SD-card.