90 likes | 307 Views
L inux. startup. Major phases. BIOS MBR program Boot loader (Partition boot program ) OS’s kernel Loader CPU always starts running at x’FFFF0’=1,048,560 (built-in into BIOS and CPU). BIOS. BIOS Perform hw-specific tasks Locate a bootable device
E N D
Linux startup
Major phases • BIOS • MBR program • Boot loader (Partition boot program ) • OS’s kernel Loader • CPU always starts running at x’FFFF0’=1,048,560 (built-in into BIOS and CPU)
BIOS • BIOS • Perform hw-specific tasks • Locate a bootable device • Locate cyl 0, head 0, sector 1 (the MBR) • Put 1st byte of partition table into DL register • Always x’80’ • Use int x’13’ to load into RAM @ 0000:7c00(why not 0000:0000?) • Int x’13’ expects boot drive address in the DL reg. • First drive IS x’80’ • Jump to this MBR program
MBR boot program • Locate an “active” partition • Locate boot sector • Load boot program into 0000:7c00 • Overlays MBR program • Jump to 0000:7c00 (this is the boot loader) • Move self to 0000:0600
Boot loader • Locate • the OS’s kernel loader program • or in some cases the kernel itself • or perhaps a boot manager program • Allows selecting which system to actually boot • Load it into RAM at x’7c00’ • Jump to it
Kernel loader or kernel • Initializes reserved RAM • Loads rest of kernel • Essential hardware setup • Basic memory manager • Start_kernel( ) • Interrupts, • Remaining memory management • Device initialization • Drivers • Start kernel processes: • Idle • Scheduler • Init (a user-space process!!) executes scripts • Start non-o/S services, • Allow user environment creation • Presents login screen • Scheduler takes over
Boot manager • Read partition table • Create menu of bootable choices • Locate selected bootable partition • Load its boot record