Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    FreeBSD boot process

    Development
    1
    1
    5.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MrMoo
      last edited by

      In order to understand things a bit clearer I like diagrams, here's a diagram I have made outlining the FreeBSD boot process.  Corrections welcome.

      Stage zero of boot process

      A small 446 byte long program is loaded by the BIOS when switched on.  In FreeBSD the usual
      boot manager is called boot0 and is setup via boot0cfg or fdisk.  This program presents a
      menu of which operating systems the user can load, e.g. FreeBSD, Linux, Windows, etc.

      Example install:

      # fdisk -B -b /boot/boot0 
      

      or

      # boot0cfg -B -b /boot/boot0 
      

      Example screen:

      
      F1 FreeBSD
      
      Default: F1
      
      

      references:

      http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html
      http://www.freebsd.org/cgi/man.cgi?query=boot0cfg
      http://www.freebsd.org/cgi/man.cgi?query=fdisk

      Stage one of boot process

      A small 512 byte program to locate and load boot2, the second stage.  This program is
      managed together with stage two as a single entity.

      Stage two of boot process

      Provides an interface to choose the boot loader / kernel.

      Example install of stage one and two:

      # bsdlabel -B 
      

      Example screen:

      
      >> FreeBSD/i386 BOOT
      Default: 0:ad(0,a)/boot/loader
      boot:
      
      

      Stage three of boot process

      An interface to choose kernel and set boot options.

      Example screen:

      
      BTX loader 1.00 BTX version is 1.01
      Console: internal video/keyboard
      BIOS drive A: is disk0
      BIOS drive B: is disk1
      BIOS drive C: is disk2
      BIOS drive D: is disk3
      BIOS 639kB/261120kB available memory
      
      FreeBSD/i386 bootstrap loader, Revision 0.8
      
      /kernel text=0x277391 data=0x3268c+0x332a8 |
      
      |
      Hit [Enter] to boot immediately, or any other key for command prompt.
      Booting [kernel] in 9 seconds... _
      
      

      references:

      http://www.freebsd.org/cgi/man.cgi?query=loader&sektion=8

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.