Installing Solaris boot blocks

This post discusses how to install the boot block on a Solaris system running either the older UFS file system or the newer ZFS root file system. This process is generally only required when a system fails to boot from a disk containing the root file system.

Installing boot blocks on Solaris SPARC with UFS file system

    # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c#t#d#s0
    # init 6

    Replace c#t#d#s0 with the raw device of your root (/) file system

Installing boot blocks on Solaris SPARC for a ZFS root filesystem (rpool)

    # installboot -F zfs /usr/platform/`uname i`/lib/fs/zfs/bootblk /dev/rdsk/c#t#d#s0
    # init 6

    Replace c#t#d#s0 with the name of your ZFS root file system

Installing boot block on Solaris X86 (Solaris 10 and 11.0)

    # /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c#t#d#s#
    # init 6

    Replace c#t#d#s# with the raw device name that represents the location of the GRUB menu, /boot/grub/menu.lst on the Solaris root slice.

    What are the grub stage1 and stage 2?

    • /boot/grub/stage1 — partition boot file.
      Stage 1 is located in the MBR and mainly points to Stage 2, since the MBR is too small to contain all of the needed data.
    • /boot/grub/stage2 — boot block code.
      Stage 2 points to its configuration file, which contains all of the complex user interface and options we are normally familiar with when talking about GRUB. Stage 2 can be located anywhere on the disk. If Stage 2 cannot find its configuration table, GRUB will cease the boot sequence and present the user with a command line for manual configuration.

    Installing boot block on Solaris X86 (Solaris 11.1 and later)

      # bootadm install-bootloader -P rpool
      # shutdown -y -i6 -g0