Booting Technical Details
http://www.linux-boot.net/Boot.Sequence/
Stage 0 = in the BIOS
-
Execute a JMP at 0xFFFFFFF0 ( 1st instruction after power on )
-
Power-On-Self-Test
-
Detect hardware
-
Load Interrupt Vector table ( 0x0 )
-
Find Master Boot Sector ( 1st 512Bytes and sector ends with 0xaa55 )
-
Copy Master Boot Sector ( track 0 Sector 0 ) into RAM at 0x7C00
-
Execute ( int 0x19 ) the MBR ( aka 1st Stage Loader ) moved to 0x9000
Stage 1 BootLoader ( aka Master Boot Sector )
-
the BootLoader is arch/i386/boot/bootsect.S
Displays: Loading…..
o setup() is loaded at 0x00090200
o zImage is loaded at 0x00010000 bootsect.S -Ttext 0x1000
o bzImage is loaded at 0x00100000 bbootsect.S -Ttext 0x100000 -D'BIG_KERNEL'
-
Print L than load 2nd stage
-
Print I than execute the 2nd stage
Stage 1.5 FS
-
Grub will load its filesystem boot info
Stage 2 Main Boot Process
-
Print L than load 2nd stage
-
Read the /boot/map file
-
Print O after the map file was loaded
-
Grub and Lilo will show its kernel options to boot
Displays: Uncompressing vmlinuz…..
Stage 3 Kernel - Hardware Detect and Scan
-
Jump/Execute setup() ( arch/i386/boot/setup.S or bsetup.S )
o Scan the PCI bus for peripherals: KB, mouse, svga, disks
o setup interrupts vectors
o Load the device Drivers ( modules )
o switch from real-mode to protected mode
-
— or — is this where: "uncompressing linux" displays
-
Jump/Execute startup_32() ( arch/i386/kernel/head.S ) ( Start PID=0 )
Stage 4 Root FileSystem
-
Jump/Execute start_kernel() ( start PID=1 )
-
Load the optional ramdisk ( execute /linuxrc ) or is it before pid=0
-
run init ( /etc/inittab ) ( PID = 1 )
-
run rc.sysinit
-
run rcx.d init scripts
BgLug.ca Linux Boot Process ( LinuxBootProcess.pdf ) ( local copy )
KevinBoone.com Understanding the Linux Boot Process
ExecPC.com Writing Your Own BootLoader
ExecPC.com i386 Boot Protocol
NonDot.org Boot Process
LinuxDevCenter.com
-
How Your Computer Boots, start_kernel() , Loading…, Uncompressing…
TLDP.org Kernel Image - lots of details - start_kernel()
Moses.ukLinux.net Kernel Image
wustl.edu Similar to Hacking Grub
fifi.org Hacking Grub ( same as LinuxSelfHelp )
LinuxSelfHelp.com Hacking Grub ( same as FiFi.org )
uruk.org Grub Technical Info ( Boot Limits/Issues )
Temple.edu
rhce2b.com annoying popups
documented on: 2005.01.14