How to install a ZFS boot block in solaris
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
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.
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
No comments:
Post a Comment