The Handbook

    Theme
    • Guides
        • Check a system before installing FreeBSD
        • Orient a Linux administrator on FreeBSD
        • Supported FreeBSD releases
        • Choose a FreeBSD documentation and support channel
        • Move files safely without GNU mv -t
        • Update, upgrade, or update packages?
        • Upgrade 14.4 or 15.0 to FreeBSD 15.1
        • Choose packages, ports, or poudriere
        • Choose the quarterly or latest package branch
        • Choose a FreeBSD download or package mirror
        • Make a system setting persistent
        • Configure locale, keyboard, and time zone
        • Configure a serial console for recovery
        • Choose a custom kernel, module, or loader setting
        • Run a Linux binary with the compatibility layer
        • Check desktop and laptop hardware before installation
        • Choose and check a graphics driver
        • Choose Xorg or Wayland
        • Build a maintainable desktop baseline
        • Install and check a desktop browser
        • Check laptop Wi-Fi, power, and suspend
        • Check multimedia readiness
        • Choose and configure a printing stack
        • Run Windows applications with Wine
        • Snapshot and replicate a ZFS dataset
        • Choose a filesystem and storage layout
        • Operate ZFS without losing the recovery path
        • Restore files from a ZFS snapshot
        • Read ZFS pool health and run a scrub
        • Replace a failed device in a ZFS mirror
        • Replicate a ZFS dataset over SSH
        • Change PF safely on a remote host
        • Configure a narrow WireGuard tunnel
        • Plan a FreeBSD home server
        • Choose a mail server or an outgoing relay
        • Publish a network service safely
        • Choose a jail network model
        • Choose native jails or a jail manager
        • Choose a jail or a bhyve virtual machine
        • Establish a FreeBSD security baseline
        • Choose a MAC policy
        • Audit security-relevant activity
        • Start a DTrace performance investigation
    • Integrations
        • Create a first jail with Bastille
        • Compare jail managers and OCI tooling
        • Publish a Bastille service through PF
        • Mount a ZFS dataset in a Bastille jail
        • Update and upgrade Bastille jails
        • Back up and restore a Bastille jail
        • Prepare bhyve and vm-bhyve
        • Choose NFS or Samba for file sharing
        • Choose ZFS backup automation
        • Operate a signed poudriere repository
        • Manage FreeBSD configuration with Ansible or Salt
        • Run Motion with webcamd on FreeBSD
        • Design a reverse proxy, certificates, and monitoring
    • FAQ
      • Troubleshooting
          • Recover an interrupted freebsd-update run
          • Resolve a package repository or ABI mismatch
          • Diagnose the FreeBSD boot path
          • Recover with a ZFS boot environment
          • Diagnose DNS, routing, and firewall paths
          • Diagnose network mbuf exhaustion
          • Bind a service to a low port without running it as root
          • Diagnose audio output or input
          • Diagnose webcamd, cuse, and a webcam
          • Fix USB device permissions without opening every device
      • About this handbook
      • Synopsis
      • Record the last completed stage
      • Check firmware and boot selection
      • Use the loader as a diagnostic boundary
      • Separate kernel attachment from root selection
      • Treat UFS and ZFS failures differently
      • Isolate init, rc, and service failures
      • Use recovery media without committing changes
      • Primary references

      Diagnose the FreeBSD boot path

      Last reviewed
      13 August 2026
      Applies to
      15.1-RELEASE, 15.0-RELEASE, 14.4-RELEASE

      Synopsis #

      A machine that “does not boot” can have failed before FreeBSD starts, inside the loader, while the kernel attaches devices, while the root filesystem is selected, or during multi-user service startup. The last reliable output determines the next diagnostic step.

      Preserve that output and change one layer at a time. Do not reinstall a boot loader, repair a filesystem, import a ZFS pool, or roll back a dataset merely because the screen stopped. Those actions solve different failures and some are destructive.

      Record the last completed stage #

      Use a local display, provider console, baseboard management controller, or tested serial recovery console . Photograph or capture the complete error and the messages immediately before it. Record whether the failure began after firmware changes, disk work, an update, an upgrade, a kernel or loader setting, or an rc.conf change.

      Classify the boundary before changing anything:

      Last visible evidenceFirst boundary to inspect
      No firmware logo, setup screen, or power-on self-testPower, hardware, firmware, and management console
      Firmware works but no FreeBSD loader appearsBoot selection, EFI System Partition or BIOS boot code, and target disk
      Loader menu or prompt appearsLoader configuration, kernel files, modules, and loader view of disks
      Kernel messages begin and then stopKernel, driver attachment, hardware, or root-device selection
      Root mount, ZFS, UFS, or init error appearsRoot filesystem, pool, mount policy, or required device
      Login prompt never appears after rc messagesrc configuration and enabled services
      Login appears but an application is unavailableApplication or service failure, not a boot failure

      Check firmware and boot selection #

      If firmware output is absent, FreeBSD files are not yet involved. Confirm power, hardware status, display or console selection, and any remote-management event log. Revert only a known recent firmware change through the hardware’s documented recovery mechanism.

      If firmware works, open its one-time boot menu and confirm the intended disk and boot mode. UEFI and legacy BIOS paths use different boot components. A firmware update or reset can remove or reorder a UEFI boot entry without changing the FreeBSD filesystem.

      From a working installation or official recovery environment, gather read-only layout evidence:

      # gpart show
      # gpart show -p
      

      Do not run gpart bootcode, format the EFI System Partition, or create new partitions until the installed boot mode, partition scheme, and missing component have been proved. The installation preflight describes safe media and disk identification.

      Use the loader as a diagnostic boundary #

      An interactive FreeBSD loader proves that firmware reached boot code capable of reading at least part of the boot filesystem. Stop the countdown and inspect the loader’s current view:

      show currdev
      show loaddev
      show kernel
      lsdev
      

      Command availability varies between loaders and platforms; use help and the installed loader(8) manual. Compare the displayed devices and paths with the recorded installation layout.

      For a one-boot diagnostic, verbose mode can expose the kernel’s last successful attachment:

      boot -v
      

      Single-user mode is appropriate only after the kernel can reach the root filesystem:

      boot -s
      

      If a loader variable added to /boot/loader.conf caused the failure, override or unset that exact variable for one boot at the loader prompt. Correct the persistent file only after the system starts. Do not copy unrelated tunables. The persistent-settings guide separates loader, kernel, and service configuration.

      A known previous kernel may be tested through the loader when the relevant files exist, but kernel.old is not guaranteed to be present or compatible with the current userland and modules. Preserve the failed kernel and record exactly which kernel boots instead of replacing files immediately.

      Separate kernel attachment from root selection #

      When kernel messages start, note the last driver, device, and error. A final line naming a device can be the last successful attachment rather than the cause. Repeat one boot with -v and compare the sequence with /var/run/dmesg.boot from a known-good boot, if available.

      If the kernel asks for a root device or reports that the root cannot be mounted, verify:

      • whether the expected storage controller and disks attached;
      • whether device identifiers changed after controller or cabling work;
      • whether the loader selected the intended boot device;
      • whether the root pool or filesystem name in the error matches the installation record;
      • whether encryption material or another prerequisite is available.

      The loader’s -a boot flag can request an interactive root-device selection, but a successful manual selection is diagnostic evidence, not a permanent fix. Correct the underlying device or configuration reference after the running layout is known.

      Treat UFS and ZFS failures differently #

      For UFS, fsck(8) must operate under the conditions described by its manual page, normally while the filesystem is unmounted or mounted read-only. Do not apply an automatic repair flag to a disk that has not been identified or to a filesystem that is mounted read-write.

      For ZFS, first inspect rather than import or modify:

      # zpool import
      

      This lists pools visible to the recovery environment without importing a named pool. Import options, alternate roots, encryption, host identifiers, and bootfs properties affect a safe recovery plan. A pool that is already imported by another running host must not be force-imported as a routine diagnostic step.

      If a pre-change ZFS boot environment exists and the loader can read the pool, follow Recover with a ZFS boot environment . A boot environment is not a pool repair, does not restore separate data datasets, and should not be replaced with a blind zfs rollback.

      Isolate init, rc, and service failures #

      If the root filesystem mounts and init starts, the loader and kernel have completed their primary work. Enter single-user mode from the loader or through the documented boot menu. Single-user mode has no normal network service startup and provides privileged local access; apply the physical-console policy described by the FreeBSD boot documentation.

      Inspect the exact recent configuration change and the previous boot log. On a system that reaches multi-user mode, useful read-only checks include:

      # dmesg -a
      $ service -e
      # service service-name status
      

      Replace service-name with an enabled service reported near the failure. Disable or correct only the proved failing service using its documented rc variable. A blanket removal of /etc/rc.conf, firewall rules, storage mounts, or package startup scripts destroys evidence and can introduce a second outage.

      When a release update or upgrade was interrupted, continue with Recover from an interrupted FreeBSD update after the system can boot safely. Do not resume package or base-system changes while storage health remains uncertain.

      Use recovery media without committing changes #

      Boot official installation media for the installed architecture when the loader, kernel, or root environment cannot provide a shell. Select its live or shell facility and first inventory disks, partitions, and pools. Keep the installed root unmounted until its identity and recovery objective are clear.

      Recovery media can have a different kernel and driver set from the installed release. A disk visible there but absent from the installed kernel points toward an installed-kernel, module, or configuration difference; it does not by itself prove disk health.

      Before any write, record:

      • the exact target device, partition, pool, or dataset;
      • whether it is mounted or imported elsewhere;
      • the command’s rollback or backup path;
      • the evidence connecting that operation to the failed stage.

      If no safe write follows from the evidence, preserve the machine state and collect storage or hardware diagnostics instead of trying a universal repair command.

      Primary references #

      • FreeBSD Handbook: The FreeBSD Booting Process
      • FreeBSD Handbook: Installing FreeBSD
      • boot(8)
      • loader(8)
      • init(8)
      • rc(8)
      • gpart(8)
      • fsck(8)
      • zpool-import(8)

      Independent documentation. Not affiliated with or endorsed by the FreeBSD Project or the FreeBSD Foundation.

      Report a bug
      • Synopsis
      • Record the last completed stage
      • Check firmware and boot selection
      • Use the loader as a diagnostic boundary
      • Separate kernel attachment from root selection
      • Treat UFS and ZFS failures differently
      • Isolate init, rc, and service failures
      • Use recovery media without committing changes
      • Primary references