BIOS has ROM (Read-only Memory).
ROM has instructions to detect and configure devices.
After detecting storage device, CPU looks for the booting code.
##
Like you have the ability to search box full of books. |
You read the sticker on the box to know about books present in the box. | Selecting specific partition
based on that sticker you are deciding book to open | loading specific OS
##
Sometime we attach additional bootable device with OS, like Pendrive, CD,DVD etc and change boot sequence.
If your device has OS but the device is not bootable then it will be treated like regular data, that OS may not be booted.