Boot Sequence 

http://www.linux-boot.net/Boot.Sequence/

  1. 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

  2. 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

  3. Stage 1.5 FS

    • Grub will load its filesystem boot info

  4. 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…..

  5. 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 )

  6. 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

Boot Sequence URLs 

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

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

VGA display mode codes 

http://www.knoppix.net/forum/viewtopic.php?p=36777

Knoppix defaults to 1024x768 and I only have 800x600. This was OK until the root partition glitched in a file-system check and I could not read the bottom of the screen to find out what was happpening, or enter any commands (except by guesswork). I fixed this by changing the VGA code in 'lilo.conf' from 791 to either NORMAL or 0x0103 (800x600x256). Both produced the same display, 80x25 on the central 50% or so of the screen, but without the penguin at the top left.

However, what I would like to do, if possible, is have the neat display that goes with VGA=791, but in an 800x600 space. Is there a VGA display code that will do this?

VGA display mode codes 

> > Is there a VGA display code that will do 800x600x16bit?
> Yes, there is you want 788.

Yay! Works! Thank you very much!

Autodetect video hardware at boot 

http://www.linuxquestions.org/questions/susenovell-60/autodetect-video-hardware-at-boot-519263/

Here are two charts of vga values you can try to see if it gives you some kind of graphics on boot.

Colors ( depth) 640x480 800x600 1024x768 1280x1024 1600x1200
256 ( 8 bit) 769 771 773 775 796
32,768 (15 bit) 784 787 790 793 797
65,536 (16 bit) 785 788 791 794 798
16.8M (24 bit) 786 789 792 795 799
640x480 800x600 1024x768 1280x1024
256 0x301 0x303 0x305 0x307
32k 0x310 0x313 0x316 0x319
64k 0x311 0x314 0x317 0x31A
16M 0x312 0x315 0x318 0x31B

documented on: 01-14-07, bigrigdriver