This article hasn't been updated for over 5 years. The information below may be obsolete.

How to update a corrupt Solaris x86 boot archive

At some point you'll encounter a corrupt boot archive on your Solaris x86 system.

Booting a system from a root file system image that is a boot archive, and then remounting this file system on the actual root device can sometimes result in a boot archive and root file system that do not match, or are inconsistent. Under these conditions, the proper operation and integrity of the system is compromised.

If an inconsistency is detected, the normal boot sequence is suspended and the system reverts to failsafe mode.

Also, if a system failure, a power failure, or a kernel panic occurs immediately following a kernel file update, the boot archives and the root (file system might not be synchronized. Although the system might still boot with the inconsistent boot archives, it is recommended that you boot the failsafe archive to update the boot archive.

Below are the steps necessary to perform this task:

  • Bring the system to the "ok" prompt
    root@solaris# init 0
  • Boot the failsafe archive
    ok boot -F failsafe
  • If an inconsistent boot archive is detected a message is displayed.
    An out of sync boot archive was detected on rpool.
    The boot archive is a cache of files used during boot
    and should be kept in sync to ensure proper system operation.
    
    Do you wish to automatically update this boot archive? [y,n,?] y
    If the archive was updated successfully, a message is displayed:
    The boot archive on rpool was updated successfully.
  • Mount device with corrupted boot archive on /a
    Do you wish to have it mounted read-write on /a? [y,n,?] y
    mounting rpool on /a
    
    Starting shell.
    #
  • And forcibly update corrupted boot archive on alternate root:
    # bootadm update-archive -f -R /a
  • Unmount the file system
    # umount /a
  • Reboot the system
    # init 6