System Administration Guide: Basic Administration

Procedurex86: How to Boot in Failsafe Mode to Forcibly Update a Corrupt Boot Archive

This procedure shows how to rebuild an inconsistent or corrupt boot archive in the event you are not prompted by the system to update the boot archive the system, or in the event of a system hang or looping sequence occurs.

  1. Stop the system by using one of the methods that are described in the procedure, x86: How to Stop a System for Recovery Purposes.

  2. Reboot the system.


    # reboot
    

    If the system displays the Press any key to reboot prompt, press any key to reboot the system.

    You can also use the Reset button at this prompt.

    When the boot sequence begins, the GRUB menu is displayed.


    +---------------------------------------------------------------------+
     | Solaris 10.1... X86                                                     |
     | Solaris failsafe                                                        |
     |                                                                         |
     |                                                                         |
     +-------------------------------------------------------------------------+
          Use the  and  keys to select which entry is highlighted.
          Press enter to boot the selected OS, 'e' to edit the
          commands before booting, or 'c' for a command-line.

    Note –

    The contents of the GRUB menus vary, depending on the Solaris release you are running.


  3. Use the arrow keys to navigate the GRUB menu to select the failsafe entry.

  4. Press Return to boot the failsafe archive.

    If any boot archives are out of date, a message t similar to the following is displayed:


    Searching for installed OS instances...
    	
    	An out of sync boot archive was detected on /dev/dsk/c0t0d0s0.
    	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,?]
    		
  5. Type y, then press Enter to update the inconsistent boot archive.

    The system displays the following message:


    Updating boot archive on /dev/dsk/c0t0d0s0.
    	The boot archive on /dev/dsk/c0t0d0s0 was updated successfully.

    If no inconsistent boot archives are found, a message similar to the following is displayed:


    Searching for installed OS instances...
    	
    	Solaris 10.1... X86 was found on /dev/dsk/c0t0d0s0.
    	Do you wish to have it mounted read-write on /a? [y,n,?]

    This message is also displayed after any inconsistent boot archives are updated successfully.

  6. Mount the device that contains the corrupt boot archive on /a by typing the corresponding number of the device, then pressing Enter..


    Note –

    If any inconsistent boot archives were updated in the previous step, the device is already mounted on /a.


  7. To forcibly update the corrupt boot archive, type:


    # bootadm update-archive -f -R /a
    
  8. Unmount the device.


    # umount /a
    
  9. Reboot the system.


    # reboot
    

Example 12–14 x86: Booting in Failsafe Mode to Forcibly Update a Corrupt Boot Archive

This example shows how to boot the failsafe archive to forcibly update a corrupt boot archive.


GNU GRUB  version 0.95  (635K lower / 523200K upper memory)               
                                                                                
 +-------------------------------------------------------------------------+    
 | Solaris 10 1/06 s10x_u1wos_19a X86                                      |    
 | >Solaris failsafe<                                                      |    
 |                                                                         |    
 |                                                                         |    
  +-------------------------------------------------------------------------+   
      Use the  and  keys to select which entry is highlighted.                  
      Press enter to boot the selected OS, 'e' to edit the                      
      commands before booting, or 'c' for a command-line.                       
                                                                                
SunOS Release 5.10
Copyright 1983-2006 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Booting to milestone "milestone/single-user:default".
Configuring devices.
Searching for installed OS instances...

Multiple OS instances were found. To check and mount one of them
read-write under /a, select it from the following list. To not mount
any, select 'q'.

  1  /dev/dsk/c0t0d0s0     Solaris 10 1/06 s10x_u1wos_19a X86
  2  /dev/dsk/c0t1d0s0     Solaris 10 5/08 X86

Please select a device to be mounted (q for none) [?,??,q]: 1
mounting /dev/dsk/c0t0d0s0 on /a

Starting shell.
# rm /a/platform/i86pc/boot_archive
# bootadm update-archive -f -R /a
Creating boot_archive for /a
updating /a/platform/i86pc/amd64/boot_archive
updating /a/platform/i86pc/boot_archive
# umount /a
# reboot
syncing file systems... done
rebooting...
.
.
.