Linux startup Major phases q BIOS q MBR
Linux startup
Major phases q BIOS q MBR program q Boot loader (Partition boot program ) q OS’s kernel Loader q CPU always starts running at x’FFFF 0’=1, 048, 560 (built-in into BIOS and CPU)
BIOS q BIOS �Perform hw-specific tasks �Locate a bootable device �Locate cyl 0, head 0, sector 1 (the MBR) �Put 1 st byte of partition table into DL register Always x’ 80’ �Use int x’ 13’ to load into RAM @ 0000: 7 c 00 (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 q Locate an “active” partition q Locate boot sector q Load boot program into 0000: 7 c 00 �Overlays MBR program q Jump to 0000: 7 c 00 (this is the boot loader) q Move self to 0000: 0600
Boot loader q 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 q Load it into RAM at x’ 7 c 00’ q Jump to it
Kernel loader or kernel q q 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 q Scheduler takes over
MBR layout Content Offset in MBR sector MBR program code x’ 0000’ MBR messages x’ 008 b’ Partition table x’ 01 be’ MBR signature x’ 01 fe’
Boot manager q Read partition table q Create menu of bootable choices q Locate selected bootable partition q Load its boot record
- Slides: 8