Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Loaders-update(8)	     System Manager's Manual	       Loaders-update(8)

NAME
     loaders-update -- This utility helps to update the FreeBSD loaders.

SYNOPSIS
     loaders-update mode [-befgqry] [-m Efi_mount_dir] [-s loaders_source_dir]

DESCRIPTION
     This  command  searches for all the FreeBSD loaders, EFI and BIOS ones.  It
     checks if they are in sync with the ones inside /boot or inside  the  argu-
     ment  of  the  -s option.	For each one which isn't, it proposes either the
     commands to type to update it or executes these very commands, depending on
     the mode.

MODE
	   shoot-me
     This mode may update the loader(s), but ask for  confirmation  before  each
     one.  You need to be root.

	   show-me
     This mode just shows the commands to type, it changes nothing.

OPTIONS
     These options are available:

     -b        Scan only BIOS loaders (excludes EFI loaders).

     -e        Scan only EFI loaders (excludes BIOS loaders).

     -f        Won't  check  the  content  of the freebsd-boot partitions.  That
	       means it won't verify the coherence between the current root file
	       system and each BIOS loader.  It will update the  partitions  ac-
	       cording	to the detected root file system.  This option cannot be
	       chosen at the same time than -r.

     -g        Use 'gpart show' instead of 'sysctl kern.disks' in order to  list
	       the  available  disks.	In  some  circumstances,  the  output of
	       kern.disks doesn't match the geoms that 'gpart'	knows.	 So,  in
	       case of bad or no detection of your disk(s), you can try this op-
	       tion.

     -q        Quiet mode. No output to the console.

     -m Efi_mount_dir
	       If  an  efi  partition  isn't already mounted, try to mount it in
	       Efi_mount_dir.  The default is /mnt.

     -r        Won't check the root file system.  As -f, it won't verify the co-
	       herence between the  current  root  file  system  and  each  BIOS
	       loader.	It will just check the content of each freebsd-boot par-
	       tition  and  verify/update according to that.  Can be of some use
	       in case you rescue a system with a USB key,  for  example.   This
	       option cannot be chosen at the same time than -f.

     -s loaders_source_dir
	       Seek  for the source loaders in loaders_source_dir instead of the
	       default /boot.

     -y        Answer yes for shoot-me mode. Use with caution!

Return codes:
       0: no error.
       1: an error occured.
       2: at least one loader isn't up-to-date.
       3: = 1 + 2.

CAPABILITIES
     A, Check all disks reported by the system.
     A, Able to work on both BIOS and UEFI loaders.
     A, Work on mounted or unmounted EFI partitions.
     A, Recognize FreeBSD EFI loaders and examine only them.
     A, Check each freebsd-boot partition, compare its bootcode  with  the  root
     file  system.   If not coherent, don't examine its content (unless -r or -f
     option is specified).
     A, If a loader is already up-to-date, neither suggest nor	attempt  an  up-
     date.

LIMITATIONS
     A, Work only on AMD64 and ARM64 architectures.
     A, Can only examine disks with GUID Partition Table (GPT).
     A, Check only the first freebsd-boot and efi partition per disk.

SEE ALSO
     uefi(8), gpart(8), gptboot(8), gptzfsboot(8)

COMMENTS
     This  utility  comes  to fill a void in the FreeBSD upgrading.  Many people
     don't even know about the importance to update the loaders and  got  bitten
     by  different problems along the system upgrades.	This mainly concerns zfs
     on root systems, but not only.  It features to update all the  loaders  but
     also  tries  to  stay  stable in different environments and FreeBSD deriva-
     tives.  As such, it can be used in  GhostBSD,  TrueNas,  Hardened	BSD  and
     maybe  others  I didn't test.  In some words, it costs nothing to run it in
     show-me mode and  see  what  happens.  You  can  report  the  result  here:
     https://github.com/Emrion/uploaders       or	there:	     https://fo-
     rums.freebsd.org/threads/utility-that-tries-to-figure-how-to-update-the-
     freebsd-loaders.94237/

FreeBSD ports 15.quarterly	  June 1, 2026		       Loaders-update(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=loaders-update&sektion=8&manpath=FreeBSD+Ports+15.1.quarterly>

home | help