• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to install a ZFS boot block in solaris

by admin

The post discusses about how to install ZFS boot block on a system running a ZFS root filesystem. This is normally required when a system fails to boot from a disk containing a root filesystem. A typical error may include:

The file just loaded does not appear to be executable
Bootblk: can't find the boot program.

Solution

Boot from DVD/network/failsafe image

In order to install a new ZFS boot block, you need to first boot from DVD, network or the failsafe image on the system.

ok> boot cdrom -s

or

ok> boot net -s

On x86 systems, configure your BIOS to boot from the network, or DVD and select the appropriate option from the GRUB menu presented to you.

Mount the rpool

Once the system has booted from DVD or network, follow the post below to mount the ZFS root pool when booted from DVD. You need to mount the ZFS root pool so you can install the boot block that corresponds to the patch level of the operating system you will be booting.

Install Boot Block

After mounting the data set, install the boot block using installboot or installgrub
SPARC

# installboot -F zfs /mnt/usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c1t0d0s0

x86 systems with Solaris 10 or Solaris 11.0

# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0

x86 systems with Solaris 11.1 and above
Use bootadm on x86 systems with Solaris 11.1 and above.The install-bootloader subcommand installs the system bootloader. It supersedes the functionality of installgrub on x86 as well as supporting installation of GRUB2’s bootloader on x86.

# bootadm install-bootloader -P rpool

Reboot

Once the boot block has been installed, you can reboot the host and boot from your root disk.

# shutdown -y -i6 -g0

Filed Under: Solaris, Solaris 11, ZFS

Some more articles you might also be interested in …

  1. How to Check and Analyze Memory Usage in Solaris
  2. How to setup a chroot ssh/sftp in Solaris 10
  3. How to Identify ZFS Snapshot Differences using “zfs diff”
  4. A beginners guide to Solaris Multipathing Software (MPxIO or STMS)
  5. Unix file basics : Inode, Soft Vs Hard link, Device files, Named pipes
  6. Solaris : How to increase the Inodes on UFS file system with newfs command
  7. Solaris : How to set limit on the maximum number of open files per process
  8. How to configure rsyslog on Solaris 11.1 to send messages to a remote host using TCP
  9. A beginners guide to Solaris performance monitoring and troubleshooting
  10. How To Read And Clear SCSI Reservations in Solaris 11 (sg3_utils)

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright